input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testHandshakeSerialization_1 ( ) { lombok . val req = new org . nd4j . parameterserver . distributed . v2 . messages . pairs . handshake . HandshakeRequest ( ) ; req . setOriginatorId ( "1234" ) ; lombok . val bytes = org . nd4j . linalg . util . SerializationUtils . toByteArray ( req ) ; org . nd4j . parameterserver .... | org . junit . Assert . assertEquals ( req . getOriginatorId ( ) , res . getOriginatorId ( ) ) |
testEmptyAddresses ( ) { testCreateRecordTemporalAddresses ( ) ; java . lang . Integer amountOfAddress = addressService . getAmountOfAddress ( ) ; "<AssertPlaceHolder>" ; } testCreateRecordTemporalAddresses ( ) { de . crowdcode . bitemporal . example . Person person = new de . crowdcode . bitemporal . example . PersonI... | org . junit . Assert . assertEquals ( 4 , amountOfAddress . intValue ( ) ) |
testLangProfileStringInt ( ) { com . cybozu . labs . langdetect . util . LangProfile profile = new com . cybozu . labs . langdetect . util . LangProfile ( "en" ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( profile . name , "en" ) |
testNoSuchApplication ( ) { final net . violet . platform . datamodel . Lang frLang = getFrLang ( ) ; final net . violet . platform . datamodel . User theOwner = new net . violet . platform . datamodel . mock . UserMock ( 42 , "subs.Get1" , net . violet . common . StringShop . EMPTY_STRING , "subs.Get3" , frLang , net ... | org . junit . Assert . assertNull ( theResult ) |
testAddressPersistance ( ) { com . mongodb . BasicDBObject contact = new com . mongodb . BasicDBObject ( ) ; contact . put ( "name" , "John" ) ; contact . put ( "company" , "Baeldung" ) ; collection . insert ( contact ) ; com . mongodb . DBCursor cursorDoc = collection . find ( ) ; com . mongodb . BasicDBObject contact... | org . junit . Assert . assertEquals ( contact1 . get ( "name" ) , "John" ) |
shouldReturnAllRecordsMatchingOfSearchTerm ( ) { com . rapidftr . model . Child child1 = new com . rapidftr . model . Child ( "id1" , "user1" , "{<sp>'name'<sp>:<sp>'first<sp>second',<sp>'test2'<sp>:<sp>0,<sp>'test3'<sp>:<sp>[<sp>'1',<sp>2,<sp>'3'<sp>]<sp>}" ) ; com . rapidftr . model . Child child2 = new com . rapidft... | org . junit . Assert . assertEquals ( 2 , children . size ( ) ) |
resolve_DEL_DEL_SEC_ALT ( ) { org . opencb . biodata . models . variant . Variant a = org . opencb . opencga . storage . hadoop . variant . archive . mr . VariantLocalConflictResolverTest . getVariant ( "1:100:-:GG" , "PASS" , "390" , "1/2" ) ; org . opencb . biodata . models . variant . Variant b = org . opencb . open... | org . junit . Assert . assertEquals ( 1 , resolved . size ( ) ) |
writeNull ( ) { com . asakusafw . runtime . value . FloatOption option = new com . asakusafw . runtime . value . FloatOption ( ) ; com . asakusafw . runtime . value . FloatOption restored = restore ( option ) ; "<AssertPlaceHolder>" ; } isNull ( ) { return nullValue ; } | org . junit . Assert . assertThat ( restored . isNull ( ) , is ( true ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . expando . kernel . model . ExpandoRow > expandoRows = _persistence . fetchByPrimaryKeys (... | org . junit . Assert . assertTrue ( expandoRows . isEmpty ( ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . message . boards . model . MBMessage > mbMessages = _persistence . fetchByPrimaryKeys ( p... | org . junit . Assert . assertTrue ( mbMessages . isEmpty ( ) ) |
withQDealerGroup ( ) { java . util . List < com . querydsl . apt . domain . AnyUsageTest . Company > companies = new java . util . LinkedList < com . querydsl . apt . domain . AnyUsageTest . Company > ( ) ; companies . add ( new com . querydsl . apt . domain . AnyUsageTest . Company ( ) ) ; com . querydsl . apt . domai... | org . junit . Assert . assertNotNull ( expression ) |
should_apply_comparator_EndingWith ( ) { final java . lang . String name = "findByNameEndingWith" ; final java . lang . String expected = "select<sp>e<sp>from<sp>Simple<sp>e<sp>" + "where<sp>e.name<sp>like<sp>CONCAT('%',<sp>?1)" ; java . lang . String result = org . apache . deltaspike . data . impl . builder . part . ... | org . junit . Assert . assertEquals ( expected , result ) |
q_nested_array_elemmatch ( ) { com . redhat . lightblue . query . QueryExpression q = com . redhat . lightblue . eval . EvalTestContext . queryExpressionFromJson ( "{'array':'field12.nf1.nnf1.*.nnnf1.arr','elemMatch':{'field':'id','op':'=','rvalue':1}}" ) ; com . redhat . lightblue . eval . QueryEvaluator qe = com . re... | org . junit . Assert . assertTrue ( ctx . getResult ( ) ) |
testCleanPasswordFromRequestStringMatchedAtEndDoubleQuote ( ) { final java . lang . String input = "\"username=foo&password=bar\"" ; final java . lang . String expected = "\"username=foo\"" ; final java . lang . String result = com . cloud . utils . StringUtils . cleanString ( input ) ; "<AssertPlaceHolder>" ; } cleanS... | org . junit . Assert . assertEquals ( result , expected ) |
testSendClose ( ) { final java . lang . String messageId = "testSendClose" ; final com . arjuna . webservices11 . wsarj . InstanceIdentifier instanceIdentifier = new com . arjuna . webservices11 . wsarj . InstanceIdentifier ( "1" ) ; javax . xml . ws . wsaddressing . W3CEndpointReference endpoint = com . arjuna . wst .... | org . junit . Assert . assertTrue ( details . hasClose ( ) ) |
getFailedJobs ( ) { final org . bonitasoft . engine . scheduler . model . SFailedJob sFailedJob = mock ( org . bonitasoft . engine . scheduler . model . SFailedJob . class ) ; when ( readPersistenceService . selectList ( org . mockito . Matchers . < org . bonitasoft . engine . persistence . SelectListDescriptor < org .... | org . junit . Assert . assertEquals ( sFailedJob , result ) |
test2 ( ) { java . lang . reflect . Method method = org . jboss . invocation . test . SimpleInterceptorTestCase . class . getMethod ( "throwException" ) ; org . jboss . invocation . InterceptorContext context = new org . jboss . invocation . InterceptorContext ( ) ; context . setMethod ( method ) ; context . setTarget ... | org . junit . Assert . assertNull ( interceptor . processInvocation ( context ) ) |
testGetAllChemObjects_IReactionSet ( ) { java . util . List < org . openscience . cdk . interfaces . IChemObject > allObjects = org . openscience . cdk . tools . manipulator . ReactionSetManipulator . getAllChemObjects ( set ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . cells . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , allObjects . size ( ) ) |
normal ( ) { com . ms . app . web . validation . ValidationResult valid = com . ms . app . web . validation . FormValidator . isValid ( fieldKey , displayName , "12345678901" , validatorIds ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return this . isValid ; } | org . junit . Assert . assertTrue ( valid . isValid ( ) ) |
testCanSearchForShortUrls ( ) { results = com . gu . example . GuardianContentApi . minimalContentSearchQuery ( ) . showField ( FieldType . shortUrl ) . execute ( ) ; System . out . println ( results . getContent ( ) ) ; checkResponseOK ( ) ; for ( com . gu . example . Content content : results . getContent ( ) ) "<Ass... | org . junit . Assert . assertTrue ( content . hasField ( FieldType . shortUrl ) ) |
toString_A$ ( ) { com . m3 . scalaflavor4j . RichVoidFunction4 < java . lang . String , java . lang . String , java . lang . String , java . lang . String > vf = new com . m3 . scalaflavor4j . RichVoidFunction4 ( new com . m3 . scalaflavor4j . VoidF4 < java . lang . String , java . lang . String , java . lang . String ... | org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( expected ) ) ) |
testBuilder ( ) { "<AssertPlaceHolder>" ; } builder ( ) { return new org . nmdp . ngs . variant . vcf . VcfRecord . Builder ( ) ; } | org . junit . Assert . assertNotNull ( org . nmdp . ngs . variant . vcf . VcfRecord . builder ( ) ) |
testSuggestWithCacheEnabled ( ) { apps . provisioning . server . Context context = new apps . provisioning . server . Context ( CACHE_ENABLED_CONFIG_FILE_PATH ) ; apps . provisioning . server . account . UsernameManager usernameManager = new apps . provisioning . server . account . UsernameManager ( context ) ; userDat... | org . junit . Assert . assertArrayEquals ( expectedResult , usernameManager . suggest ( userData ) . toArray ( ) ) |
testExecuteCancel ( ) { action . setCancel ( BaseAction . CANCEL ) ; "<AssertPlaceHolder>" ; } execute ( ) { return SUCCESS ; } | org . junit . Assert . assertEquals ( BaseAction . CANCEL , action . execute ( ) ) |
addFile ( ) { execute ( new org . basex . build . Add ( null , org . basex . build . AddDeleteTest . FILE ) ) ; "<AssertPlaceHolder>" ; } docs ( ) { return context . data ( ) . resources . docs ( "" ) . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , org . basex . build . AddDeleteTest . docs ( ) ) |
testWriteBytes ( ) { org . apache . giraph . utils . UnsafeByteArrayOutputStream os = new org . apache . giraph . utils . UnsafeByteArrayOutputStream ( ) ; int length = os . getByteArray ( ) . length ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < length ; i ++ ) { sb . ap... | org . junit . Assert . assertEquals ( ( ( byte ) ( s . charAt ( i ) ) ) , is . readByte ( ) ) |
getPropertiesWithPrivateFields ( ) { final com . esotericsoftware . yamlbeans . Set < com . esotericsoftware . yamlbeans . Beans . Property > properties = com . esotericsoftware . yamlbeans . Beans . getProperties ( com . esotericsoftware . yamlbeans . BeansTest . MockClass . class , false , true , yamlConfig ) ; "<Ass... | org . junit . Assert . assertEquals ( 9 , properties . size ( ) ) |
test_exec_resource_leak ( ) { java . util . List < java . util . concurrent . Future < java . lang . Integer > > futures = new java . util . ArrayList < java . util . concurrent . Future < java . lang . Integer > > ( ) ; for ( int i = 0 ; i != 1000 ; ++ i ) { futures . add ( exec ( "echo" , ( "exec-" + ( java . lang . ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 0 ) , f . get ( ) ) |
simplifySimpleDeletion_should_not_remove_if_not_simple_event ( ) { java . util . List < com . hartwig . hmftools . common . purple . copynumber . PurpleCopyNumber > cns = com . google . common . collect . ImmutableList . of ( com . hartwig . hmftools . svgraphs . BreakpointGraphTest . cn ( "chr1" , 1 , 10 , 2 ) , com .... | org . junit . Assert . assertEquals ( 0 , results . size ( ) ) |
testShouldRefreshRepoDir_IfKettleExceptionOnRepoDirDeletion ( ) { org . pentaho . di . core . exception . KettleException ke = new org . pentaho . di . core . exception . KettleException ( "TEST<sp>MESSAGE" ) ; org . mockito . Mockito . doThrow ( ke ) . when ( repoDirMock ) . delete ( ) ; try { trBrController . deleteF... | org . junit . Assert . assertTrue ( ke . getMessage ( ) . equals ( e . getMessage ( ) ) ) |
createModelFromMapVariables_all_good ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( "value" 2 , "server11" ) ; map . put ( "TCCONFIG_SERVERS0_GROUP_PORT" 8 , "server11" ) ; map . put ( "host" 4 , "value" 4 ) ; map . put ( "TCCONFIG_SERVERS0_GROU... | org . junit . Assert . assertThat ( root , org . hamcrest . CoreMatchers . equalTo ( expected ) ) |
testDoHandle ( ) { io . netty . channel . Channel channel = mock ( io . netty . channel . Channel . class ) ; java . net . InetSocketAddress addr = new java . net . InetSocketAddress ( "127.0.0.1" , randomPort ( ) ) ; when ( channel . localAddress ( ) ) . thenReturn ( addr ) ; java . util . concurrent . atomic . Atomic... | org . junit . Assert . assertEquals ( expected , actual . get ( ) ) |
cachesTypedSpelPath ( ) { org . springframework . data . rest . webmvc . json . patch . SpelPath . UntypedSpelPath source = org . springframework . data . rest . webmvc . json . patch . SpelPath . untyped ( "/description" ) ; org . springframework . data . rest . webmvc . json . patch . SpelPath . TypedSpelPath left = ... | org . junit . Assert . assertSame ( left , right ) |
testFreeRadicals ( ) { org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; org . openscience . cdk . interfaces . IAtomContainer container = mock ( org . openscience . cdk . interfaces . IAtomContainer . class ) ; org . openscience . cdk . hash . AtomEncod... | org . junit . Assert . assertThat ( encoder . encode ( atom , container ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
testBuildWithParametersAndDisabledDefaultsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . specialty . Specialty specialty = new org . lnu . i... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
testGetSchema ( ) { org . apache . avro . Schema expected = org . talend . daikon . avro . AvroUtils . _logicalTimestamp ( ) ; org . talend . daikon . avro . converter . AvroConverter < ? , ? > converter = new org . talend . codegen . converter . DateLogicalTimestampConverter ( ) ; org . apache . avro . Schema actual =... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldEchoServerSendTextFrameWithPayloadFragmentedWithSomeEmptyFragments ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; final java . util . List < java . nio . ByteBuffer > bufferList = new java . util . ArrayList ( ) ... | org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) ) |
testConstructor1 ( ) { org . jfree . chart . ChartPanel panel = new org . jfree . chart . ChartPanel ( null ) ; "<AssertPlaceHolder>" ; } getChart ( ) { return this . chart ; } | org . junit . Assert . assertEquals ( null , panel . getChart ( ) ) |
testRandomBehaviour ( ) { final int samples = 10000 ; final int minimumExpectation = samples / 5 ; final java . util . Map < java . lang . String , java . util . concurrent . atomic . AtomicInteger > counterMap = new java . util . HashMap ( ) ; counterMap . put ( "foo" , new java . util . concurrent . atomic . AtomicIn... | org . junit . Assert . assertEquals ( messageString , minimumExpectation , count ) |
hasEnoughNodes_AREA_true ( ) { touchview . setInterpretationType ( InterpretationType . AREA ) ; polygon . add ( point1 ) ; polygon . add ( point2 ) ; polygon . add ( point3 ) ; "<AssertPlaceHolder>" ; } hasEnoughNodes ( ) { return ( interpreter . minNodes ( ) ) <= ( polygon . size ( ) ) ; } | org . junit . Assert . assertThat ( touchview . hasEnoughNodes ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( kaleoConditions . isEmpty ( ) ) |
addQuery_doNotInsertInsertUpdate ( ) { final org . apache . rya . streams . api . RyaStreamsClient mockClient = mock ( org . apache . rya . streams . api . RyaStreamsClient . class ) ; final org . apache . rya . streams . api . interactor . AddQuery addQuery = mock ( org . apache . rya . streams . api . interactor . Ad... | org . junit . Assert . assertEquals ( expected , message ) |
encodeRequest ( ) { io . netty . channel . embedded . EmbeddedChannel channel = new io . netty . channel . embedded . EmbeddedChannel ( new org . apache . jackrabbit . oak . segment . standby . codec . GetSegmentRequestEncoder ( ) ) ; channel . writeOutbound ( new org . apache . jackrabbit . oak . segment . standby . c... | org . junit . Assert . assertEquals ( org . apache . jackrabbit . oak . segment . standby . codec . Messages . newGetSegmentRequest ( "clientId" , "segmentId" ) , message ) |
testAvroToDiLogicalTimeMillis ( ) { java . lang . String expectedType = "id_Integer" ; org . apache . avro . Schema fieldSchema = org . talend . daikon . avro . AvroUtils . _logicalTime ( ) ; "<AssertPlaceHolder>" ; } avroToDi ( org . apache . avro . Schema ) { org . apache . avro . Schema typeSchema = org . talend . d... | org . junit . Assert . assertEquals ( expectedType , org . talend . codegen . converter . TypeConverter . avroToDi ( fieldSchema ) ) |
test_BytesRange ( ) { com . alibaba . dubbo . common . serialize . ObjectOutput objectOutput = serialization . serialize ( url , byteArrayOutputStream ) ; objectOutput . writeBytes ( "123-" . getBytes ( ) , 1 , 9 ) ; objectOutput . flushBuffer ( ) ; java . io . ByteArrayInputStream byteArrayInputStream = new java . io ... | org . junit . Assert . assertArrayEquals ( expectedArray , deserialize . readBytes ( ) ) |
testDirectMessage1 ( ) { net . tomp2p . p2p . Peer sender = null ; net . tomp2p . p2p . Peer recv1 = null ; try { net . tomp2p . connection . Bindings b = new net . tomp2p . connection . Bindings ( ) ; sender = new net . tomp2p . p2p . PeerBuilder ( new net . tomp2p . peers . Number160 ( "0x50" ) ) . bindings ( b ) . p... | org . junit . Assert . assertTrue ( fd . isSuccess ( ) ) |
match_should_fail_in_non_strict_mode ( ) { final boolean strict = false ; final java . lang . String reference = "Jimmy" ; final java . lang . String value = "Jammy" ; final boolean result = org . talend . dataprep . util . StringsHelper . match ( reference , value , strict ) ; "<AssertPlaceHolder>" ; } match ( java . ... | org . junit . Assert . assertFalse ( result ) |
testSetMaxRowsHigherThanSystemLimit ( ) { int sysValueToSet = ( org . apache . drill . jdbc . StatementMaxRowsTest . RANDOMIZER . nextInt ( 5 ) ) + 6 ; setSystemMaxRows ( sysValueToSet ) ; try ( java . sql . Statement stmt = org . apache . drill . jdbc . StatementMaxRowsTest . connection . createStatement ( ) ) { int v... | org . junit . Assert . assertEquals ( sysValueToSet , rowCount ) |
testSearchTwoFields2 ( ) { customer . setHome_Phone ( "514-598" ) ; customer . setL_Name ( "STEFANOV" ) ; data = manager . search ( ) ; "<AssertPlaceHolder>" ; } search ( ) { java . lang . String selectStatement = "select<sp>*<sp>from<sp>users<sp>where<sp>" ; int size = selectStatement . length ( ) ; values = new java ... | org . junit . Assert . assertTrue ( ( ( data . size ( ) ) == 1 ) ) |
testUnwatch ( ) { connection . set ( "testitnow" , "willdo" ) ; connection . watch ( "testitnow" . getBytes ( ) ) ; getResults ( ) ; initConnection ( ) ; connection . unwatch ( ) ; getResults ( ) ; initConnection ( ) ; connection . multi ( ) ; org . springframework . data . redis . connection . DefaultStringRedisConnec... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( new java . lang . Object [ ] { true , "somethingelse" } ) , execResults ) |
testGetClusterInfoById ( ) { org . smartdata . model . ClusterInfo clusterInfo = new org . smartdata . model . ClusterInfo ( 1 , "test1" , "test1" , "test1" , "test1" , "test1" ) ; metaStore . insertClusterInfo ( clusterInfo ) ; "<AssertPlaceHolder>" ; } getClusterInfoByCid ( long ) { try { return clusterInfoDao . getB... | org . junit . Assert . assertTrue ( metaStore . getClusterInfoByCid ( 1 ) . equals ( clusterInfo ) ) |
undo_cellValueIsSetAndUndone_cellHasNoValue ( ) { headerPage . createNewSpreadsheet ( ) ; final com . vaadin . addon . spreadsheet . elements . SpreadsheetElement spreadsheet = $ ( com . vaadin . addon . spreadsheet . elements . SpreadsheetElement . class ) . first ( ) ; spreadsheet . getCellAt ( "A1" ) . setValue ( "a... | org . junit . Assert . assertEquals ( "" , spreadsheet . getCellAt ( "A1" ) . getValue ( ) ) |
testUnableToCreateMoreTransactionsFlag ( ) { testClass . setUnableToCreateMoreTransactions ( true ) ; "<AssertPlaceHolder>" ; } isUnableToCreateMoreTransactions ( ) { return this . unableToCreateMoreTransactions ; } | org . junit . Assert . assertEquals ( testClass . isUnableToCreateMoreTransactions ( ) , true ) |
getClusterType ( ) { com . zsmartsystems . zigbee . zcl . protocol . ZclCommandType cmd = ZclCommandType . ALARM_COMMAND ; "<AssertPlaceHolder>" ; } getClusterType ( ) { return clusterType ; } | org . junit . Assert . assertEquals ( 9 , cmd . getClusterType ( ) ) |
parseFunctionAnyParameters7 ( ) { java . util . List < java . lang . Object > parameters = org . diirt . datasource . util . FunctionParser . parseFunctionAnyParameter ( "foo" ) ; "<AssertPlaceHolder>" ; } parseFunctionAnyParameter ( java . lang . String ) { return org . diirt . datasource . util . FunctionParser . par... | org . junit . Assert . assertThat ( parameters , org . hamcrest . CoreMatchers . equalTo ( java . util . Arrays . asList ( ( ( java . lang . Object ) ( "foo" ) ) ) ) ) |
testParseArgumentsReturnsFalseWithNoArgs ( ) { com . google . api . ads . common . lib . utils . examples . CodeSampleTest . TestSampleParams p = new com . google . api . ads . common . lib . utils . examples . CodeSampleTest . TestSampleParams ( ) ; "<AssertPlaceHolder>" ; } parseArguments ( java . lang . String [ ] )... | org . junit . Assert . assertFalse ( p . parseArguments ( new java . lang . String [ ] { } ) ) |
testGetPlayer ( ) { world . bentobox . bentobox . api . user . User user = world . bentobox . bentobox . api . user . User . getInstance ( player ) ; "<AssertPlaceHolder>" ; } getPlayer ( ) { return player ; } | org . junit . Assert . assertEquals ( player , user . getPlayer ( ) ) |
shouldDeserialiseFromJsonUsingDirectedTrueField ( ) { final java . lang . String json = "{\"class\":<sp>\"uk.gov.gchq.gaffer.data.element.Edge\",<sp>\"directed\":<sp>true}" ; final uk . gov . gchq . gaffer . data . element . Edge deserialisedEdge = uk . gov . gchq . gaffer . jsonserialisation . JSONSerialiser . deseria... | org . junit . Assert . assertTrue ( deserialisedEdge . isDirected ( ) ) |
testConsumerReceiveBeforeMessageDispatched ( ) { final javax . jms . Connection connection = createAmqpConnection ( ) ; this . connection = connection ; connection . start ( ) ; final javax . jms . Session session = connection . createSession ( false , Session . AUTO_ACKNOWLEDGE ) ; final javax . jms . Queue queue = se... | org . junit . Assert . assertNotNull ( msg ) |
testLTrim ( ) { doCmdTest ( new org . cyy . fw . nedis . test . cmd . TestAction ( ) { @ org . cyy . fw . nedis . test . cmd . Override public void doTest ( ) throws org . cyy . fw . nedis . test . cmd . InterruptedException , org . cyy . fw . nedis . util . NedisException { client . flushAll ( null ) ; java . lang . T... | org . junit . Assert . assertEquals ( "OK" , result ) |
testIndexCollate ( ) { com . orientechnologies . orient . graph . blueprints . OrientGraph g = new com . orientechnologies . orient . graph . blueprints . OrientGraph ( com . orientechnologies . orient . graph . blueprints . GraphTest . URL , "admin" , "admin" ) ; com . orientechnologies . orient . graph . blueprints .... | org . junit . Assert . assertEquals ( true , enrico . iterator ( ) . hasNext ( ) ) |
testSearchCount ( ) { long classNameId = com . liferay . portal . kernel . util . PortalUtil . getClassNameId ( com . liferay . calendar . model . CalendarResource . class ) ; java . util . Map < java . util . Locale , java . lang . String > nameMap = createNameMap ( ) ; com . liferay . calendar . service . CalendarRes... | org . junit . Assert . assertEquals ( 1 , count ) |
checkTest2 ( ) { com . navercorp . pinpoint . web . vo . Application application = new com . navercorp . pinpoint . web . vo . Application ( com . navercorp . pinpoint . web . alarm . checker . ErrorRateCheckerTest . SERVICE_NAME , com . navercorp . pinpoint . common . trace . ServiceType . STAND_ALONE ) ; com . naverc... | org . junit . Assert . assertFalse ( filter . isDetected ( ) ) |
test_setOverlay_chartLegendSetToTrue_expectOverlayInitialValueSetToTrue ( ) { org . apache . poi . xssf . usermodel . XSSFWorkbook wb = new org . apache . poi . xssf . usermodel . XSSFWorkbook ( ) ; org . apache . poi . xssf . usermodel . XSSFSheet sheet = wb . createSheet ( ) ; org . apache . poi . xssf . usermodel . ... | org . junit . Assert . assertTrue ( legend . isOverlay ( ) ) |
testReplay ( ) { when ( _local . replayAsyncSince ( isSubject ( ) , eq ( "queue-name" ) , isNull ( java . util . Date . class ) ) ) . thenReturn ( "replayId1" ) ; java . lang . String replayId = databusClient ( ) . replayAsync ( "queue-name" ) ; verify ( _local ) . replayAsyncSince ( isSubject ( ) , eq ( "queue-name" )... | org . junit . Assert . assertEquals ( replayId , "replayId1" ) |
testGetCurrentSession ( ) { java . lang . String login = "login" ; org . lnu . is . domain . user . User user = new org . lnu . is . domain . user . User ( ) ; user . setLogin ( login ) ; org . lnu . is . domain . session . Session session = new org . lnu . is . domain . session . Session ( ) ; session . setUser ( user... | org . junit . Assert . assertEquals ( expected , actual ) |
bind_field_fieldSetCorrectly ( ) { com . vaadin . ui . Button button = ( ( com . vaadin . ui . Button ) ( inflater . inflate ( getXml ( "single-button.xml" ) ) ) ) ; org . vaadin . teemu . clara . binder . BinderTest . ControllerWithFieldBinding controller = new org . vaadin . teemu . clara . binder . BinderTest . Cont... | org . junit . Assert . assertSame ( button , controller . getMyButton ( ) ) |
testNavigateToFirst ( ) { wizard . addPage ( page1 ) ; "<AssertPlaceHolder>" ; } navigateToFirst ( ) { resetNavigationState ( ) ; return navigateToNext ( ) ; } | org . junit . Assert . assertEquals ( page1 , wizard . navigateToFirst ( ) ) |
testCreate ( ) { org . eclipse . rap . rwt . internal . lifecycle . DefaultEntryPointFactory factory = new org . eclipse . rap . rwt . internal . lifecycle . DefaultEntryPointFactory ( org . eclipse . rap . rwt . internal . lifecycle . TestEntryPoint . class ) ; org . eclipse . rap . rwt . application . EntryPoint entr... | org . junit . Assert . assertTrue ( ( entryPoint instanceof org . eclipse . rap . rwt . internal . lifecycle . TestEntryPoint ) ) |
ifAppropriateAttributesInDifferentMBeansHaveSameValueReturnsThatValue ( ) { io . datakernel . jmx . JmxMBeansAttributesTest . MBeanWithSingleIntAttr mbean_1 = new io . datakernel . jmx . JmxMBeansAttributesTest . MBeanWithSingleIntAttr ( 1 ) ; io . datakernel . jmx . JmxMBeansAttributesTest . MBeanWithSingleIntAttr mbe... | org . junit . Assert . assertEquals ( 1 , mbean . getAttribute ( "value" ) ) |
testDatatypeValue5 ( ) { java . lang . String init = "<sp><Jim><sp>rdf:value<sp>false,<sp>'01'^^xsd:double,<sp>'1.0'^^xsd:float," 1 + ( ( ( ( ( ( ( ( "<Jack><sp>" + "rdf:value<sp>" ) + "<sp>1,<sp>1.0,<sp>'1'^^xsd:long,<sp>1e0,<sp>'1'^^xsd:double,<sp>'1'^^xsd:float,<sp>" ) + "<sp><Jim><sp>rdf:value<sp>false,<sp>'01'^^xs... | org . junit . Assert . assertEquals ( 15 , map . size ( ) ) |
testRangeUnboundedPrecedingCurrentRow ( ) { java . lang . String sqlText = java . lang . String . format ( ( "<sp>50<sp>|<sp>1<sp>|<sp>52000<sp>|154000<sp>|\n" 9 + ( "sum(salary)<sp>over<sp>(Partition<sp>by<sp>dept<sp>ORDER<sp>BY<sp>salary<sp>range<sp>between<sp>unbounded<sp>preceding<sp>and<sp>current<sp>row)<sp>as<sp... | org . junit . Assert . assertEquals ( ( ( "<sp>120<sp>|<sp>3<sp>|<sp>75000<sp>|130000<sp>|" 0 + sqlText ) + "<sp>120<sp>|<sp>3<sp>|<sp>75000<sp>|130000<sp>|" 0 ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) ) |
shouldHaveStandardStringRepresentation ( ) { final org . apache . tinkerpop . gremlin . structure . Vertex v = graph . addVertex ( ) ; "<AssertPlaceHolder>" ; } vertexString ( org . apache . tinkerpop . gremlin . structure . Vertex ) { return ( ( ( org . apache . tinkerpop . gremlin . structure . util . StringFactory .... | org . junit . Assert . assertEquals ( org . apache . tinkerpop . gremlin . structure . util . StringFactory . vertexString ( v ) , v . toString ( ) ) |
testRequestScope ( ) { final java . util . concurrent . atomic . AtomicInteger doneRunnerCount = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; final java . lang . Runnable requestScopeTask = new java . lang . Runnable ( ) { @ org . jboss . errai . bus . server . websocket . test . jsr356 . cdi . adapter... | org . junit . Assert . assertEquals ( timestamp , requestScopedBean . getTimestamp ( ) ) |
testImplementationClassImplementsSerializable ( ) { javax . enterprise . inject . spi . Bean < ? > bean = beanManager . resolve ( beanManager . getBeans ( "foo" ) ) ; "<AssertPlaceHolder>" ; } getReference ( javax . enterprise . inject . spi . BeanManager , javax . enterprise . inject . spi . Bean , java . lang . refle... | org . junit . Assert . assertNotNull ( beanManager . getReference ( bean , java . lang . Object . class , beanManager . createCreationalContext ( bean ) ) ) |
testGetStepExecutions ( ) { final javax . batch . operations . JobOperator mockJobOperator = mockery . mock ( javax . batch . operations . JobOperator . class ) ; final javax . transaction . TransactionManager mockTranMgr = mockery . mock ( javax . transaction . TransactionManager . class ) ; final javax . transaction ... | org . junit . Assert . assertEquals ( retMe , buildJobOperator ( mockJobOperator , mockTranMgr ) . getStepExecutions ( 0 ) ) |
testPut ( ) { final java . nio . ByteBuffer buffer = io . vlingo . wire . message . ByteBufferAllocator . allocate ( 1000 ) ; final io . vlingo . wire . node . Node node1 = io . vlingo . wire . node . Node . with ( io . vlingo . wire . node . Id . of ( 1 ) , io . vlingo . wire . node . Name . of ( "node1" ) , io . vlin... | org . junit . Assert . assertEquals ( textOfConvertedBuffer , textOfRawMessage ) |
createAnnoWithValues0 ( ) { org . checkerframework . javacutil . AnnotationBuilder builder = new org . checkerframework . javacutil . AnnotationBuilder ( env , testlib . util . AnnoWithStringArg . class ) ; builder . setValue ( "value" , "m" ) ; javax . lang . model . element . AnnotationMirror anno = builder . build (... | org . junit . Assert . assertEquals ( 1 , anno . getElementValues ( ) . size ( ) ) |
testNoSegments ( ) { org . apache . commons . math3 . geometry . euclidean . threed . SubLine empty = new org . apache . commons . math3 . geometry . euclidean . threed . SubLine ( new org . apache . commons . math3 . geometry . euclidean . threed . Line ( new org . apache . commons . math3 . geometry . euclidean . thr... | org . junit . Assert . assertEquals ( 0 , segments . size ( ) ) |
testGetAccessDenied ( ) { boolean success = false ; try { filter . messageReceived ( ctx , createMockEvent ( ctx . getChannel ( ) , com . mozilla . bagheera . http . HTTP_1_1 , com . mozilla . bagheera . http . GET , ( "/submit/foo_blah/" + ( java . util . UUID . randomUUID ( ) . toString ( ) ) ) ) ) ; } catch ( com . ... | org . junit . Assert . assertTrue ( success ) |
booleanSchema ( ) { org . everit . json . schema . BooleanSchema actual = ( ( org . everit . json . schema . BooleanSchema ) ( org . everit . json . schema . loader . SchemaLoader . load ( org . everit . json . schema . loader . SchemaLoaderTest . get ( "booleanSchema" ) ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . l... | org . junit . Assert . assertNotNull ( actual ) |
empty ( ) { org . pdfsam . pdf . PdfDocumentDescriptor descriptor = mock ( org . pdfsam . pdf . PdfDocumentDescriptor . class ) ; org . pdfsam . ui . selection . multiple . SelectionTableRowData victim = new org . pdfsam . ui . selection . multiple . SelectionTableRowData ( descriptor ) ; "<AssertPlaceHolder>" ; } toPa... | org . junit . Assert . assertTrue ( victim . toPageRangeSet ( ) . isEmpty ( ) ) |
testUpdateBillingSubscriptionStatus_createNew ( ) { final java . lang . Long subActivationDate4 = java . lang . Long . valueOf ( org . oscm . test . DateTimeHandling . calculateMillis ( "2014-08-20<sp>00:00:00" ) ) ; final long endOfLastBilledPeriod2 = org . oscm . test . DateTimeHandling . calculateMillis ( "2014-07-0... | org . junit . Assert . assertEquals ( endOfLastBilledPeriod2 , status2 . getEndOfLastBilledPeriod ( ) ) |
testGetComposedEmail ( ) { when ( mockEditor . composeEmail ( ) ) . thenReturn ( "test<sp>email" ) ; java . lang . String composedEmail = emailController . getComposedEmail ( ) ; "<AssertPlaceHolder>" ; verify ( mockEditor ) . composeEmail ( ) ; } composeEmail ( ) { return "hola<sp>mundo" ; } | org . junit . Assert . assertEquals ( "test<sp>email" , composedEmail ) |
testMaxNumServiceInstancesPerEndPointSet ( ) { com . bazaarvoice . ostrich . pool . ServiceCachingPolicyBuilder builder = new com . bazaarvoice . ostrich . pool . ServiceCachingPolicyBuilder ( ) ; builder . withMaxNumServiceInstancesPerEndPoint ( 1 ) ; "<AssertPlaceHolder>" ; } build ( ) { checkState ( ( ( ( _maxNumSer... | org . junit . Assert . assertEquals ( 1 , builder . build ( ) . getMaxNumServiceInstancesPerEndPoint ( ) ) |
findNeighborsOfSpecificRelationshipType ( ) { try ( org . neo4j . graphdb . Transaction tx = api . beginTx ( ) ) { org . neo4j . graphdb . Node node1 = api . createNode ( ) ; org . neo4j . graphdb . Node node2 = api . createNode ( ) ; org . neo4j . graphdb . Node node3 = api . createNode ( ) ; org . neo4j . graphdb . N... | org . junit . Assert . assertEquals ( 1 , neighbors . size ( ) ) |
getMimeTypeFromExtensionEmpty2 ( ) { java . lang . String mimeType = getSpincastUtils ( ) . getMimeTypeFromExtension ( "<sp>" ) ; "<AssertPlaceHolder>" ; } getMimeTypeFromExtension ( java . lang . String ) { if ( org . spincast . shaded . org . apache . commons . lang3 . StringUtils . isBlank ( extension ) ) { return n... | org . junit . Assert . assertNull ( mimeType ) |
create_strict ( ) { cucumber . runtime . RuntimeOptionsFactory runtimeOptionsFactory = new cucumber . runtime . RuntimeOptionsFactory ( cucumber . runtime . RuntimeOptionsFactoryTest . Strict . class ) ; cucumber . runtime . RuntimeOptions runtimeOptions = runtimeOptionsFactory . create ( ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( runtimeOptions . isStrict ( ) ) |
testPersisteerBerichtLogNull ( ) { try { service . persisteerBerichtLog ( null ) ; org . junit . Assert . fail ( "Er<sp>wordt<sp>een<sp>NullPointerException<sp>verwacht" ) ; } catch ( final java . lang . NullPointerException npe ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; } | org . junit . Assert . assertTrue ( ( ( npe . getMessage ( ) ) != null ) ) |
testOrderFacts ( ) { java . util . List < org . drools . core . common . InternalFactHandle > list = new java . util . ArrayList < org . drools . core . common . InternalFactHandle > ( ) ; java . util . List < java . lang . Integer > ids = java . util . Arrays . asList ( 0 , 1 , 2 , 3 , 4 , 5 , 6 , 30 , 31 , 32 , ( - 2... | org . junit . Assert . assertEquals ( ( - 2147483640 ) , first . getId ( ) ) |
testReadWithEmptyContent ( ) { com . edlio . emailreplyparser . Email email = com . edlio . emailreplyparser . EmailReplyParser . read ( "" ) ; "<AssertPlaceHolder>" ; } getVisibleText ( ) { java . util . List < java . lang . String > visibleFragments = new java . util . ArrayList < java . lang . String > ( ) ; for ( c... | org . junit . Assert . assertEquals ( "" , email . getVisibleText ( ) ) |
testValue ( java . util . Map , java . lang . String , java . util . Set ) { com . github . horrorho . inflatabledonkey . util . BiMapSet < java . lang . String , java . lang . Integer > mapSet = com . github . horrorho . inflatabledonkey . util . BiMapSet . from ( map ) ; "<AssertPlaceHolder>" ; } values ( java . lang... | org . junit . Assert . assertThat ( mapSet . values ( key ) , org . hamcrest . CoreMatchers . is ( values ) ) |
getMatrixHackers ( ) { org . neo4j . graphdb . traversal . Traverser traverser = org . neo4j . rest . graphdb . MatrixDatabaseTest . findHackers ( org . neo4j . rest . graphdb . MatrixDatabaseTest . mdg . getNeoNode ( ) ) ; int numberOfHackers = 0 ; for ( org . neo4j . graphdb . Path hackerPath : traverser ) { numberOf... | org . junit . Assert . assertEquals ( 1 , numberOfHackers ) |
shouldAccumulateTimes ( ) { org . neo4j . kernel . impl . api . index . LoggingPhaseTracker phaseTracker = getPhaseTracker ( ) ; phaseTracker . enterPhase ( PhaseTracker . Phase . SCAN ) ; sleep ( 100 ) ; phaseTracker . enterPhase ( PhaseTracker . Phase . WRITE ) ; org . neo4j . kernel . impl . api . index . LoggingPha... | org . junit . Assert . assertTrue ( ( ( scanLogger . totalTime ) > firstCount ) ) |
testRevokePermission ( ) { org . apache . ranger . plugin . model . RangerPolicy policy = rangerPolicy ( org . apache . ranger . rest . TestAssetREST . Id ) ; org . apache . ranger . plugin . model . RangerService service = rangerService ( org . apache . ranger . rest . TestAssetREST . Id ) ; org . apache . ranger . vi... | org . junit . Assert . assertEquals ( vXPolicy , expectedVXPolicy ) |
whenRequestingNeighborhoodOfTargetJob_nNeighborsShouldBeTwo ( ) { jsprit . core . algorithm . ruin . JobNeighborhoodsImplWithCapRestriction jn = new jsprit . core . algorithm . ruin . JobNeighborhoodsImplWithCapRestriction ( vrp , jobDistance , 2 ) ; jn . initialise ( ) ; java . util . Iterator < jsprit . core . proble... | org . junit . Assert . assertEquals ( 2 , services . size ( ) ) |
testProjectWithProjectReference ( ) { org . eclipse . jdt . core . IPackageFragmentRoot rootSrc1 = javaProject1 . createSourceFolder ( "src" ) ; org . eclipse . jdt . core . IPackageFragmentRoot rootSrc2 = javaProject2 . createSourceFolder ( "src" ) ; javaProject1 . addProjectReference ( javaProject2 ) ; com . mountain... | org . junit . Assert . assertEquals ( set ( rootSrc1 , rootSrc2 ) , set ( scope ) ) |
testJsonExampleFilesArrays ( ) { org . junit . Assume . assumeTrue ( this . sqlgGraph . getSqlDialect ( ) . supportsJsonArrayValues ( ) ) ; com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; java . lang . String content1 = new java . lang . S... | org . junit . Assert . assertArrayEquals ( jsonNodes , value1 ) |
testIOExceptionDelete ( ) { java . io . OutputStream outputStream = mock ( java . io . OutputStream . class ) ; when ( hadoopFileSystem . create ( hadoopFileSystemPath ) ) . thenReturn ( outputStream ) ; when ( hadoopFileSystem . delete ( hadoopFileSystemPath , false ) ) . thenThrow ( new java . io . IOException ( ) ) ... | org . junit . Assert . assertEquals ( 0 , runtimeTestResultSummary . getRuntimeTestResultEntries ( ) . size ( ) ) |
matchesCanBeDeleted ( ) { org . mockito . Mockito . doNothing ( ) . when ( mockObject ) . validateForDelete ( ) ; boolean result = matcher . matchesSafely ( mockObject ) ; "<AssertPlaceHolder>" ; } matchesSafely ( T extends com . webobjects . eocontrol . EOEnterpriseObject ) { com . webobjects . eocontrol . EOEditingCo... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.