input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testSerailze ( ) { final org . apache . reef . runtime . multi . utils . MultiRuntimeDefinitionSerializer serializer = new org . apache . reef . runtime . multi . utils . MultiRuntimeDefinitionSerializer ( ) ; final org . apache . reef . runtime . multi . utils . avro . AvroMultiRuntimeDefinition def = new org . apache... | org . junit . Assert . assertEquals ( def , fromStringdef ) |
plControleGevondenDatumtijdstempelOuderNok ( ) { final nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst dbPersoonslijst = new nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstBuilder ( ) . build ( ) ; setup ( java . util . Collections . singletonList ( dbPersoonslijst ) , java . uti... | org . junit . Assert . assertFalse ( subject . controleer ( new nl . bzk . migratiebrp . synchronisatie . runtime . service . synchronisatie . verwerker . context . VerwerkingsContext ( null , null , null , null ) ) ) |
testGetParametersWithEmptyFieldsAndWithoutDefaults ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . contact . DepartmentContact entity = new org . lnu . is . domain . department . contact . DepartmentContact ( ) ; java . util . Map < java . lang . String , java . ... | org . junit . Assert . assertEquals ( expected , actual ) |
handleAsyncUpgradeSubscrption_Pending ( ) { org . oscm . domobjects . Subscription subscription = givenSubscription ( SubscriptionStatus . PENDING , initialProduct ) ; bean . handleAsyncUpgradeSubscription ( subscription , targetProduct ) ; verify ( as , never ( ) ) . asyncUpgradeSubscription ( any ( org . oscm . domob... | org . junit . Assert . assertEquals ( SubscriptionStatus . PENDING , subscription . getStatus ( ) ) |
testMapGranularity ( ) { java . io . File file = new java . io . File ( OS . TARGET , ( ( ( ( getClass ( ) . getName ( ) ) + "." ) + ( testName . getMethodName ( ) ) ) + ".deleteme" ) ) ; file . deleteOnExit ( ) ; java . nio . channels . FileChannel fc = new java . io . RandomAccessFile ( file , "rw" ) . getChannel ( )... | org . junit . Assert . assertEquals ( length , file . length ( ) ) |
checkThatCachesAreEmptyWhenProjectIsRemoved ( ) { org . erlide . engine . model . root . IErlProject project = null ; try { final java . lang . String projectName = "testprojectx" ; project = org . erlide . engine . util . ErlideTestUtils . createErlProject ( projectName ) ; final java . lang . String moduleName = "f.e... | org . junit . Assert . assertEquals ( module2 , module ) |
testValideer ( ) { final nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView persoonView = maakHuidigeSituatie ( SoortPersoon . INGESCHREVENE ) ; final nl . bzk . brp . business . regels . context . HuidigeSituatieRegelContext context = new nl . bzk . brp . business . regels . context . HuidigeSituat... | org . junit . Assert . assertTrue ( resultaat ) |
readData5 ( ) { org . mockito . Mockito . when ( filereader . fileExist ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( true ) ; org . mockito . Mockito . when ( filereader . readAllLine ( org . mockito . Mockito . anyString ( ) ) ) . thenReturn ( new java . lang . String [ ] { "1.413913535177E9<sp>UNKNOWN... | org . junit . Assert . assertTrue ( ( ( bluetoothInfo . size ( ) ) > 0 ) ) |
length ( ) { final nl . bzk . migratiebrp . voisc . spd . PutMessageBody record = new nl . bzk . migratiebrp . voisc . spd . PutMessageBody ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return length ; } | org . junit . Assert . assertEquals ( 3 , record . length ( ) ) |
lsar_SingleLsarEnumerateAccountRightsResponse ( ) { com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountRightsResponse response = new com . rapid7 . client . dcerpc . mslsad . messages . LsarEnumerateAccountRightsResponse ( ) ; java . lang . String hexString = "0100000000000200010000003600380004000... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( expectedPrivs , privs ) ) |
testPrivateConstructor ( ) { org . evosuite . runtime . FooConstructor . counter = 0 ; org . evosuite . runtime . PrivateAccess . callDefaultConstructor ( org . evosuite . runtime . FooConstructor . class ) ; "<AssertPlaceHolder>" ; } callDefaultConstructor ( java . lang . Class ) { if ( klass == null ) { throw new jav... | org . junit . Assert . assertTrue ( ( ( org . evosuite . runtime . FooConstructor . counter ) > 0 ) ) |
getEncounters_shouldGetEncountersByVisitType ( ) { java . util . List < org . openmrs . VisitType > visitTypes = new java . util . ArrayList ( ) ; visitTypes . add ( new org . openmrs . VisitType ( 2 ) ) ; org . openmrs . parameter . EncounterSearchCriteria encounterSearchCriteria = new org . openmrs . parameter . Enco... | org . junit . Assert . assertEquals ( 2 , encounters . size ( ) ) |
testReadEntity ( ) { org . sagebionetworks . repo . model . ExampleEntity entity = new org . sagebionetworks . repo . model . ExampleEntity ( ) ; entity . setName ( "name" ) ; entity . setDoubleList ( new java . util . ArrayList < java . lang . Double > ( ) ) ; entity . getDoubleList ( ) . add ( 123.45 ) ; entity . get... | org . junit . Assert . assertEquals ( entity , clone ) |
getLocationFromAddress ( ) { java . lang . String address = "" ; java . lang . String uri = "/baidumap/location?address=" + address ; org . springframework . test . web . servlet . MvcResult mvcResult = mvc . perform ( org . springframework . test . web . servlet . request . MockMvcRequestBuilders . get ( uri ) . accep... | org . junit . Assert . assertEquals ( 200 , status ) |
nomalGetComponentIds ( ) { final long serviceId = 7117 ; final java . util . Set cidset = getAsSet ( new java . lang . String [ ] { ".component-1" , ".component-2" , ".component-5" } ) ; mockery . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockContext ) . getServiceReferences ( with ( any ( java . lang .... | org . junit . Assert . assertEquals ( cidset , getAsSet ( metadata . getComponentIds ( serviceId ) ) ) |
shouldCountCustomMethodWithBooleanParameter ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEnt... | org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) ) |
testIdentifierImplString ( ) { java . net . URI uri = java . net . URI . create ( "com:test" ) ; com . att . research . xacml . api . Identifier id = new com . att . research . xacml . std . IdentifierImpl ( uri . toString ( ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder stringBuilder = new ... | org . junit . Assert . assertEquals ( uri . toString ( ) , id . toString ( ) ) |
toPOLocalizedData_NullArgument ( ) { "<AssertPlaceHolder>" ; } toPOLocalizedData ( java . util . Map , org . oscm . types . enumtypes . LocalizedDataType ) { org . oscm . internal . operatorservice . POLocalizedData data = new org . oscm . internal . operatorservice . POLocalizedData ( ) ; data . setType ( type ) ; dat... | org . junit . Assert . assertNotNull ( bean . toPOLocalizedData ( null , null ) ) |
testNoError ( ) { boolean result = checkNoError ( "Social_Blogs_Get_All_Blogs" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testLerRequisicao ( ) { br . com . senacrs . alp . aulas . trabalho12 . LeitorRequisicao obj = null ; java . io . Reader in = null ; br . com . senacrs . alp . aulas . trabalho12 . ProtocoloGet pGet = null ; in = br . com . senacrs . alp . aulas . trabalho12 . LeitorRequisicaoTest . GET_READER ; obj = new br . com . se... | org . junit . Assert . assertNotNull ( pGet ) |
testFindServiceType ( ) { org . hyperic . hq . product . ServiceTypeInfo sinfo = new org . hyperic . hq . product . ServiceTypeInfo ( ) ; sinfo . setDescription ( "Test<sp>ServiceType<sp>Desc" ) ; sinfo . setInternal ( false ) ; sinfo . setName ( "Test<sp>ServiceType<sp>Name" ) ; org . hyperic . hq . appdef . server . ... | org . junit . Assert . assertEquals ( serviceType , serviceManager . findServiceType ( serviceType . getId ( ) ) ) |
testNewPseudoAtom_IElement ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IPseudoAtom atom = builder . newInstance ( org . openscience . cdk . interfaces . IPseudoAto... | org . junit . Assert . assertNotNull ( atom ) |
testInit ( ) { final org . jacoco . report . internal . html . table . ITableItem i = createItem ( 6 , 24 ) ; "<AssertPlaceHolder>" ; html . close ( ) ; } init ( java . util . List , org . jacoco . core . analysis . ICoverageNode ) { for ( final org . jacoco . report . internal . html . table . ITableItem i : items ) {... | org . junit . Assert . assertTrue ( column . init ( java . util . Arrays . asList ( i ) , i . getNode ( ) ) ) |
addIndex_IndexAlreadyAdded ( ) { org . locationtech . geowave . core . store . index . NullIndex index1 = new org . locationtech . geowave . core . store . index . NullIndex ( "index1" ) ; org . locationtech . geowave . core . store . adapter . MockComponents . MockAbstractDataAdapter adapter = new org . locationtech .... | org . junit . Assert . assertEquals ( 1 , dataStore . getIndices ( MOCK_DATA_TYPE_1 ) . length ) |
testWriteCollectionWithoutXmlRootElement ( ) { org . apache . cxf . jaxrs . provider . json . JSONProvider < java . util . List < org . apache . cxf . jaxrs . resources . SuperBook > > provider = new org . apache . cxf . jaxrs . provider . json . JSONProvider ( ) ; provider . setCollectionWrapperName ( "{http://superbo... | org . junit . Assert . assertEquals ( expected , bos . toString ( ) ) |
testSaveModelEmptyModel ( ) { au . gov . ga . earthsci . catalog . ICatalogModel model = new au . gov . ga . earthsci . catalog . CatalogModel ( ) ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ; au . gov . ga . earthsci . catalog . CatalogPersister . saveCatalogModel ( model , os ) ... | org . junit . Assert . assertEquals ( expected , actual ) |
test9999Next ( ) { org . jfree . data . time . Year current = new org . jfree . data . time . Year ( 9999 ) ; org . jfree . data . time . Year next = ( ( org . jfree . data . time . Year ) ( current . next ( ) ) ) ; "<AssertPlaceHolder>" ; } next ( ) { synchronized ( checkClosed ( ) . getConnectionMutex ( ) ) { if ( th... | org . junit . Assert . assertNull ( next ) |
deveObterCodigoStatusComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno eventoRetorno = new com . fincatto . documentofiscal . nfe310 . classes . evento . NFInfoEventoRetorno ( ) ; final int codigoStatus = 100 ; eventoRetorno . setCodigoStatus ( codigoStatus ) ;... | org . junit . Assert . assertEquals ( codigoStatus , eventoRetorno . getCodigoStatus ( ) , 0 ) |
test ( ) { initGraph ( ) ; greycat . Tasks . newTask ( ) . then ( greycat . internal . task . CoreActions . travelInWorld ( "10" ) ) . thenDo ( new greycat . ActionFunction ( ) { @ greycatTest . internal . task . Override public void eval ( greycat . TaskContext ctx ) { "<AssertPlaceHolder>" ; } } ) . execute ( graph ,... | org . junit . Assert . assertEquals ( ctx . world ( ) , 10 ) |
charset ( ) { ple . setCharset ( utf8Charset ) ; init ( baos ) ; java . lang . String msg = "α" ; ch . qos . logback . classic . spi . ILoggingEvent event = makeLoggingEvent ( msg ) ; byte [ ] eventBytes = ple . encode ( event ) ; baos . write ( eventBytes ) ; ple . footerBytes ( ) ; "<AssertPlaceHolder>" ; } toByteArr... | org . junit . Assert . assertEquals ( msg , new java . lang . String ( baos . toByteArray ( ) , utf8Charset ) ) |
testObjectNotEqual ( ) { final org . apache . hc . core5 . http . NameValuePair NameValuePair = new org . apache . hc . core5 . http . message . BasicNameValuePair ( "name" , "value" ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj instanceof org . apache... | org . junit . Assert . assertFalse ( NameValuePair . equals ( new java . lang . Object ( ) ) ) |
testMoveToLeftIsAllowedWithoutLock ( ) { com . eclipsesource . tabris . internal . SwipeManager manager = new com . eclipsesource . tabris . internal . SwipeManager ( mock ( com . eclipsesource . tabris . widgets . swipe . SwipeItemProvider . class ) ) ; boolean allowed = manager . isMoveAllowed ( 1 , 0 ) ; "<AssertPla... | org . junit . Assert . assertTrue ( allowed ) |
testSerialization ( ) { org . jfree . chart . annotations . XYPointerAnnotation a1 = new org . jfree . chart . annotations . XYPointerAnnotation ( "Label" , 10.0 , 20.0 , Math . PI ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . O... | org . junit . Assert . assertEquals ( a1 , a2 ) |
orderedleafListToNormalized ( ) { java . util . List < java . lang . String > topLevelLeafList = new java . util . ArrayList ( ) ; topLevelLeafList . add ( "foo" ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . mdsal . test . binding . rev140701 . Top top = new org . opendaylig... | org . junit . Assert . assertEquals ( containerNode , entry . getValue ( ) ) |
dataConversionTest ( ) { org . kaaproject . kaa . common . dto . EndpointSpecificConfigurationDto dto = new org . kaaproject . kaa . common . dto . EndpointSpecificConfigurationDto ( "hash" . getBytes ( ) , 1 , "conf<sp>body" , 2L ) ; org . kaaproject . kaa . server . common . nosql . cassandra . dao . model . Cassandr... | org . junit . Assert . assertEquals ( dto , configuration . toDto ( ) ) |
testGetSetCreated ( ) { java . util . Date expectedCreated = new java . util . Date ( ) ; com . microsoft . windowsazure . services . media . models . ContentKeyInfo contentKeyInfo = new com . microsoft . windowsazure . services . media . models . ContentKeyInfo ( null , new com . microsoft . windowsazure . services . ... | org . junit . Assert . assertEquals ( expectedCreated , actualCreated ) |
shouldConvertToHttpRequestBody ( ) { br . com . uol . pagseguro . api . http . HttpRequestBody expectedHttpRequestBody = new br . com . uol . pagseguro . api . http . HttpRequestBody ( "application/x-www-form-urlencoded;<sp>charset=UTF-8" , "key1=value1&key2=value2" , "UTF-8" ) ; br . com . uol . pagseguro . api . http... | org . junit . Assert . assertEquals ( expectedHttpRequestBody , httpRequestBody ) |
whenReadWithBufferedReader_thenCorrect ( ) { final java . lang . String expected_value = "Hello<sp>world" ; final org . baeldung . java . io . BufferedReader reader = new org . baeldung . java . io . BufferedReader ( new org . baeldung . java . io . FileReader ( "src/test/resources/test_read.in" ) ) ; final java . lang... | org . junit . Assert . assertEquals ( expected_value , currentLine ) |
updateInvalidXml ( ) { final java . lang . String requestBodyBefore = getBody ( callUri ( "Employees('2')" ) ) ; putUri ( "Employees('2')" , "<invalidXml></invalid>" , HttpContentType . APPLICATION_ATOM_XML_ENTRY , HttpStatusCodes . BAD_REQUEST ) ; "<AssertPlaceHolder>" ; } getBody ( org . apache . http . HttpResponse ... | org . junit . Assert . assertEquals ( requestBodyBefore , getBody ( callUri ( "Employees('2')" ) ) ) |
testGetAllMembersWithCircleDependency ( ) { org . eclipse . smarthome . core . items . GroupItem rootGroupItem = new org . eclipse . smarthome . core . items . GroupItem ( "root" ) ; rootGroupItem . addMember ( new org . eclipse . smarthome . core . items . TestItem ( "member1" ) ) ; rootGroupItem . addMember ( new org... | org . junit . Assert . assertThat ( rootGroupItem . getAllMembers ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( 3 ) ) |
GetDiagnosisRIVSuccessTest ( ) { riv . clinicalprocess . healthcond . description . getdiagnosisresponder . _2 . GetDiagnosisResponseType response = getDiagnosisServices . getDiagnosis ( se . skl . skltpservices . npoadapter . test . integration . EndToEndIntegrationTest . LOGICAL_ADDRESS_VS_2 , se . skl . skltpservice... | org . junit . Assert . assertFalse ( response . getDiagnosis ( ) . isEmpty ( ) ) |
shouldConvertLongToDoubleCorrectly ( ) { final java . lang . Double d = io . confluent . ksql . serde . util . SerdeUtils . toDouble ( 1L ) ; "<AssertPlaceHolder>" ; } toDouble ( java . lang . Object ) { java . util . Objects . requireNonNull ( object , "Object<sp>cannot<sp>be<sp>null" ) ; if ( object instanceof java .... | org . junit . Assert . assertThat ( d , org . hamcrest . CoreMatchers . equalTo ( 1.0 ) ) |
testCreateTextMessage ( ) { org . apache . qpid . jms . JmsSession session = ( ( org . apache . qpid . jms . JmsSession ) ( connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ) ) ; "<AssertPlaceHolder>" ; } createTextMessage ( ) { try { return getSession ( ) . createTextMessage ( ) ; } catch ( javax . jm... | org . junit . Assert . assertNotNull ( session . createTextMessage ( ) ) |
shouldOpenWithFactoryViaConcreteInterface ( ) { final org . apache . commons . configuration . Configuration conf = new org . apache . commons . configuration . BaseConfiguration ( ) ; conf . setProperty ( Graph . GRAPH , org . apache . tinkerpop . gremlin . structure . util . GraphFactoryTest . MockGraphInterface . cl... | org . junit . Assert . assertEquals ( conf , g . getConf ( ) ) |
testMergeJoinExprInCondition ( ) { final org . apache . drill . exec . server . RemoteServiceSet serviceSet = org . apache . drill . exec . server . RemoteServiceSet . getLocalServiceSet ( ) ; try ( final org . apache . drill . exec . server . Drillbit bit1 = new org . apache . drill . exec . server . Drillbit ( CONFIG... | org . junit . Assert . assertEquals ( 10 , count ) |
testFixedDelaySchedule ( ) { java . util . concurrent . atomic . AtomicInteger i = new java . util . concurrent . atomic . AtomicInteger ( ) ; org . apache . accumulo . server . util . time . SimpleTimerTest . Incrementer r = new org . apache . accumulo . server . util . time . SimpleTimerTest . Incrementer ( i ) ; t .... | org . junit . Assert . assertEquals ( 3 , i . get ( ) ) |
testRemove2Arg_incompatible_types ( ) { map . put ( 123 , "abc" ) ; boolean v = map . remove ( 123 , 123 ) ; "<AssertPlaceHolder>" ; } remove ( K , V ) { return cache . remove ( passingKeyTransformer . compact ( key ) , valueTransformer . compact ( oldValue ) ) ; } | org . junit . Assert . assertFalse ( v ) |
testAddTreatment ( ) { final io . rtr . alchemy . models . Treatment treatment = new io . rtr . alchemy . models . Treatment ( "bar" ) ; final io . rtr . alchemy . models . Experiment experiment = new io . rtr . alchemy . models . Experiment ( null , "foo" ) . addTreatment ( "bar" ) ; "<AssertPlaceHolder>" ; } getTreat... | org . junit . Assert . assertEquals ( treatment , experiment . getTreatments ( ) . iterator ( ) . next ( ) ) |
testDefaultStrategy ( ) { com . orientechnologies . orient . core . record . impl . ODocument rootDoc = new com . orientechnologies . orient . core . record . impl . ODocument ( ) . field ( "name" , "Jay" ) . save ( database . getClusterNameById ( database . getDefaultClusterId ( ) ) ) ; com . orientechnologies . orien... | org . junit . Assert . assertTrue ( false ) |
testSignedEncryptedTokenBadSigningKey ( ) { java . security . KeyPairGenerator keyGen = java . security . KeyPairGenerator . getInstance ( "RSA" ) ; java . security . KeyPair keyPair = keyGen . generateKeyPair ( ) ; java . security . PublicKey publicKey ; try ( java . io . InputStream is = org . apache . kerby . kerber... | org . junit . Assert . assertTrue ( ( ex instanceof org . apache . kerby . kerberos . kerb . KrbException ) ) |
test ( ) { hivemall . tools . array . FirstElementUDF udf = new hivemall . tools . array . FirstElementUDF ( ) ; udf . initialize ( new org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector [ ] { org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspectorFactory . getStandardListObject... | org . junit . Assert . assertEquals ( hivemall . utils . hadoop . WritableUtils . val ( 0.0 ) , udf . evaluate ( args ) ) |
testSimpleResponse ( ) { final org . opendaylight . aaa . shiro . realm . util . http . SimpleHttpRequest . Builder < javax . ws . rs . core . Response > builder = org . opendaylight . aaa . shiro . realm . util . http . SimpleHttpClient . clientBuilder ( ) . hostnameVerifier ( org . opendaylight . aaa . shiro . realm ... | org . junit . Assert . assertThat ( response . getStatus ( ) , org . hamcrest . Matchers . is ( 200 ) ) |
testFindTodoList ( ) { todoList . getUsers ( ) . add ( user ) ; user . getTodoLists ( ) . add ( todoList ) ; expect ( em . find ( tudu . domain . TodoList . class , "001" ) ) . andReturn ( todoList ) ; expect ( userService . getCurrentUser ( ) ) . andReturn ( user ) ; replay ( ) ; try { tudu . domain . TodoList testTod... | org . junit . Assert . assertEquals ( todoList , testTodoList ) |
testGetFolderIterator_03 ( ) { java . util . Set < org . eclipse . emf . common . util . URI > containedURIs = com . google . common . collect . Sets . newHashSet ( getWorkspace ( ) . getFolderIterator ( myProjectURI . appendSegments ( new java . lang . String [ ] { "src" , "sub" } ) ) ) ; java . util . Set < org . ecl... | org . junit . Assert . assertEquals ( expectation , containedURIs ) |
testRemoveConfigTypes ( ) { org . apache . ambari . server . topology . Configuration configuration = createConfigurationWithParents_PropsOnly ( ) ; configuration . removeConfigType ( "type1" ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return new java . util . Properties ( properties ) ; } | org . junit . Assert . assertNull ( configuration . getProperties ( ) . get ( "type1" ) ) |
testAskResponse ( ) { redis . clients . jedis . tests . Set < redis . clients . jedis . tests . HostAndPort > jedisClusterNode = new redis . clients . jedis . tests . HashSet < redis . clients . jedis . tests . HostAndPort > ( ) ; jedisClusterNode . add ( new redis . clients . jedis . tests . HostAndPort ( "127.0.0.1" ... | org . junit . Assert . assertEquals ( "foo" , jc . get ( "51" ) ) |
testFrom ( ) { final org . immutables . vavr . examples . ImmutableExampleOptionType . Builder b = org . immutables . vavr . examples . ImmutableExampleOptionType . builder ( ) ; b . optionalInteger ( io . vavr . control . Option . of ( java . lang . Integer . valueOf ( 23 ) ) ) ; final org . immutables . vavr . exampl... | org . junit . Assert . assertEquals ( io . vavr . control . Option . of ( java . lang . Integer . valueOf ( 23 ) ) , a0 . optionalInteger ( ) ) |
shouldMatchMultiValueStrings ( ) { given ( commandProcessor . getStringArray ( anyString ( ) , isA ( java . lang . String [ ] . class ) ) ) . willReturn ( new java . lang . String [ ] { "Suite" , "Test" , "Normal" } ) ; final boolean result = seleniumDriverFixture . doOnWith ( "verifySelectOptions" , "//foo" , "Suite,T... | org . junit . Assert . assertThat ( result , org . hamcrest . Matchers . is ( true ) ) |
givenMultiThread_whenMethodSync ( ) { java . util . concurrent . ExecutorService service = java . util . concurrent . Executors . newFixedThreadPool ( 3 ) ; com . baeldung . concurrent . synchronize . BaeldungSynchronizedMethods method = new com . baeldung . concurrent . synchronize . BaeldungSynchronizedMethods ( ) ; ... | org . junit . Assert . assertEquals ( 1000 , method . getSyncSum ( ) ) |
testFwdBridging ( ) { org . onosproject . net . flowobjective . FilteringObjective filteringObjective = buildFilteringObjective ( null ) ; org . onosproject . pipelines . fabric . pipeliner . ObjectiveTranslation actualTranslation = translator . translate ( filteringObjective ) ; org . onosproject . net . flow . FlowRu... | org . junit . Assert . assertEquals ( expectedTranslation , actualTranslation ) |
quantileWithOneSampleShouldReturnThatSample ( ) { impl . addSample ( 42 ) ; "<AssertPlaceHolder>" ; } getPercentile ( int ) { return getPercentile ( requestedPercentile , new java . util . ArrayList < java . lang . Double > ( cslm . values ( ) ) ) ; } | org . junit . Assert . assertEquals ( 42 , impl . getPercentile ( 50 ) ) |
RgroupSymbol2A ( ) { org . openscience . cdk . renderer . generators . standard . AtomSymbol atomSymbol = atomGenerator . generatePseudoSymbol ( "R2a" , HydrogenPosition . Right ) ; java . util . List < java . awt . Shape > shapes = atomSymbol . getOutlines ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells... | org . junit . Assert . assertThat ( shapes . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
testFindGreaterOrEqualNullFromEmptyTree ( ) { org . apache . directory . server . core . avltree . ArrayTree < java . lang . Integer > tree = createTree ( ) ; "<AssertPlaceHolder>" ; } findGreaterOrEqual ( K ) { if ( ( key != null ) && ( ( comparator . compare ( key , singleton . key ) ) <= 0 ) ) { return singleton ; }... | org . junit . Assert . assertNull ( tree . findGreaterOrEqual ( null ) ) |
testPathTo_Int_Spiroundecane ( ) { org . openscience . cdk . interfaces . IAtomContainer spiroundecane = org . openscience . cdk . graph . ShortestPathsTest . spiroundecane ( ) ; org . openscience . cdk . graph . ShortestPaths paths = new org . openscience . cdk . graph . ShortestPaths ( spiroundecane , spiroundecane .... | org . junit . Assert . assertArrayEquals ( new int [ ] { 1 , 0 , 5 , 4 , 6 , 10 , 9 } , paths . pathTo ( 9 ) ) |
testGeneratePasswordFromPassPhrase ( ) { final java . lang . String algorithm = ALGORITHM_OTP_SHA1 ; org . wildfly . security . password . PasswordFactory passwordFactory = org . wildfly . security . password . PasswordFactory . getInstance ( algorithm ) ; final org . wildfly . security . password . Password password =... | org . junit . Assert . assertTrue ( password . equals ( generatedOTPassword ) ) |
betweenTwo ( ) { set . set ( 4 ) ; set . set ( 8 ) ; final int ret = set . previousSetBit ( 5 ) ; "<AssertPlaceHolder>" ; } previousSetBit ( int ) { if ( i < 0 ) { if ( i == ( - 1 ) ) return - 1 ; throw new java . lang . IndexOutOfBoundsException ( ( "i=" + i ) ) ; } final long [ ] [ ] [ ] bits = this . bits ; final in... | org . junit . Assert . assertEquals ( 4 , ret ) |
shouldConvert ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "creditCard.holder.name" 1 , "street" 7 ) ; put ( "credit... | org . junit . Assert . assertEquals ( expectedMap , map ) |
testAccept ( ) { com . thoughtworks . qdox . model . expression . ExpressionVisitor visitor = mock ( com . thoughtworks . qdox . model . expression . ExpressionVisitor . class ) ; com . thoughtworks . qdox . model . expression . ParenExpression expr = new com . thoughtworks . qdox . model . expression . ParenExpression... | org . junit . Assert . assertSame ( expr . accept ( visitor ) , visitResult ) |
testStagedCombinationOfDot2 ( ) { org . apache . taverna . scufl2 . api . core . Processor p = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyStack iss = new org . apache . taverna . scufl2 . api . iterationstrategy . Itera... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , sv . calculateResultWrappingDepth ( tempDepths ) ) |
test42_algext ( ) { cc . redberry . rings . poly . univar . UnivariatePolynomial < cc . redberry . rings . Rational < cc . redberry . rings . bigint . BigInteger > > minimalPoly = cc . redberry . rings . poly . univar . UnivariatePolynomial . create ( ( - 2 ) , 0 , 0 , 0 , 0 , 0 , 5 ) . mapCoefficients ( cc . redberry ... | org . junit . Assert . assertEquals ( mod , half ) |
testGetCompileClassDependenciesWithoutResAndSrc ( ) { final org . oscm . build . ant . PathBuilderTest . ProjectStub projectA = new org . oscm . build . ant . PathBuilderTest . ProjectStub ( "project-a" ) ; final org . oscm . build . ant . PathBuilderTest . ProjectStub projectB = new org . oscm . build . ant . PathBuil... | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , java . util . Arrays . asList ( path . list ( ) ) ) |
isStringWithLowerCaseGreaterThanWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.id<sp>in<sp>(select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>lower(sub.stringAttribute)<sp>><sp>'just<sp>a<sp>string<sp>02... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) ) |
testUnion1 ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "DEPT" ) . project ( builder . field ( "DEPTNO" )... | org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) ) |
batchIterable_forEachEntry_emptySet ( ) { com . gs . collections . impl . math . Sum sum = new com . gs . collections . impl . math . IntegerSum ( 0 ) ; com . gs . collections . impl . parallel . BatchIterable < Map . Entry < java . lang . Integer , java . lang . Integer > > empty = ( ( com . gs . collections . impl . ... | org . junit . Assert . assertEquals ( 0 , sum . getValue ( ) ) |
testDEP ( ) { edu . emory . clir . clearnlp . reader . TSVReader reader = new edu . emory . clir . clearnlp . reader . TSVReader ( 0 , 1 , 2 , 3 , 4 , 5 , 6 ) ; reader . open ( new java . io . FileInputStream ( "src/test/resources/dependency/dependency.cnlp" ) ) ; edu . emory . clir . clearnlp . dependency . DEPTree tr... | org . junit . Assert . assertEquals ( str , tree . toString ( DEPNode :: toStringDEP ) ) |
collectTwo ( ) { io . trane . future . Future < java . util . List < java . lang . Integer > > future = io . trane . future . Future . collect ( java . util . Arrays . asList ( io . trane . future . Future . value ( 1 ) , io . trane . future . Future . value ( 2 ) ) ) ; java . lang . Integer [ ] expected = new java . l... | org . junit . Assert . assertArrayEquals ( expected , get ( future ) . toArray ( ) ) |
testFalseGeenNaamVerzoekEnVerschillendGeslacht ( ) { setup ( false , true ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; final nl . bzk .... | org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) ) |
testHdfsWithNoRangerKmsServer ( ) { expect ( stack . getCardinality ( "NAMENODE" ) ) . andReturn ( new org . apache . ambari . server . topology . Cardinality ( "1-2" ) ) . anyTimes ( ) ; expect ( stack . getCardinality ( "DATANODE" ) ) . andReturn ( new org . apache . ambari . server . topology . Cardinality ( "group1... | org . junit . Assert . assertEquals ( "leave_untouched" , clusterConfig . getPropertyValue ( configType , "group1" 1 ) ) |
testParseInputStream ( ) { org . apache . avro . Schema s = new org . apache . avro . Schema . Parser ( ) . parse ( new java . io . ByteArrayInputStream ( "\"boolean\"" . getBytes ( StandardCharsets . UTF_8 ) ) ) ; "<AssertPlaceHolder>" ; } parse ( java . io . InputStream ) { try { org . apache . avro . io . BinaryDeco... | org . junit . Assert . assertEquals ( new org . apache . avro . Schema . Parser ( ) . parse ( "\"boolean\"" ) , s ) |
testFindAll ( ) { java . util . List < com . hantsylab . example . ee7 . blog . domain . model . User > foundUsers = users . findAll ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 1 , foundUsers . size ( ) ) |
testAppName_acceptsNullArgument ( ) { org . eclipse . swt . widgets . Display . setAppName ( null ) ; "<AssertPlaceHolder>" ; } getAppName ( ) { org . eclipse . rap . rwt . service . UISession session = org . eclipse . rap . rwt . internal . service . ContextProvider . getUISession ( ) ; return ( ( java . lang . String... | org . junit . Assert . assertNull ( org . eclipse . swt . widgets . Display . getAppName ( ) ) |
sqlQueryTestNoParam ( ) { java . util . List < java . util . Map < java . lang . String , java . lang . Object > > actual = jp . co . future . uroborosql . sample . SqlAgentSampleTest . app . query ( "example/select_test" ) ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > expec... | org . junit . Assert . assertEquals ( toString ( expected ) , toString ( actual ) ) |
testShouldFindChildrenByClassName ( ) { driver . get ( pages . nestedPage ) ; org . openqa . selenium . WebElement parent = driver . findElement ( org . openqa . selenium . By . name ( "classes" ) ) ; java . util . List < org . openqa . selenium . WebElement > elements = parent . findElements ( org . openqa . selenium ... | org . junit . Assert . assertEquals ( 2 , elements . size ( ) ) |
shouldChangeStartDate ( ) { java . time . LocalDate date = entry . getStartDate ( ) . plusDays ( 1 ) ; entry . changeStartDate ( date ) ; "<AssertPlaceHolder>" ; } getStartDate ( ) { return startDate . get ( ) ; } | org . junit . Assert . assertThat ( entry . getStartDate ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( date ) ) ) |
indexOfId_freeformNewlyAddedItem_returnsFour ( ) { com . vaadin . v7 . data . util . sqlcontainer . SQLContainer container = new com . vaadin . v7 . data . util . sqlcontainer . SQLContainer ( new com . vaadin . v7 . data . util . sqlcontainer . query . FreeformQuery ( "SELECT<sp>*<sp>FROM<sp>people" , connectionPool ,... | org . junit . Assert . assertEquals ( 4 , container . indexOfId ( id ) ) |
testLoadWithDeps ( ) { java . lang . Module module = moduleLoader . loadModule ( org . jboss . modules . ModuleIdentifier . fromString ( "test.with-deps" ) ) ; "<AssertPlaceHolder>" ; } fromString ( java . lang . String ) { if ( moduleSpec == null ) { throw new java . lang . IllegalArgumentException ( "Module<sp>specif... | org . junit . Assert . assertNotNull ( module ) |
testFunctionWithMissingGenericsAndReturns ( ) { org . apache . flink . api . common . functions . RichMapFunction function = new org . apache . flink . api . common . functions . RichMapFunction ( ) { private static final long serialVersionUID = 1L ; @ org . apache . flink . api . java . Override public java . lang . O... | org . junit . Assert . assertEquals ( Types . STRING , info ) |
configTest1 ( ) { com . navercorp . pinpoint . plugin . resttemplate . RestTemplateConfig config = createRestTemplateConfig ( "true" ) ; "<AssertPlaceHolder>" ; } isPluginEnable ( ) { return pluginEnable ; } | org . junit . Assert . assertTrue ( config . isPluginEnable ( ) ) |
getListeners ( ) { java . util . Set < java . lang . Object > expected = java . util . Collections . singleton ( new java . lang . Object ( ) ) ; when ( this . manager . getListeners ( ) ) . thenReturn ( expected ) ; java . util . Set < java . lang . Object > result = this . subject . getListeners ( ) ; "<AssertPlaceHo... | org . junit . Assert . assertSame ( expected , result ) |
testGetRows ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray testAssertion = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] [ ] { new double [ ] { 5 , 8 } , new do... | org . junit . Assert . assertEquals ( testAssertion , test ) |
bindInstanceFields_automatically_binds_incomplete_forMemberField_bindings ( ) { com . vaadin . data . Binder < com . vaadin . data . BeanBinderTest . TestBean > otherBinder = new com . vaadin . data . Binder ( com . vaadin . data . BeanBinderTest . TestBean . class ) ; com . vaadin . data . BeanBinderTest . TestClass t... | org . junit . Assert . assertEquals ( 50 , bean . number ) |
maxLenTester ( ) { java . lang . StackTraceElement bTop = java . lang . Thread . currentThread ( ) . getStackTrace ( ) [ 1 ] ; ODLCapwapMessage msg = null ; ODLCapwapMessage n = null ; msg = new ODLCapwapMessage ( ) ; MaxMsgLength l = new MaxMsgLength ( ) ; l . setMaxLength ( 32000 ) ; msg . ctrlMsg . addMessageElement... | org . junit . Assert . assertEquals ( msg , n ) |
useQualifiedFragmentUserRepo ( ) { org . springframework . data . jpa . repository . cdi . RepositoryConsumer repositoryConsumer = org . springframework . data . jpa . repository . cdi . CdiExtensionIntegrationTests . container . select ( org . springframework . data . jpa . repository . cdi . RepositoryConsumer . clas... | org . junit . Assert . assertThat ( repositoryConsumer . returnOneUserDB ( ) , is ( 1 ) ) |
testBuildWithParametersAndDisabledDefaultConstraintWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String abbrName = "abbr<sp>name" ; java . lang . String name = "name" ; org . lnu . is . domain . course . type . CourseType context = new org . lnu . is . domain . course . typ... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
testThatAProjectIsProperlyMarshalled ( ) { info . novatec . testit . livingdoc . server . domain . Project project = info . novatec . testit . livingdoc . server . domain . Project . newInstance ( "PROJECT-1" ) ; info . novatec . testit . livingdoc . server . domain . List < java . lang . Object > params = new info . n... | org . junit . Assert . assertEquals ( params , project . marshallize ( ) ) |
testCoerceToType04 ( ) { java . lang . Object result = javax . el . ELManager . getExpressionFactory ( ) . coerceToType ( null , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } coerceToType ( java . lang . Class , java . lang . String ) { if ( type . equals ( java . lang . String . class ) ) { return value ;... | org . junit . Assert . assertEquals ( "" , result ) |
testSimpleWithDecimals ( ) { org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D c = new org . apache . commons . math4 . geometry . euclidean . threed . Cartesian3D ( 1.23 , 1.43 , 1.63 ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>1" ) + ( getDec... | org . junit . Assert . assertEquals ( expected , actual ) |
multipleRulesAreRun ( ) { org . junit . rules . TestRuleTest . runCount = 0 ; org . junit . runner . JUnitCore . runClasses ( org . junit . rules . TestRuleTest . MultipleRuleTest . class ) ; "<AssertPlaceHolder>" ; } runClasses ( java . lang . Class [ ] ) { return org . junit . runner . JUnitCore . runClasses ( org . ... | org . junit . Assert . assertEquals ( 2 , org . junit . rules . TestRuleTest . runCount ) |
testLockAndLoadSingleEntityByClassAndIdRefresh ( ) { org . candlepin . model . Owner owner = this . createOwner ( "owner_key-1" , "owner-1" ) ; org . candlepin . model . Owner output = this . testOwnerCurator . lockAndLoadById ( org . candlepin . model . Owner . class , owner . getId ( ) ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertEquals ( owner , output ) |
testGetDateWithNull ( ) { final java . lang . String date = org . appfuse . util . DateUtil . getDate ( null ) ; "<AssertPlaceHolder>" ; } getDate ( java . util . Date ) { java . text . SimpleDateFormat df ; java . lang . String returnValue = "" ; if ( aDate != null ) { df = new java . text . SimpleDateFormat ( org . a... | org . junit . Assert . assertEquals ( "" , date ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.