input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetIntLE ( ) { for ( int i = 0 ; i < ( ( bytes . length ) - 3 ) ; i ++ ) { int expected = byteBufferLE . getInt ( i ) ; int value = primitiveArrayUtils . getIntLE ( bytes , i ) ; "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertEquals ( expected , value ) |
testTotalItems ( ) { int totalItems = com . liferay . talend . runtime . apio . jsonld . ApioResourceCollectionTest . _apioJsonLDResource . getTotalItems ( ) ; "<AssertPlaceHolder>" ; } getTotalItems ( ) { java . util . List < com . liferay . adaptive . media . image . configuration . AMImageConfigurationEntry > select... | org . junit . Assert . assertThat ( totalItems , org . hamcrest . CoreMatchers . equalTo ( 10 ) ) |
testToCollectionWithResultsBag ( ) { org . apache . geode . cache . query . internal . ResultsBag mockResultsBag = org . mockito . Mockito . mock ( org . apache . geode . cache . query . internal . ResultsBag . class , "testToCollectionWithResultsBag.ResultsBag" ) ; java . util . List < java . lang . String > expectedL... | org . junit . Assert . assertSame ( expectedList , actualList ) |
testGetIdentifiable ( ) { unwrap ( service . put ( "key" , "value" ) ) ; com . google . appengine . api . memcache . MemcacheService . IdentifiableValue identifiable = unwrap ( service . getIdentifiable ( "key" ) ) ; "<AssertPlaceHolder>" ; } unwrap ( java . util . concurrent . Future ) { try { return f . get ( ) ; } c... | org . junit . Assert . assertEquals ( "value" , identifiable . getValue ( ) ) |
testMinWithRangeBeginningEarlierThanTable ( ) { int TIME_BASELINE = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 9 , 23 , 0 , 0 ) . getTime ( ) . getTime ( ) ) / 1000 ) ) ; int TIME_LIMIT = ( ( int ) ( ( new java . util . GregorianCalendar ( 2014 , 10 , 10 , 2 , 0 , 0 ) . getTime ( ) . getTime ( ) ) ... | org . junit . Assert . assertEquals ( results , minimum ) |
shouldDecodeCommonFlagsLong ( ) { com . couchbase . client . deps . io . netty . buffer . ByteBuf content = com . couchbase . client . deps . io . netty . buffer . Unpooled . copiedBuffer ( "9223372036854775807" , CharsetUtil . UTF_8 ) ; com . couchbase . client . java . document . JsonLongDocument decoded = converter ... | org . junit . Assert . assertEquals ( Long . MAX_VALUE , ( ( long ) ( decoded . content ( ) ) ) ) |
testGetGeometryMetadata ( ) { System . out . println ( ( ( ( com . telefonica . iot . cygnus . utils . CommonUtilsForTests . getTestTraceHead ( "[Utils.getLocation]" ) ) + "--------<sp>When<sp>getting<sp>a<sp>geometry,<sp>a<sp>CartoDB<sp>point<sp>is<sp>obtained<sp>when<sp>passing<sp>an<sp>attribute<sp>" ) + "ST_SetSRID... | org . junit . Assert . assertEquals ( "ST_SetSRID(ST_MakePoint(-3.7167,40.3833),<sp>4326)" , geometry . getLeft ( ) ) |
simulator_runs_until_all_stories_are_finished ( ) { com . bigvisible . kanbansimulator . Simulator stimuator = new com . bigvisible . kanbansimulator . SimulatorEngine ( ) ; stimuator . addStories ( 88 ) ; stimuator . run ( null ) ; "<AssertPlaceHolder>" ; } getStoriesCompleted ( ) { return storiesCompleted ; } | org . junit . Assert . assertEquals ( 88 , stimuator . getStoriesCompleted ( ) ) |
convertNullResultReturnsNull ( ) { org . codehaus . jettison . json . JSONArray results = this . converterNotPaged . convert ( null ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . Object ) { if ( object == null ) { return null ; } else if ( ( ( object instanceof java . lang . String ) || ( object instanceof java ... | org . junit . Assert . assertNull ( results ) |
testGetCurrentListeners ( ) { final com . ctrip . platform . dal . dao . client . DalHints hints = new com . ctrip . platform . dal . dao . client . DalHints ( ) ; final com . ctrip . platform . dal . dao . client . DalTransactionListener testListener = new com . ctrip . platform . dal . dao . client . DalTransactionLi... | org . junit . Assert . assertEquals ( 2 , com . ctrip . platform . dal . dao . client . DalTransactionManager . getCurrentListeners ( ) . size ( ) ) |
values_returnsSingletonCollectionWithInstance ( ) { com . amazonaws . services . dynamodbv2 . util . LockClientUtils [ ] values = new com . amazonaws . services . dynamodbv2 . util . LockClientUtils [ ] { LockClientUtils . INSTANCE } ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( values , com . amazonaws . services . dynamodbv2 . util . LockClientUtils . values ( ) ) |
testLoadGoTaxon ( ) { owltools . io . ParserWrapper pw = new owltools . io . ParserWrapper ( ) ; pw . addIRIMapper ( new owltools . io . CatalogXmlIRIMapper ( owltools . solrj . GoLoaderIntegrationRunner . catalogXml ) ) ; owltools . graph . OWLGraphWrapper g = pw . parseToOWLGraph ( owltools . solrj . GoLoaderIntegrat... | org . junit . Assert . assertTrue ( ( ( owltools . solrj . GoLoaderIntegrationRunner . solrCounter ) > 0 ) ) |
unmarshall_json_to_list_with_jackson ( ) { com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; java . util . List < com . levelup . java . json . JsontoJavaObject . Plane > planes = objectMapper . readValue ( ARRAY_AS_JSON , objectMapper . get... | org . junit . Assert . assertEquals ( 5 , planes . size ( ) ) |
simple ( ) { put ( 100 ) ; put ( 300 ) ; put ( 200 ) ; put ( 400 ) ; com . asakusafw . utils . io . Source < org . apache . hadoop . io . IntWritable > results = sort ( ) ; check ( results , 100 ) ; check ( results , 200 ) ; check ( results , 300 ) ; check ( results , 400 ) ; "<AssertPlaceHolder>" ; } next ( ) { try { ... | org . junit . Assert . assertThat ( results . next ( ) , is ( false ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . journal . model . JournalArticleResource newJournalArticleResource = addJournalArticleResource ( ) ; com . liferay . journal . model . JournalArticleResource existingJournalArticleResource = _persistence . fetchByPrimaryKey ( newJournalArticleResource . getPrimaryKey ... | org . junit . Assert . assertEquals ( existingJournalArticleResource , newJournalArticleResource ) |
getSetId ( ) { java . lang . String expected = "expectedId" ; com . microsoft . windowsazure . services . media . models . AccessPolicyInfo policy = new com . microsoft . windowsazure . services . media . models . AccessPolicyInfo ( null , new com . microsoft . windowsazure . services . media . implementation . content... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetCurrentQueryCount ( ) { org . apache . blur . user . UserContext . setUser ( new org . apache . blur . user . User ( "testUser" , null ) ) ; org . apache . blur . thrift . generated . Blur . Iface client = org . apache . blur . console . util . Config . getClient ( ) ; org . apache . blur . thrift . generated . ... | org . junit . Assert . assertEquals ( ( currentCount + 1 ) , org . apache . blur . console . util . QueryUtil . getCurrentQueryCount ( ) ) |
testOrderByOnValues ( ) { com . splicemachine . derby . impl . sql . execute . operations . List < java . lang . Object [ ] > expected = com . splicemachine . derby . impl . sql . execute . operations . Arrays . asList ( o ( 0 , 0 , 1 ) , o ( 0 , 1 , 0 ) , o ( 1 , 0 , 0 ) , o ( 1 , 0 , 1 ) ) ; java . sql . ResultSet rs... | org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , result . toArray ( ) ) |
onlyDays ( ) { java . util . Calendar cal = java . util . Calendar . getInstance ( ) ; cal . add ( Calendar . DATE , ( - 3 ) ) ; int expected = cal . get ( Calendar . DATE ) ; java . util . Date from = org . candlepin . resource . util . ResourceDateParser . getFromDate ( null , null , "3" ) ; cal . setTime ( from ) ; ... | org . junit . Assert . assertEquals ( expected , cal . get ( Calendar . DATE ) ) |
entrySet_toArray ( ) { com . gs . collections . api . map . MutableMap < java . lang . Integer , java . lang . String > map = this . newMapWithKeyValue ( 1 , "One" ) ; java . lang . Object [ ] entries = map . entrySet ( ) . toArray ( ) ; "<AssertPlaceHolder>" ; } of ( T1 , T2 ) { return new com . gs . collections . imp... | org . junit . Assert . assertArrayEquals ( new java . util . Map . Entry [ ] { com . gs . collections . impl . tuple . ImmutableEntry . of ( 1 , "One" ) } , entries ) |
testLocalUserFallThrough ( ) { org . sakaiproject . user . api . User user = userDirectoryService . addUser ( null , "local" , null , null , null , "localPW" , null , null ) ; org . sakaiproject . user . api . User authUser = userDirectoryService . authenticate ( "local" , "localPW" ) ; "<AssertPlaceHolder>" ; } getId ... | org . junit . Assert . assertTrue ( authUser . getId ( ) . equals ( user . getId ( ) ) ) |
testHashSetMode ( ) { final int numMemSegments = needNumMemSegments ( org . apache . flink . table . runtime . aggregate . BytesHashMapTest . NUM_ENTRIES , rowLength ( new org . apache . flink . table . type . RowType ( valueTypes ) ) , rowLength ( new org . apache . flink . table . type . RowType ( keyTypes ) ) , org ... | org . junit . Assert . assertTrue ( table . isHashSetMode ( ) ) |
testAddQuotesIfNotExist_Case_1 ( ) { java . lang . String input = null ; java . lang . String output = org . talend . core . utils . TalendQuoteUtils . addQuotesIfNotExist ( input , org . talend . core . utils . TalendQuoteUtilsTest . QUOTES ) ; "<AssertPlaceHolder>" ; } addQuotesIfNotExist ( java . lang . String , jav... | org . junit . Assert . assertTrue ( ( output == null ) ) |
terminateSubscription_Broker_NotAuthorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "terminateSubscription" , org . oscm . internal . vo . VOSubscription . class , java . lang . String . class ) ; boolean isBrokerRoleAllowed = isRoleAllowed ( method , UserRoleType . BROKER_MANAGER ) ; "<Ass... | org . junit . Assert . assertFalse ( isBrokerRoleAllowed ) |
getLastUpdatedTimeDateGets ( ) { final java . util . Date actualLastUpdatedTimeDate = new java . util . Date ( ) ; com . microsoft . azure . sdk . iot . service . FileUploadNotification testFileUploadNotification = new com . microsoft . azure . sdk . iot . service . FileUploadNotification ( mockDeviceId , mockBlobUri ,... | org . junit . Assert . assertEquals ( testLastUpdatedTimeDate , actualLastUpdatedTimeDate ) |
testOperator_equalsNullNumber ( ) { java . lang . Number x = null ; java . lang . Number y = 123 ; boolean resutl = org . eclipse . smarthome . model . script . lib . NumberExtensions . operator_equals ( x , y ) ; "<AssertPlaceHolder>" ; } operator_equals ( java . lang . Number , java . lang . Number ) { if ( org . ecl... | org . junit . Assert . assertFalse ( resutl ) |
testGetSelectionEnabled_Initial ( ) { "<AssertPlaceHolder>" ; } getSelectionEnabled ( ) { checkWidget ( ) ; return selectionEnabled ; } | org . junit . Assert . assertTrue ( grid . getSelectionEnabled ( ) ) |
testAccessToken_UsesAgentIdentities ( ) { final com . spotify . sshagentproxy . AgentProxy proxy = mock ( com . spotify . sshagentproxy . AgentProxy . class ) ; final com . spotify . sshagentproxy . Identity identity = mockIdentity ( ) ; final com . spotify . helios . client . AuthenticatingHttpConnector authConnector ... | org . junit . Assert . assertSame ( returnedConnection , connection ) |
testPread ( ) { org . apache . hadoop . fs . Path zonePath = new org . apache . hadoop . fs . Path ( "/TestEncryptionZone" ) ; fsWrapper . mkdir ( zonePath , org . apache . hadoop . fs . permission . FsPermission . getDirDefault ( ) , false ) ; dfsAdmin . createEncryptionZone ( zonePath , TEST_KEY , org . apache . hado... | org . junit . Assert . assertEquals ( ( ( data [ i ] ) & 255 ) , in . read ( ) ) |
testReadWriteComponentType ( ) { java . io . InputStream is = getClass ( ) . getResourceAsStream ( "CalculatorImpl.componentType" ) ; org . apache . tuscany . sca . assembly . ComponentType componentType = ( ( org . apache . tuscany . sca . assembly . ComponentType ) ( org . apache . tuscany . sca . interfacedef . java... | org . junit . Assert . assertNotNull ( componentType ) |
serializable ( ) { model . setMySerializable ( new org . slim3 . datastore . model . MySerializable ( "aaa" ) ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . da... | org . junit . Assert . assertThat ( model2 . getMySerializable ( ) , org . hamcrest . CoreMatchers . is ( new org . slim3 . datastore . model . MySerializable ( "aaa" ) ) ) |
testTimestampMinusTimestampPositiveValues ( ) { java . lang . String sqlText = "values<sp>timestamp('2011-12-26',<sp>'17:13:30')<sp>-<sp>timestamp('2011-06-05',<sp>'05:06:00')" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . spliceClassWatcher . e... | org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
testNewInstance ( ) { org . pentaho . di . trans . steps . getxmldata . GetXMLDataStepAnalyzer analyzer = new org . pentaho . di . trans . steps . getxmldata . GetXMLDataStepAnalyzer ( ) ; "<AssertPlaceHolder>" ; } newInstance ( ) { return new org . pentaho . di . trans . steps . jsoninput . analyzer . JsonInputAnalyze... | org . junit . Assert . assertTrue ( analyzer . newInstance ( ) . getClass ( ) . equals ( org . pentaho . di . trans . steps . getxmldata . GetXMLDataStepAnalyzer . class ) ) |
readJSONReturnsNullWhenPassedEmptyJSONObject ( ) { "<AssertPlaceHolder>" ; } readJSON ( org . json . JSONObject ) { return null ; } | org . junit . Assert . assertNull ( this . component . readJSON ( new org . json . JSONObject ( ) ) ) |
testIsModal_Is_False_For_Non_Modal_Window ( ) { when ( window . isModal ( ) ) . thenReturn ( false ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance ... | org . junit . Assert . assertFalse ( windw . isModal ( ) ) |
testUncompressBytesThatDontNeedUncompressed ( ) { byte [ ] bytes = new byte [ ] { 5 , 16 , 16 } ; byte [ ] result = com . cedarsoftware . util . IOUtilities . uncompressBytes ( bytes ) ; "<AssertPlaceHolder>" ; } uncompressBytes ( byte [ ] ) { return com . cedarsoftware . util . IOUtilities . uncompressBytes ( bytes , ... | org . junit . Assert . assertSame ( bytes , result ) |
testEquals ( ) { com . github . jqudt . Unit unit1 = new com . github . jqudt . Unit ( ) ; java . net . URI resource1 = new java . net . URI ( "http://qudt.org/vocab/unit#Kelvin" ) ; unit1 . setResource ( resource1 ) ; com . github . jqudt . Unit unit2 = new com . github . jqudt . Unit ( ) ; java . net . URI resource2 ... | org . junit . Assert . assertEquals ( unit1 , unit2 ) |
testMixed ( ) { eu . infomas . annotation . FileIterator iter = new eu . infomas . annotation . FileIterator ( new java . io . File ( "./src/test/java/eu/infomas/util/TestSupport.java" ) , new java . io . File ( "./src/test/java/eu/infomas/annotation/" ) ) ; "<AssertPlaceHolder>" ; } countFiles ( eu . infomas . annotat... | org . junit . Assert . assertEquals ( 8 , countFiles ( iter ) ) |
testFindYoungestAgeOfWhoBoughtACarForMoreThan50000 ( ) { int ageIterative = Integer . MAX_VALUE ; for ( ch . lambdaj . demo . Sale sale : db . getSales ( ) ) { if ( ( sale . getCost ( ) ) > 50000.0 ) { int buyerAge = sale . getBuyer ( ) . getAge ( ) ; if ( buyerAge < ageIterative ) ageIterative = buyerAge ; } } int age... | org . junit . Assert . assertEquals ( age , ageIterative ) |
testProxy ( ) { org . jinstagram . auth . InstagramAuthService fixture = new org . jinstagram . auth . InstagramAuthService ( ) ; fixture . apiSecret ( "" ) ; fixture . callback ( "" ) ; fixture . scope ( "" ) ; fixture . proxy ( new java . net . Proxy ( java . net . Proxy . Type . DIRECT , new java . net . InetSocketA... | org . junit . Assert . assertNotNull ( result ) |
TestEmptyGet ( ) { java . util . List r = com . groupon . mapreduce . mongo . JobUtil . get ( m , "z" ) ; "<AssertPlaceHolder>" ; } get ( java . util . Map , java . lang . String ) { java . lang . String [ ] fields = path . split ( "\\." ) ; java . util . List found = new java . util . ArrayList ( ) ; com . groupon . m... | org . junit . Assert . assertEquals ( r . size ( ) , 0 ) |
testMultiPolygons ( ) { org . springframework . mock . web . MockHttpServletResponse resp = getAsServletResponse ( "wfs?request=GetFeature&version=1.1.0&typeName=MPolygons&outputFormat=dxf" ) ; java . lang . String sResponse = testBasicResult ( resp , "MPolygons" ) ; int pos = getGeometrySearchStart ( sResponse ) ; "<A... | org . junit . Assert . assertTrue ( ( pos != ( - 1 ) ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . portal . tools . service . builder . test . model . LocalizedEntryLocalization missingLocalizedEntryLocalization = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ... | org . junit . Assert . assertNull ( missingLocalizedEntryLocalization ) |
testGetAllDrugInfo_shouldReturnAllDrugInfoIncludingRetired ( ) { java . util . List < org . raxa . module . raxacore . DrugInfo > allDrugInfo = s . getAllDrugInfo ( true ) ; "<AssertPlaceHolder>" ; } getAllDrugInfo ( boolean ) { org . hibernate . Criteria criteria = sessionFactory . getCurrentSession ( ) . createCriter... | org . junit . Assert . assertEquals ( allDrugInfo . size ( ) , 3 ) |
test2 ( ) { introclassJava . median_68eb0bb0_000 mainClass = new introclassJava . median_68eb0bb0_000 ( ) ; java . lang . String expected = "Please<sp>enter<sp>3<sp>numbers<sp>separated<sp>by<sp>spaces<sp>><sp>6<sp>is<sp>the<sp>median" ; mainClass . scanner = new java . util . Scanner ( "2<sp>8<sp>6" ) ; mainClass . ex... | org . junit . Assert . assertEquals ( expected . replace ( "<sp>" , "" ) , out . replace ( "<sp>" , "" ) ) |
testNodeCommunicationTypeLengths ( ) { final int MAX_LENGTH_IN_DB = 10 ; for ( org . jumpmind . symmetric . model . NodeCommunication . CommunicationType communicationType : NodeCommunication . CommunicationType . values ( ) ) { java . lang . String msg = ( ( ( ( communicationType . name ( ) ) + "<sp>is<sp>too<sp>long<... | org . junit . Assert . assertTrue ( msg , ( ( communicationType . name ( ) . length ( ) ) <= MAX_LENGTH_IN_DB ) ) |
test_plus_Period_zero ( ) { java . time . LocalDate t = TEST_2007_07_15 . plus ( MockSimplePeriod . ZERO_DAYS ) ; "<AssertPlaceHolder>" ; } plus ( int ) { return compileOperation ( new org . apache . xpath . operations . Plus ( ) , opPos ) ; } | org . junit . Assert . assertSame ( t , TEST_2007_07_15 ) |
testDivisionByZeroB ( ) { java . util . Map < java . lang . String , java . lang . Double > values = new java . util . HashMap < java . lang . String , java . lang . Double > ( ) ; values . put ( "ifInOctets" , 200000.0 ) ; values . put ( "ifSpeed" , 0.0 ) ; values . put ( "ifHighSpeed" , 0.0 ) ; double value = wrapper... | org . junit . Assert . assertTrue ( ( value == 0.0 ) ) |
addAndRemoveOffers ( ) { fr . gouv . vitam . storage . engine . server . spi . DriverManager . addOfferToDriver ( fr . gouv . vitam . storage . engine . server . spi . DriverManagerTest . MON_MODULE_DRIVER_MON_DRIVER , fr . gouv . vitam . storage . engine . server . spi . DriverManagerTest . OFFER_3 ) ; fr . gouv . vit... | org . junit . Assert . assertNotNull ( driver ) |
iremove17 ( ) { org . roaringbitmap . buffer . MappeableContainer rc = new org . roaringbitmap . buffer . MappeableRunContainer ( ) ; rc . iadd ( 37543 , 65536 ) ; rc . iremove ( 9795 , 65536 ) ; "<AssertPlaceHolder>" ; } getCardinality ( ) { return ( ( int ) ( getLongCardinality ( ) ) ) ; } | org . junit . Assert . assertEquals ( rc . getCardinality ( ) , 0 ) |
test_parse_instantNoZone_Instant ( java . time . format . DateTimeFormatter , java . lang . String , java . time . Instant ) { java . time . temporal . TemporalAccessor actual = formatter . parse ( text ) ; "<AssertPlaceHolder>" ; } from ( java . time . temporal . TemporalAccessor ) { if ( temporal instanceof java . ti... | org . junit . Assert . assertEquals ( java . time . Instant . from ( actual ) , expected ) |
comments ( ) { "<AssertPlaceHolder>" ; } comments ( ) { org . junit . Assert . assertThat ( facebook . comments ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . CommentMethods . class ) ) ; } | org . junit . Assert . assertThat ( facebook . comments ( ) , org . hamcrest . CoreMatchers . instanceOf ( facebook4j . CommentMethods . class ) ) |
test_isSubgraphIsomorphism_true ( ) { com . pengyifan . commons . collections . graph . ExactSubgraphMatchingPredicateTest . Vertex a = new com . pengyifan . commons . collections . graph . ExactSubgraphMatchingPredicateTest . Vertex ( 1 , "a" ) ; com . pengyifan . commons . collections . graph . ExactSubgraphMatchingP... | org . junit . Assert . assertTrue ( esm . isSubgraphIsomorphism ( ) ) |
callCreateSchemas ( ) { java . util . List < org . apache . olingo . commons . api . edm . EdmSchema > schemas = edm . getSchemas ( ) ; "<AssertPlaceHolder>" ; } getSchemas ( ) { java . util . List < org . apache . olingo . commons . api . edm . provider . CsdlSchema > schemas = new java . util . ArrayList < org . apac... | org . junit . Assert . assertNotNull ( schemas ) |
testConvertWithOrderBy ( ) { org . lnu . is . domain . benefit . BenefitType context = new org . lnu . is . domain . benefit . BenefitType ( ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "name" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagi... | org . junit . Assert . assertEquals ( expected , actualQuery ) |
createsPrimitiveValue ( java . lang . Class , javax . ws . rs . core . MultivaluedMap , java . lang . String , java . lang . Object ) { org . everrest . core . impl . method . PrimitiveTypeProducer producer = new org . everrest . core . impl . method . PrimitiveTypeProducer ( primitiveTypeWrapper ) ; java . lang . Obje... | org . junit . Assert . assertEquals ( expected , result ) |
shouldHaveCommentForAllRootPathsInConfigurationData ( ) { java . util . Set < java . lang . String > rootPaths = java . util . Arrays . stream ( fr . xephi . authme . message . MessageKey . values ( ) ) . map ( ( key ) -> key . getKey ( ) . split ( "\\." ) [ 0 ] ) . collect ( java . util . stream . Collectors . toSet (... | org . junit . Assert . assertThat ( comments . keySet ( ) , org . hamcrest . Matchers . equalTo ( rootPaths ) ) |
testPingTCPPool ( ) { net . tomp2p . p2p . Peer sender = null ; net . tomp2p . p2p . Peer recv1 = null ; net . tomp2p . connection . ChannelCreator cc = null ; try { sender = new net . tomp2p . p2p . PeerBuilder ( new net . tomp2p . peers . Number160 ( "0x9876" ) ) . p2pId ( 55 ) . ports ( 2424 ) . start ( ) ; recv1 = ... | org . junit . Assert . assertTrue ( fr2 . isSuccess ( ) ) |
testNonTokenQop02 ( ) { java . lang . String header = "Digest<sp>qop=auth{" ; java . io . StringReader input = new java . io . StringReader ( header ) ; java . util . Map < java . lang . String , java . lang . String > result = org . apache . tomcat . util . http . parser . Authorization . parseAuthorizationDigest ( in... | org . junit . Assert . assertNull ( result ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . mobile . device . rules . model . MDRRule newMDRRule = addMDRRule ( ) ; com . liferay . mobile . device . rules . model . MDRRule existingMDRRule = _persistence . findByPrimaryKey ( newMDRRule . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return... | org . junit . Assert . assertEquals ( existingMDRRule , newMDRRule ) |
testDST ( ) { java . lang . String s1 = "2005-04-03<sp>02:01:00<sp>America/Los_Angeles" ; java . lang . String s2 = "2005-04-03<sp>03:01:00<sp>America/Los_Angeles" ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . apache . hadoop . hive . common . type . TimestampTZUtil . parse ( s , null ) ; } | org . junit . Assert . assertEquals ( org . apache . hadoop . hive . common . type . TimestampTZUtil . parse ( s1 ) , org . apache . hadoop . hive . common . type . TimestampTZUtil . parse ( s2 ) ) |
testReverse ( ) { org . stringtemplate . v4 . org . stringtemplate . v4 . ST e = new org . stringtemplate . v4 . org . stringtemplate . v4 . ST ( "<reverse(names);<sp>separator=\",<sp>\">" ) ; e . add ( "names" , "Ter" ) ; e . add ( "names" , "Tom" ) ; e . add ( "names" , "Sriram" ) ; java . lang . String expecting = "... | org . junit . Assert . assertEquals ( expecting , e . render ( ) ) |
shouldIgnoreUnknownNonPolicySettings ( ) { org . neo4j . kernel . configuration . ssl . SslPolicyConfigValidator validator = new org . neo4j . kernel . configuration . ssl . SslPolicyConfigValidator ( ) ; java . util . Map < java . lang . String , java . lang . String > originalParams = org . neo4j . kernel . configura... | org . junit . Assert . assertTrue ( validatedParams . isEmpty ( ) ) |
testCallLowHighWithResultSet ( ) { org . apache . ibatis . session . SqlSession sqlSession = org . apache . ibatis . submitted . sptests . SPTest . sqlSessionFactory . openSession ( ) ; try { org . apache . ibatis . submitted . sptests . SPMapper spMapper = sqlSession . getMapper ( org . apache . ibatis . submitted . s... | org . junit . Assert . assertEquals ( 1 , names . size ( ) ) |
testFetchByPrimaryKeyExisting ( ) { com . liferay . portal . workflow . kaleo . model . KaleoInstanceToken newKaleoInstanceToken = addKaleoInstanceToken ( ) ; com . liferay . portal . workflow . kaleo . model . KaleoInstanceToken existingKaleoInstanceToken = _persistence . fetchByPrimaryKey ( newKaleoInstanceToken . ge... | org . junit . Assert . assertEquals ( existingKaleoInstanceToken , newKaleoInstanceToken ) |
testComplexField ( ) { final java . lang . String expectedJson = org . apache . commons . io . IOUtils . toString ( this . getClass ( ) . getResource ( "map2-2" 5 ) , org . apache . commons . io . Charsets . UTF_8 ) ; java . io . StringWriter writer = new java . io . StringWriter ( ) ; com . streamsets . datacollector ... | org . junit . Assert . assertEquals ( expectedJson , writer . toString ( ) ) |
testAppendStringWithZeroCountToNullBuffer ( ) { buffer . appendString ( org . smpp . util . ByteBufferTest . ABC , 0 ) ; "<AssertPlaceHolder>" ; } getBuffer ( ) { return buffer ; } | org . junit . Assert . assertNull ( buffer . getBuffer ( ) ) |
rebaseWithFailedMerge ( ) { org . apache . jackrabbit . oak . spi . state . NodeBuilder rootBuilder = store . getRoot ( ) . builder ( ) ; rootBuilder . child ( "foo" ) ; org . apache . jackrabbit . oak . spi . state . NodeBuilder b = store . getRoot ( ) . builder ( ) ; b . child ( "bar" ) ; store . merge ( b , EmptyHoo... | org . junit . Assert . assertTrue ( root . hasChildNode ( "bar" ) ) |
doesTargetStorageSupportDiskOfferingTestDiskOfferingTagsEmptyAndStorageTagsNotEmpty ( ) { com . cloud . storage . DiskOfferingVO diskOfferingVoMock = org . mockito . Mockito . mock ( com . cloud . storage . DiskOfferingVO . class ) ; org . mockito . Mockito . doReturn ( "" ) . when ( diskOfferingVoMock ) . getTags ( ) ... | org . junit . Assert . assertTrue ( result ) |
testGetVirtualSizeWhenVirtualSizeThrowsException ( ) { final long virtualSize = 2000 ; final long actualSize = 1000 ; final java . io . File mockFile = org . mockito . Mockito . mock ( java . io . File . class ) ; org . mockito . Mockito . when ( mockFile . length ( ) ) . thenReturn ( actualSize ) ; org . mockito . Moc... | org . junit . Assert . assertEquals ( actualSize , this . processor . getVirtualSize ( mockFile ) ) |
test_equals_otherClass ( ) { org . threeten . extra . PeriodDuration test = org . threeten . extra . PeriodDuration . of ( org . threeten . extra . TestPeriodDuration . P1Y2M3D , org . threeten . extra . TestPeriodDuration . DUR_5 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == otherAmo... | org . junit . Assert . assertEquals ( false , test . equals ( "" ) ) |
shouldReturnFalseIfServiceProvidedDateIsBlank ( ) { org . ei . drishti . util . SafeMap safeMap = new org . ei . drishti . util . SafeMap ( ) ; safeMap . put ( "entityId" , "child<sp>id<sp>1" ) ; safeMap . put ( "serviceProvidedDate" , "" ) ; safeMap . put ( "dateOfBirth" , "2011-01-01" ) ; boolean didRuleApply = rule ... | org . junit . Assert . assertFalse ( didRuleApply ) |
getStringValueFromScopeWithoutDefaultValueTest ( ) { mockStorageRead ( org . uberfire . preferences . backend . PreferenceStoreImplTest . VALUE ) ; final java . lang . String value = preferenceStore . get ( allUsersEntireApplication , org . uberfire . preferences . backend . PreferenceStoreImplTest . KEY ) ; "<AssertPl... | org . junit . Assert . assertEquals ( org . uberfire . preferences . backend . PreferenceStoreImplTest . VALUE , value ) |
testuint2bytes ( ) { int control ; byte [ ] observed ; byte [ ] expected ; control = 2145845231 ; expected = new byte [ ] { ( ( byte ) ( 127 ) ) , ( ( byte ) ( 230 ) ) , ( ( byte ) ( 255 ) ) , ( ( byte ) ( 239 ) ) } ; observed = org . openstack . atlas . util . converters . BitConverters . uint2bytes ( control ) ; "<As... | org . junit . Assert . assertTrue ( bytesEqual ( expected , observed ) ) |
testInternalStorageGetsReused ( ) { org . neo4j . smack . pipeline . http . HttpHeaderContainer headers = new org . neo4j . smack . pipeline . http . HttpHeaderContainer ( ) ; headers . addHeader ( HttpHeaderNames . CONTENT_LENGTH , new org . neo4j . smack . gcfree . MutableString ( "0" ) ) ; headers . addHeader ( Http... | org . junit . Assert . assertThat ( headers . getHeaders ( HttpHeaderNames . CONTENT_LENGTH ) . currentCapacity ( ) , org . hamcrest . Matchers . is ( preClearCapacity ) ) |
testDoGetDirAsZipWithPathId ( ) { java . lang . String path = "path" ; doReturn ( path ) . when ( fileResource . fileService ) . idToPath ( org . pentaho . platform . web . http . api . resources . FileResourceTest . PATH_ID ) ; doReturn ( true ) . when ( fileResource ) . isPathValid ( path ) ; doReturn ( true ) . when... | org . junit . Assert . assertEquals ( mockResponse , testResponse ) |
testTreeHeightOddLeaves ( ) { org . provebit . merkle . FileMerkle mTree = new org . provebit . merkle . FileMerkle ( HashType . SHA256 ) ; mTree . addTracking ( org . provebit . merkle . FileMerkleTest . incompleteDirPath , false ) ; mTree . makeTree ( ) ; "<AssertPlaceHolder>" ; } getHeight ( ) { return height ; } | org . junit . Assert . assertTrue ( ( ( mTree . getHeight ( ) ) == 4 ) ) |
testDiskNull ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = createBasicParams ( ) ; parameters . remove ( "disk" ) ; org . opennms . netmgt . poller . PollStatus status = monitor . poll ( createMonitor ( ) , parameters ) ; "<AssertPlaceHolder>" ; } isAvailable ( ) { return availabl... | org . junit . Assert . assertFalse ( status . isAvailable ( ) ) |
runTest ( ) { boolean result = checkNoError ( "Social_Profiles_Check_Colleague" ) ; "<AssertPlaceHolder>" ; } getNoErrorMsg ( ) { return noErrorMsg ; } | org . junit . Assert . assertTrue ( getNoErrorMsg ( ) , result ) |
testHashBaseForItemAnswersSkipsMissingResourcesForSimpleExtendedMatchingItems ( ) { final org . sakaiproject . tool . assessment . data . dao . assessment . ItemData item = newExtendedMatchingItem ( ) ; expectServerUrlLookup ( ) ; failResourceLookup ( org . sakaiproject . tool . assessment . facade . ItemHashUtilTest .... | org . junit . Assert . assertThat ( actualHashBase . toString ( ) , org . hamcrest . CoreMatchers . equalTo ( expectedHashBase . toString ( ) ) ) |
testGetVserverType ( ) { parameters . put ( PropertyHandler . VSERVER_TYPE , new org . oscm . app . v2_0 . data . Setting ( PropertyHandler . VSERVER_TYPE , "type" ) ) ; propertyHandler = new org . oscm . app . iaas . PropertyHandler ( settings ) ; java . lang . String type = propertyHandler . getVserverType ( ) ; "<As... | org . junit . Assert . assertEquals ( "type" , type ) |
testSnappyCompressionSimple ( ) { if ( checkNativeSnappy ( ) ) { return ; } java . io . File snappyFile = new java . io . File ( testMeta . getDir ( ) , "snappyTestFile.snappy" ) ; java . io . BufferedOutputStream os = new java . io . BufferedOutputStream ( new java . io . FileOutputStream ( snappyFile ) ) ; org . apac... | org . junit . Assert . assertEquals ( testStr , new java . lang . String ( recovered ) ) |
testModifyTicketRemoveUserNullTicketId ( ) { org . irods . jargon . ticket . packinstr . TicketAdminInp pi = org . irods . jargon . ticket . packinstr . TicketAdminInp . instanceForModifyRemoveAccess ( null , TicketModifyAddOrRemoveTypeEnum . TICKET_MODIFY_USER , userName ) ; "<AssertPlaceHolder>" ; } instanceForModify... | org . junit . Assert . assertNotNull ( pi ) |
testIntMethodCalledFromScriptWithResult ( ) { com . eclipsesource . v8 . V8CallbackTest . ICallback callback = mock ( com . eclipsesource . v8 . V8CallbackTest . ICallback . class ) ; doReturn ( 7 ) . when ( callback ) . intMethodNoParameters ( ) ; v8 . registerJavaMethod ( callback , "intMethodNoParameters" , "foo" , ... | org . junit . Assert . assertEquals ( 7 , result ) |
testGenericMapList ( ) { org . apache . servicecomb . it . schema . Generic < java . util . Map < java . lang . String , java . util . List < java . lang . String > > > mapListGeneric = new org . apache . servicecomb . it . schema . Generic ( ) ; java . util . Map < java . lang . String , java . util . List < java . la... | org . junit . Assert . assertEquals ( "hello" , test ) |
normalizeTime ( ) { double value = com . att . aro . core . util . Util . normalizeTime ( ( - 0.0 ) , 1.2 ) ; "<AssertPlaceHolder>" ; } normalizeTime ( double , double ) { double tmpTime ; tmpTime = ( time > ( com . att . aro . core . util . Util . TIME_CORRECTION ) ) ? time - pcapTime : time ; if ( tmpTime < 0 ) { tmp... | org . junit . Assert . assertNotNull ( ( value > 0 ) ) |
testReadCSV ( ) { java . util . List < io . github . biezhi . excel . plus . model . Book > books = io . github . biezhi . excel . plus . Reader . create ( io . github . biezhi . excel . plus . model . Book . class ) . from ( new java . io . File ( ( ( classPath ( ) ) + "/book.csv" ) ) ) . start ( 0 ) . asList ( ) ; lo... | org . junit . Assert . assertEquals ( 5 , books . size ( ) ) |
testGetVersionNo_fileNotExistent ( ) { org . seasar . extension . jdbc . gen . internal . version . DdlInfoFileImpl ddlInfoFile = new org . seasar . extension . jdbc . gen . internal . version . DdlInfoFileImpl ( new java . io . File ( "notExistent" ) ) ; "<AssertPlaceHolder>" ; } getCurrentVersionNo ( ) { return getCu... | org . junit . Assert . assertEquals ( 0 , ddlInfoFile . getCurrentVersionNo ( ) ) |
testRootTokenInStarLoop ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "grammar<sp>Expr;\n" + ( "options<sp>{<sp>output=AST;<sp>backtrack=true;<sp>}\n" + "a<sp>:<sp>(\'*\'^)*<sp>;\n" ) ) ) ; java . lang . String expecting = "(rule<sp>synpred1_Expr<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp... | org . junit . Assert . assertEquals ( expecting , found ) |
testSplitURL_String ( ) { logger . info ( "splitURL" ) ; java . lang . String URLString = "http://user:password@www.example.com:8080/to/path/document?arg1=val1&arg2=val2#part" ; java . util . Map < com . datumbox . framework . core . common . text . parsers . URLParser . URLParts , java . lang . String > expResult = ne... | org . junit . Assert . assertEquals ( expResult , result ) |
openUiMessages ( ) { java . io . InputStream stream = org . oscm . ui . resources . DefaultMessages . openUiMessages ( Locale . ENGLISH ) ; java . lang . String result = org . oscm . string . Strings . toString ( org . oscm . stream . Streams . readFrom ( stream ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return fals... | org . junit . Assert . assertFalse ( result . isEmpty ( ) ) |
searchUncategorizedProcessDeploymentInfosSupervisedBy ( ) { final org . bonitasoft . engine . persistence . QueryOptions options = new org . bonitasoft . engine . persistence . QueryOptions ( 0 , 10 ) ; final long userId = 9 ; when ( persistenceService . searchEntity ( org . bonitasoft . engine . core . process . defin... | org . junit . Assert . assertNotNull ( result ) |
encryptInTryWithResources_decryptInTryWithRessources_yieldsOriginalPlaintext ( ) { java . io . ByteArrayOutputStream result = new java . io . ByteArrayOutputStream ( ) ; try ( java . io . BufferedOutputStream bufferedOutputStream = new java . io . BufferedOutputStream ( result , 16384 ) ; final java . io . OutputStream... | org . junit . Assert . assertArrayEquals ( ExampleMessages . IMPORTANT_QUOTE_TEXT . getBytes ( ) , plainBA . toByteArray ( ) ) |
test2502355_zoomOutBoth ( ) { org . jfree . data . xy . DefaultXYDataset dataset = new org . jfree . data . xy . DefaultXYDataset ( ) ; org . jfree . chart . JFreeChart chart = org . jfree . chart . ChartFactory . createXYLineChart ( "TestChart" , "X" , "Y" , dataset ) ; org . jfree . chart . ChartPanel panel = new org... | org . junit . Assert . assertEquals ( 1 , this . chartChangeEvents . size ( ) ) |
ifThereisNotPathReturnEmptyArray ( ) { org . zkoss . ganttz . util . MutableTreeModelTest . Prueba root = new org . zkoss . ganttz . util . MutableTreeModelTest . Prueba ( ) ; org . zkoss . ganttz . util . MutableTreeModel < org . zkoss . ganttz . util . MutableTreeModelTest . Prueba > model = org . zkoss . ganttz . ut... | org . junit . Assert . assertThat ( model . getPath ( child , root ) , org . hamcrest . CoreMatchers . equalTo ( new int [ 0 ] ) ) |
testRefineToRuntime ( ) { java . lang . String expected = "project/runtime" ; org . sonatype . aether . graph . DependencyNode node = parser . parseLiteral ( "gid:aid:ext:ver:runtime" ) ; node . setRequestContext ( "project" ) ; org . sonatype . aether . graph . DependencyNode refinedNode = refiner . transformGraph ( n... | org . junit . Assert . assertEquals ( expected , refinedNode . getRequestContext ( ) ) |
shouldSerialiseAndDeserialiseOperationChain ( ) { final uk . gov . gchq . gaffer . operation . OperationChain opChain = service . execute ( ) ; byte [ ] bytes = uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . serialise ( opChain ) ; final uk . gov . gchq . gaffer . operation . OperationChain deserialise... | org . junit . Assert . assertNotNull ( deserialisedOp ) |
databaseMappingDefaultsToPrimaryWhenNothingMatches ( ) { com . hotels . bdp . waggledance . mapping . model . DatabaseMapping databaseMapping = service . databaseMapping ( "some_unknown_prefix_db" ) ; "<AssertPlaceHolder>" ; } getDatabasePrefix ( ) { return databasePrefix ; } | org . junit . Assert . assertThat ( databaseMapping . getDatabasePrefix ( ) , org . hamcrest . CoreMatchers . is ( "" ) ) |
testRoundRobinMap ( ) { org . stringtemplate . v4 . STGroup group = new org . stringtemplate . v4 . STGroup ( ) ; group . defineTemplate ( "a" , "x" , "[<x>]" ) ; group . defineTemplate ( "b" , "x" , "(<x>)" ) ; group . defineTemplate ( "test" , "name" , "hi<sp><name:a(),b()>!" ) ; org . stringtemplate . v4 . ST st = g... | org . junit . Assert . assertEquals ( expected , result ) |
canWrite ( ) { org . sqlite . SQLiteConfig config = new org . sqlite . SQLiteConfig ( ) ; config . enforceForeignKeys ( true ) ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( "jdbc:sqlite:" , config . toProperties ( ) ) ; java . sql . Statement stat = conn . createStatement ( ) ; try { "<A... | org . junit . Assert . assertFalse ( conn . isReadOnly ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.