input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . vizualizers . TimesVsThreadsGui instance = new kg . apc . jmeter . vizualizers . TimesVsThreadsGui ( ) ; java . lang . String expResult = "TimesVsThreadsGui" ; java . lang . String result = instance . getLabelResource ( ) ; "... | org . junit . Assert . assertEquals ( expResult , result ) |
testCompareWith ( ) { org . apache . jackrabbit . oak . segment . file . tar . GCGeneration m = org . apache . jackrabbit . oak . segment . file . tar . GCGeneration . newGCGeneration ( 0 , 0 , false ) ; org . apache . jackrabbit . oak . segment . file . tar . GCGeneration n = org . apache . jackrabbit . oak . segment ... | org . junit . Assert . assertEquals ( 2 , n . compareWith ( m ) ) |
testJsonSerialization ( ) { org . batfish . datamodel . dataplane . rib . RibId rib1 = new org . batfish . datamodel . dataplane . rib . RibId ( "hostname" , "vrfname" , "ribname" ) ; org . batfish . datamodel . dataplane . rib . RibId exportRib = new org . batfish . datamodel . dataplane . rib . RibId ( "hostname" , "... | org . junit . Assert . assertThat ( org . batfish . common . util . BatfishObjectMapper . clone ( rg , org . batfish . datamodel . dataplane . rib . RibGroup . class ) , org . hamcrest . Matchers . equalTo ( rg ) ) |
checkCreateObservationViaDatastream ( ) { de . fraunhofer . iosb . ilt . statests . c07mqttcreate . Capability7Tests . entityHelper . deleteEntityType ( EntityType . OBSERVATION ) ; org . json . JSONObject createdObservation = getObservation ( ) ; java . lang . Object datastreamId = - 1 ; try { datastreamId = createdOb... | org . junit . Assert . assertTrue ( de . fraunhofer . iosb . ilt . statests . c07mqttcreate . Capability7Tests . jsonEquals ( latestObservation , createdObservation ) ) |
testOneWay ( ) { org . apache . avro . TestProtocolSpecific . ackCount = 0 ; org . apache . avro . TestProtocolSpecific . proxy . ack ( ) ; org . apache . avro . TestProtocolSpecific . proxy . hello ( "foo" ) ; org . apache . avro . TestProtocolSpecific . proxy . ack ( ) ; try { java . lang . Thread . sleep ( 100 ) ; }... | org . junit . Assert . assertEquals ( 2 , org . apache . avro . TestProtocolSpecific . ackCount ) |
testSiteId ( ) { request . setSiteId ( 2 ) ; "<AssertPlaceHolder>" ; } getSiteId ( ) { return ( ( java . lang . Integer ) ( getParameter ( org . piwik . java . tracking . PiwikRequest . SITE_ID ) ) ) ; } | org . junit . Assert . assertEquals ( new java . lang . Integer ( 2 ) , request . getSiteId ( ) ) |
testIntervalAnnotation ( ) { org . apache . parquet . schema . PrimitiveType expected = new org . apache . parquet . schema . PrimitiveType ( REQUIRED , FIXED_LEN_BYTE_ARRAY , 12 , "interval" , INTERVAL ) ; org . apache . parquet . schema . PrimitiveType string = org . apache . parquet . schema . Types . required ( org... | org . junit . Assert . assertEquals ( expected , string ) |
testPageRankWithGraphBasic ( ) { org . qcri . rheem . tests . List < org . qcri . rheem . basic . data . Tuple2 < java . lang . Long , java . lang . Long > > edges = org . qcri . rheem . tests . Arrays . asList ( new org . qcri . rheem . basic . data . Tuple2 ( 0L , 1L ) , new org . qcri . rheem . basic . data . Tuple2... | org . junit . Assert . assertEquals ( org . qcri . rheem . tests . Arrays . asList ( 3L , 0L , 2L , 1L ) , vertexOrder ) |
testFindFeatureService ( ) { org . apache . karaf . features . FeaturesService featureService = niceMock ( org . apache . karaf . features . FeaturesService . class ) ; replay ( featureService ) ; org . osgi . framework . ServiceReference < org . apache . karaf . features . FeaturesService > ref = niceMock ( org . osgi... | org . junit . Assert . assertNotNull ( service ) |
testDecodeAttachedFileNameSimple ( ) { final java . lang . String expectedFileName = "fileName" ; final java . lang . String message = getMailMessageSpy . decodeAttachedFileNames ( expectedFileName ) ; "<AssertPlaceHolder>" ; } decodeAttachedFileNames ( java . lang . String ) { java . lang . StringBuilder sb = new java... | org . junit . Assert . assertEquals ( expectedFileName , message ) |
testRetryOperationFailDieOnError ( ) { org . apache . avro . generic . IndexedRecord record = new org . apache . avro . generic . GenericData . Record ( org . talend . components . marketo . MarketoConstants . getRESTOutputSchemaForSyncMultipleLeads ( ) ) ; record . put ( 0 , 12345 ) ; doReturn ( false ) . when ( clien... | org . junit . Assert . assertTrue ( e . getMessage ( ) . contains ( "902" ) ) |
testTabsheetContentHasTheSameHeightAsTable ( ) { openTestURL ( ) ; int tableHeight = getTableHeigth ( ) ; int tabSheetContentHeight = getTableSheetContentHeight ( ) ; "<AssertPlaceHolder>" ; } getTableSheetContentHeight ( ) { org . openqa . selenium . WebElement tabsheetContent = vaadinElementById ( com . vaadin . test... | org . junit . Assert . assertEquals ( tableHeight , tabSheetContentHeight ) |
testForeignKeysOnHsqldb ( ) { org . junit . Assume . assumeTrue ( this . sqlgGraph . getSqlDialect ( ) . getClass ( ) . getSimpleName ( ) . contains ( "Hsqldb" ) ) ; org . apache . commons . configuration . Configuration conf = getConfigurationClone ( ) ; conf . setProperty ( "implement.foreign.keys" , "true" ) ; try (... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
testGetSubjectMatterExpertByKeyUserNoExists ( ) { org . finra . herd . model . api . xml . SubjectMatterExpertKey subjectMatterExpertKey = new org . finra . herd . model . api . xml . SubjectMatterExpertKey ( org . finra . herd . dao . AbstractDaoTest . USER_ID ) ; org . finra . herd . model . api . xml . SubjectMatter... | org . junit . Assert . assertNull ( result ) |
testValueAsObject ( ) { final com . allanbank . mongodb . bson . element . ObjectIdElement element = new com . allanbank . mongodb . bson . element . ObjectIdElement ( "foo" , new com . allanbank . mongodb . bson . element . ObjectId ( 287454020 , 1234605616436508552L ) ) ; "<AssertPlaceHolder>" ; } getValueAsObject ( ... | org . junit . Assert . assertEquals ( new com . allanbank . mongodb . bson . element . ObjectId ( 287454020 , 1234605616436508552L ) , element . getValueAsObject ( ) ) |
testGetLCA_returnsSameAdapterForEachInvocation ( ) { java . lang . Object adapter1 = org . eclipse . rap . rwt . internal . lifecycle . DisplayUtil . getLCA ( display ) ; java . lang . Object adapter2 = org . eclipse . rap . rwt . internal . lifecycle . DisplayUtil . getLCA ( display ) ; "<AssertPlaceHolder>" ; } getLC... | org . junit . Assert . assertSame ( adapter1 , adapter2 ) |
isSubsetOf ( ) { com . gs . collections . api . set . sorted . ImmutableSortedSet < java . lang . Integer > set = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } isSubsetOf ( com . gs . collections . api . set . SetIterable ) { synchronized ( this . getLock ( ) ) { return this . getMutableSet ( ) . isSubsetOf ( c... | org . junit . Assert . assertTrue ( set . isSubsetOf ( set ) ) |
testMethod ( ) { final boolean [ ] result = new boolean [ ] { false } ; result [ 0 ] = new edu . rice . pcdp . future . TestFuture4 ( ) . run ( ) ; "<AssertPlaceHolder>" ; } run ( ) { edu . rice . pcdp . PCDP . finish ( ( ) -> { final int acc0 = 1 ; async ( ( ) -> { int acc1 = 2 ; async ( ( ) -> { int acc2 = 3 ; async ... | org . junit . Assert . assertEquals ( true , result [ 0 ] ) |
listResults ( ) { final org . apache . accumulo . core . client . Connector connector = getClusterInstance ( ) . getConnector ( ) ; final java . lang . String ryaInstanceName = testInstance . getRyaInstanceName ( ) ; try ( final org . apache . rya . indexing . pcj . storage . PrecomputedJoinStorage pcjStorage = new org... | org . junit . Assert . assertEquals ( expectedResults , results ) |
shouldEqualsWhenObjectIsSame ( ) { "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == other ) { return true ; } if ( ! ( other instanceof org . eclipse . che . ide . ext . runner . client . tabs . common . Tab ) ) { return false ; } org . eclipse . che . ide . ext . runner . client . tabs . co... | org . junit . Assert . assertThat ( tab . equals ( tab ) , org . hamcrest . core . Is . is ( true ) ) |
documentExistsIfNoneMatchFail ( ) { final com . arangodb . entity . DocumentCreateEntity < java . lang . String > createResult = db . collection ( com . arangodb . ArangoCollectionTest . COLLECTION_NAME ) . insertDocument ( "{\"_key\":\"abc\"}" , null ) ; final com . arangodb . model . DocumentExistsOptions options = n... | org . junit . Assert . assertThat ( exists , org . hamcrest . Matchers . is ( false ) ) |
testBitonicSort ( ) { "<AssertPlaceHolder>" ; testSpeed ( "BitonicSort" , new kanzi . util . sort . BitonicSort ( ) , 4000 ) ; } testCorrectness ( java . lang . String , kanzi . IntSorter , int ) { System . out . println ( ( "\n\nTest" + sortName ) ) ; for ( int ii = 1 ; ii <= iters ; ii ++ ) { System . out . println (... | org . junit . Assert . assertTrue ( testCorrectness ( "BitonicSort" , new kanzi . util . sort . BitonicSort ( ) , 20 ) ) |
isOrLikeWorking ( ) { final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityOne<sp>r<sp>where<sp>r.stringAttribute<sp>like<sp>'%02%'<sp>or<sp>r.stringAttribute<sp>like<sp>'%01%'" ; final java . util . List < com . uaihebert . model . test . RegularEntityOne > resultFromJPQL = jpqlHelper . getListFromJ... | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) == 2 ) ) |
concurrentWriteLocksMustFailExclusiveLocks ( ) { pageList . unlockExclusive ( pageRef ) ; pageList . tryWriteLock ( pageRef ) ; pageList . tryWriteLock ( pageRef ) ; pageList . unlockWrite ( pageRef ) ; "<AssertPlaceHolder>" ; } tryExclusiveLock ( long ) { long s = org . neo4j . io . pagecache . impl . muninn . OffHeap... | org . junit . Assert . assertFalse ( pageList . tryExclusiveLock ( pageRef ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . workflow . kaleo . model . KaleoDefinition . class , _dynamicQueryClassLoader ) ; dynamicQuery .... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
collectLongOverOptimizeLimit ( ) { java . util . ArrayList < java . lang . Integer > list = new java . util . ArrayList ( com . gs . collections . impl . list . Interval . zeroTo ( com . gs . collections . impl . utility . ArrayListIterateTest . OVER_OPTIMIZED_LIMIT ) ) ; com . gs . collections . api . list . primitive... | org . junit . Assert . assertEquals ( expected , actual ) |
getResultingSizeWithNoRotation ( ) { edu . illinois . library . cantaloupe . image . Dimension fullSize = new edu . illinois . library . cantaloupe . image . Dimension ( 300 , 200 ) ; edu . illinois . library . cantaloupe . image . ScaleConstraint scaleConstraint = new edu . illinois . library . cantaloupe . image . Sc... | org . junit . Assert . assertEquals ( fullSize , instance . getResultingSize ( fullSize , scaleConstraint ) ) |
office2007prettyPrintedRels ( ) { try ( org . apache . poi . openxml4j . opc . OPCPackage pkg = org . apache . poi . openxml4j . opc . OPCPackage . open ( org . apache . poi . poifs . crypt . TestSignatureInfo . testdata . getFile ( "office2007prettyPrintedRels.docx" ) , PackageAccess . READ ) ) { org . apache . poi . ... | org . junit . Assert . assertTrue ( isValid ) |
verifyEvaluation_PwdHash ( ) { addEntry ( "userId" , "123" , "hash" , "12345" , "false" , "realmUserId" , UserAccountStatus . ACTIVE . name ( ) ) ; query . execute ( ) ; "<AssertPlaceHolder>" ; } getPasswordHash ( ) { return passwordHash ; } | org . junit . Assert . assertEquals ( "hash" , new java . lang . String ( query . getPasswordHash ( ) ) ) |
emptySystemPropertiesDefaultToUserConfig ( ) { com . openshift . client . configuration . SystemConfiguration systemConfiguration = new com . openshift . client . fakes . SystemConfigurationFake ( new com . openshift . client . configuration . DefaultConfiguration ( ) ) { @ com . openshift . internal . client . Overrid... | org . junit . Assert . assertEquals ( com . openshift . internal . client . ConfigurationTest . USERNAME2 , configuration . getRhlogin ( ) ) |
executeOperation_CompletePending_Operation ( ) { org . oscm . app . domain . ServiceInstance instance = givenServiceInstance ( ) ; instance . setControllerReady ( true ) ; instance . setProvisioningStatus ( ProvisioningStatus . WAITING_FOR_SYSTEM_OPERATION ) ; doReturn ( instance ) . when ( bean . dao ) . find ( any ( ... | org . junit . Assert . assertEquals ( ProvisioningStatus . COMPLETED , instance . getProvisioningStatus ( ) ) |
messageTest ( ) { rule . setMessage ( "my<sp>message" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { return java . lang . String . format ( "File<sp>has<sp>too<sp>many<sp>classes,<sp>maximum<sp>number<sp>of<sp>classes<sp>is<sp>%d." , limit ) ; } | org . junit . Assert . assertEquals ( "my<sp>message" , rule . getMessage ( ) ) |
testSimpleLimit2 ( ) { java . util . List < com . orientechnologies . orient . core . record . impl . ODocument > qResult = com . orientechnologies . orient . graph . sql . OMatchStatementExecutionTest . db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "match<sp>{class:Person,<sp>as:<sp>... | org . junit . Assert . assertEquals ( 2 , qResult . size ( ) ) |
testDepthFirstOnCircle ( ) { org . hypergraphdb . HGHandle A = graph . add ( "A" ) ; org . hypergraphdb . HGHandle B = graph . add ( "B" ) ; org . hypergraphdb . HGHandle C = graph . add ( "C" ) ; org . hypergraphdb . HGHandle D = graph . add ( "D" ) ; org . hypergraphdb . HGHandle E = graph . add ( "E" ) ; graph . add... | org . junit . Assert . assertArrayEquals ( new org . hypergraphdb . HGHandle [ ] { A , B , C , D , E } , sequence . toArray ( new org . hypergraphdb . HGHandle [ 0 ] ) ) |
returnsEventsInSameOrderAsWritten ( ) { final java . lang . String stream = generateStreamName ( ) ; java . util . List < com . github . msemys . esjc . EventData > events = newTestEvents ( 10 ) ; eventstore . appendToStream ( stream , ExpectedVersion . NO_STREAM , events ) . join ( ) ; com . github . msemys . esjc . S... | org . junit . Assert . assertThat ( slice . events . stream ( ) . map ( ( e ) -> e . event ) . collect ( toList ( ) ) , containsInOrder ( events ) ) |
testScalarSubtractNaN ( ) { org . apache . commons . math . complex . Complex x = new org . apache . commons . math . complex . Complex ( 3.0 , 4.0 ) ; double yDouble = Double . NaN ; org . apache . commons . math . complex . Complex yComplex = new org . apache . commons . math . complex . Complex ( yDouble ) ; "<Asser... | org . junit . Assert . assertEquals ( x . subtract ( yComplex ) , x . subtract ( yDouble ) ) |
shouldNotTransformNonGitHubAnchor ( ) { java . lang . String anchorText = "<a<sp>name=\"todo\"<sp>class=\"anchor\"<sp>href=\"#todo\">stuff</a>" ; java . lang . String resultText = getTransformedText ( anchorText ) ; "<AssertPlaceHolder>" ; } getTransformedText ( java . lang . String ) { given ( webServiceClient . trans... | org . junit . Assert . assertThat ( resultText , org . hamcrest . CoreMatchers . is ( anchorText ) ) |
isTransactionalGraphFalse ( ) { com . tinkerpop . rexster . RexsterApplicationGraph rag = new com . tinkerpop . rexster . RexsterApplicationGraph ( "graph" , com . tinkerpop . blueprints . impls . tg . TinkerGraphFactory . createTinkerGraph ( ) ) ; "<AssertPlaceHolder>" ; } isTransactionalGraph ( ) { final com . tinker... | org . junit . Assert . assertFalse ( rag . isTransactionalGraph ( ) ) |
testHasNextDoesNotAdvanceIterator ( ) { java . util . List < java . lang . String > testList = java . util . Arrays . asList ( "abc" , "bcd" , "cde" ) ; com . googlecode . cqengine . resultset . filter . FilteringIterator < java . lang . String > iterator = new com . googlecode . cqengine . resultset . filter . Filteri... | org . junit . Assert . assertThat ( iterator . next ( ) , org . hamcrest . CoreMatchers . is ( "abc" ) ) |
testOnPlayerInteractFarmlandOp ( ) { when ( player . isOp ( ) ) . thenReturn ( true ) ; when ( clickedBlock . getType ( ) ) . thenReturn ( Material . FARMLAND ) ; org . bukkit . event . player . PlayerInteractEvent e = new org . bukkit . event . player . PlayerInteractEvent ( player , org . bukkit . event . block . Act... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
testIsValidStartupPageWithStartupPage ( ) { org . eclipse . rap . rwt . cluster . testfixture . test . TestHttpUrlConnection connection = new org . eclipse . rap . rwt . cluster . testfixture . test . TestHttpUrlConnection ( 200 , org . eclipse . rap . rwt . cluster . testfixture . client . Response_Test . TYPE_HTML , ... | org . junit . Assert . assertTrue ( response . isValidStartupPage ( ) ) |
testResultaatisGroterAlsDatumAanvangIsGelijk ( ) { final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoonHisVolledig = nl . bzk . brp . util . testpersoonbouwers . TestPersoonAntwoordPersoon . maakAntwoordPersoon ( ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . Persoon... | org . junit . Assert . assertEquals ( 1 , resultaat ) |
testParseNegativeReal ( ) { java . lang . String source = ( ( ( "-1" + ( getDecimalCharacter ( ) ) ) + "232323232323<sp>+<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "4343i" ; org . apache . commons . math3 . complex . Complex expected = new org . apache . commons . math3 . complex . Complex ( ( - 1.232323232323 ) , 1.43... | org . junit . Assert . assertEquals ( expected , actual ) |
testAssignability3 ( ) { java . util . Set < javax . enterprise . inject . spi . Bean < ? > > beans = beanManager . getBeans ( new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . assignability . Dao < ? > > ( ) { } . getType ( ) ) ; System . err . println ( ( "beans<sp>=<sp>" + beans ) ) ; "<Asse... | org . junit . Assert . assertEquals ( 2 , beans . size ( ) ) |
putsDouble ( ) { double [ ] array = new double [ 4 ] ; java . nio . DoubleBuffer buffer = java . nio . DoubleBuffer . wrap ( array ) ; buffer . put ( 2 ) . put ( 3 ) . put ( 5 ) . put ( 7 ) ; "<AssertPlaceHolder>" ; } put ( E ) { java . util . Objects . requireNonNull ( e ) ; while ( isFull ( ) ) { waitForChange ( 0 ) ... | org . junit . Assert . assertThat ( array , org . hamcrest . CoreMatchers . is ( new double [ ] { 2 , 3 , 5 , 7 } ) ) |
testUserCredentials ( ) { org . junit . Assume . assumeThat ( credentials , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . instanceOf ( com . google . auth . oauth2 . UserCredentials . class ) ) ) ; "<AssertPlaceHolder>" ; } canAcquireIdToken ( com . google . auth . oauth2 . GoogleCredentials ) { final co... | org . junit . Assert . assertThat ( com . spotify . styx . client . GoogleIdTokenAuthTest . canAcquireIdToken ( credentials ) , org . hamcrest . Matchers . is ( true ) ) |
test04 ( ) { java . lang . String outFile = ( com . itextpdf . kernel . pdf . ParentTreeTest . destinationFolder ) + "parentTreeTest04.pdf" ; java . lang . String cmpFile = ( com . itextpdf . kernel . pdf . ParentTreeTest . sourceFolder ) + "cmp_parentTreeTest04.pdf" ; com . itextpdf . kernel . pdf . PdfDocument docume... | org . junit . Assert . assertTrue ( checkParentTree ( outFile , cmpFile ) ) |
shouldAcceptUnboundedRanges ( ) { final java . io . InputStream in = new java . io . ByteArrayInputStream ( "0123456789" . getBytes ( ) ) ; try ( final org . fcrepo . http . commons . responses . RangeRequestInputStream out = new org . fcrepo . http . commons . responses . RangeRequestInputStream ( in , 0L , ( - 1L ) )... | org . junit . Assert . assertEquals ( "0123456789" , s ) |
testOnlyOneAtom ( ) { org . openscience . cdk . interfaces . IAtomContainer mol = org . openscience . cdk . tools . ATASaturationCheckerTest . sp . parseSmiles ( "C" ) ; int preBondCount = mol . getBondCount ( ) ; atasc . decideBondOrder ( mol ) ; "<AssertPlaceHolder>" ; } getBondCount ( ) { return this . bondCount ; } | org . junit . Assert . assertEquals ( preBondCount , mol . getBondCount ( ) ) |
testChangeStatusToClosedPullRequest ( ) { org . guvnor . structure . repositories . PullRequest pullRequest = service . createPullRequest ( "test-realm" , "child/a" , "develop" , "test-realm" , "parent/a" , "master" ) ; ( ( org . guvnor . structure . backend . repositories . PullRequestServiceImpl ) ( service ) ) . cha... | org . junit . Assert . assertEquals ( PullRequestStatus . CLOSED , pullRequests . get ( 0 ) . getStatus ( ) ) |
shouldReadFloVersion ( ) { final java . lang . String expectedVersion ; try ( final java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( com . spotify . flo . context . Version . class . getResourceAsStream ( "/com/spotify/flo/flo-runner.version" ) ) ) ) { expectedVer... | org . junit . Assert . assertThat ( com . spotify . flo . context . Version . floRunnerVersion ( ) , org . hamcrest . Matchers . is ( expectedVersion ) ) |
testElementScrollableByOverflowXIsVisible ( ) { java . lang . String [ ] pages = new java . lang . String [ ] { "overflow/x_scroll_y_hidden.html" , "overflow/x_scroll_y_scroll.html" , "overflow/x_scroll_y_auto.html" , "overflow/x_auto_y_hidden.html" , "overflow/x_auto_y_scroll.html" , "overflow/x_auto_y_auto.html" } ; ... | org . junit . Assert . assertTrue ( page , right . isDisplayed ( ) ) |
testUpdateJson ( ) { com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; com . fasterxml . jackson . databind . node . ObjectNode json = new com . fasterxml . jackson . databind . node . ObjectNode ( objectMapper . getNodeFactory ( ) ) ; json ... | org . junit . Assert . assertEquals ( json , value ) |
test91 ( ) { byte [ ] buffer ; java . lang . String test = "test" ; java . io . ByteArrayOutputStream stream = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintWriter writer = new java . io . PrintWriter ( stream ) ; writer . println ( test ) ; writer . close ( ) ; buffer = stream . toByteArray ( ) ; stream... | org . junit . Assert . assertEquals ( test , reader . get ( 0 ) ) |
noAnnotatedLinksFieldOrMethod ( ) { com . basho . riak . client . core . query . links . RiakLinks riakLinks = new com . basho . riak . client . core . query . links . RiakLinks ( ) ; java . lang . Object o = new java . lang . Object ( ) ; com . basho . riak . client . core . query . links . RiakLink link = new com . b... | org . junit . Assert . assertTrue ( riakLinks . isEmpty ( ) ) |
testTest2 ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
setSortByProperty_ascending ( ) { com . vaadin . data . provider . ListDataProvider < com . vaadin . data . provider . StrBean > dataProvider = getDataProvider ( ) ; dataProvider . setSortOrder ( StrBean :: getId , SortDirection . ASCENDING ) ; int [ ] threeFirstIds = dataProvider . fetch ( new com . vaadin . data . pr... | org . junit . Assert . assertArrayEquals ( new int [ ] { 0 , 1 , 2 } , threeFirstIds ) |
testClose ( ) { java . util . concurrent . atomic . AtomicBoolean closeCalled = new java . util . concurrent . atomic . AtomicBoolean ( ) ; com . liferay . petra . io . unsync . UnsyncFilterInputStream unsyncFilterInputStream = new com . liferay . petra . io . unsync . UnsyncFilterInputStream ( new com . liferay . petr... | org . junit . Assert . assertTrue ( closeCalled . get ( ) ) |
testRangeCoveredForLong ( ) { final long min = 100L ; final long superMin = 50L ; final long max = 200L ; final long superMax = 300L ; "<AssertPlaceHolder>" ; } isRangeCovered ( java . lang . Number , java . lang . Number , java . lang . Number , java . lang . Number ) { return ( ( org . opendaylight . yangtools . yang... | org . junit . Assert . assertTrue ( org . opendaylight . yangtools . yang . model . util . type . NumberUtil . isRangeCovered ( min , max , superMin , superMax ) ) |
canMailPollerInvokeHandler ( ) { gov . hhs . fha . nhinc . mail . MailReceiver mockMailReceiver = mock ( gov . hhs . fha . nhinc . mail . MailReceiver . class ) ; gov . hhs . fha . nhinc . mail . MessageHandler mockMessageHandler = mock ( gov . hhs . fha . nhinc . mail . MessageHandler . class ) ; gov . hhs . fha . nhi... | org . junit . Assert . assertEquals ( gov . hhs . fha . nhinc . mail . AbstractMailPollerTest . EXCEPTION_MSG , e . getMessage ( ) ) |
whenNoParamsSpecifiedReturnsOnlyAlerts ( ) { java . io . ByteArrayOutputStream responseBody = new java . io . ByteArrayOutputStream ( ) ; fi . nls . oskari . control . ActionParameters params = new fi . nls . oskari . control . ActionParameters ( ) ; params . setRequest ( mockHttpServletRequest ( ) ) ; params . setResp... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldCreateIndexGivenCreateSchemaRuleCommand ( ) { final org . neo4j . storageengine . api . schema . StoreIndexDescriptor indexRule = indexRule ( 1 , 42 , 42 , org . neo4j . kernel . impl . transaction . command . NeoTransactionIndexApplierTest . INDEX_DESCRIPTOR ) ; final org . neo4j . kernel . impl . transaction . ... | org . junit . Assert . assertFalse ( result ) |
testHasMethod ( ) { com . eclipsesource . jaxrs . consumer . internal . RequestConfigurer configurer = mock ( com . eclipsesource . jaxrs . consumer . internal . RequestConfigurer . class ) ; javax . ws . rs . core . Response response = mock ( javax . ws . rs . core . Response . class ) ; com . eclipsesource . jaxrs . ... | org . junit . Assert . assertEquals ( "GET" , method ) |
shouldReturnListOfProductsByName ( ) { sampleProductRepository . index ( new org . springframework . data . elasticsearch . entities . Product ( "1" , "test<sp>product<sp>1" , "How<sp>great<sp>would<sp>it<sp>be<sp>if<sp>we<sp>could<sp>search<sp>for<sp>this<sp>product." , true ) ) ; sampleProductRepository . index ( new... | org . junit . Assert . assertThat ( products . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) ) |
getVersionMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveVersionCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveVersionCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_VERSION ) ) ) ; org . openhab . binding . z... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) ) |
testIsZeroFill ( ) { classUnderTest . setZeroFill ( true ) ; "<AssertPlaceHolder>" ; } IsZeroFill ( ) { return this . isZeroFill ; } | org . junit . Assert . assertEquals ( true , classUnderTest . IsZeroFill ( ) ) |
testConstructor ( ) { new org . openhealthtools . mdht . uml . cda . operations . ParticipantRoleOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
testEnvmapperNotInConsumer ( ) { java . io . File wsdl = getCodegenQEDataFileInput ( "s_envMapper" 5 ) ; testArgs = new java . lang . String [ ] { "s_envMapper" 2 , "s_envMapper" 8 , "-genType" , "Consumer" , "-wsdl" , wsdl . getAbsolutePath ( ) , "-dest" , destDir . getAbsolutePath ( ) , "s_envMapper" 9 , ( destDir . ... | org . junit . Assert . assertTrue ( consumerFile . exists ( ) ) |
testSpec04 ( ) { javax . el . ELProcessor processor = new javax . el . ELProcessor ( ) ; java . lang . Object result = processor . getValue ( "v<sp>=<sp>(x,y)->x+y;<sp>v(3,4)" , org . apache . el . parser . Integer . class ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return org . apache . tomcat . util . net . jsse ... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 7 ) , result ) |
floatWrapper ( ) { model . setMyFloat ( 1.0F ) ; com . google . appengine . api . datastore . Entity entity = meta . modelToEntity ( model ) ; com . google . appengine . api . datastore . Key key = ds . put ( entity ) ; com . google . appengine . api . datastore . Entity entity2 = ds . get ( key ) ; org . slim3 . datas... | org . junit . Assert . assertThat ( model2 . getMyFloat ( ) , org . hamcrest . CoreMatchers . is ( 1.0F ) ) |
happy_case ( ) { java . util . List < org . estatio . module . lease . dom . invoicing . InvoiceForLease > invoiceList = invoiceForLeaseRepository . findByFixedAssetAndDueDateAndStatus ( propertyKal , org . incode . module . base . integtests . VT . ld ( 2012 , 1 , 1 ) , InvoiceStatus . NEW ) ; "<AssertPlaceHolder>" ; ... | org . junit . Assert . assertThat ( invoiceList . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) ) |
generateDDL_whenTableHasNoEncodingSet_returnsDDLStringWithNoEncoding ( ) { org . jkiss . dbeaver . ext . greenplum . model . PostgreTableColumn mockPostgreTableColumn = mockDbColumn ( "column1" , "int4" , 1 ) ; java . util . List < org . jkiss . dbeaver . ext . greenplum . model . PostgreTableColumn > tableColumns = ja... | org . junit . Assert . assertEquals ( expectedDDLWithNoEncodingSet , table . generateDDL ( monitor ) ) |
whenCreatingAResourceTypeOfTypeDate_EnsureTheTimeZoneIsSetTOADefaultAndDoesNotAffectRetrieval ( ) { java . util . TimeZone . setDefault ( java . util . TimeZone . getTimeZone ( "GMT-8" ) ) ; java . time . LocalDateTime rightNow = java . time . LocalDateTime . now ( ) ; try ( grakn . core . server . session . SessionImp... | org . junit . Assert . assertEquals ( rightNow , databaseTime ) |
test0TimesXMatrix ( ) { org . ujmp . core . Matrix m1 = createMatrixWithAnnotation ( 5 , 7 ) ; org . ujmp . core . Matrix m2 = createMatrixWithAnnotation ( 5 , 7 ) ; m2 . randn ( Ret . ORIG ) ; org . ujmp . core . Matrix m3 = m1 . times ( m2 ) ; "<AssertPlaceHolder>" ; if ( m1 instanceof org . ujmp . core . interfaces ... | org . junit . Assert . assertTrue ( getLabel ( ) , m3 . isEmpty ( ) ) |
schedulingEveryTimeAJobShouldRunThatJobAtTheExpectedTime ( ) { org . silverpeas . core . scheduler . trigger . JobTrigger trigger = org . silverpeas . core . scheduler . trigger . JobTrigger . triggerEvery ( 1 , TimeUnit . SECOND ) ; scheduler . scheduleJob ( new org . silverpeas . core . scheduler . Job ( org . silver... | org . junit . Assert . assertThat ( eventHandler . isJobSucceeded ( ) , is ( true ) ) |
testGetLoopCountWithAnimatedNonLoopingImage ( ) { try ( edu . illinois . library . cantaloupe . processor . codec . GIFMetadataReader reader = new edu . illinois . library . cantaloupe . processor . codec . GIFMetadataReader ( ) ) { reader . setSource ( newImageInputStream ( "gif-animated-non-looping.gif" ) ) ; edu . i... | org . junit . Assert . assertEquals ( 0 , metadata . getLoopCount ( ) ) |
testBuildNegativeStatesQuery ( ) { org . opencastproject . workflow . api . WorkflowQuery q = new org . opencastproject . workflow . api . WorkflowQuery ( ) . withSeriesId ( "series1" ) . withoutState ( WorkflowState . RUNNING ) . withoutState ( WorkflowState . PAUSED ) ; java . lang . String solrQuery = dao . createQu... | org . junit . Assert . assertEquals ( expected , solrQuery ) |
shouldGetChildRegisterForAGivenANM ( ) { java . util . Map < java . lang . String , java . lang . String > immunizations = org . ei . drishti . common . util . EasyMap . create ( "opv_1" 8 , "measles" 3 ) . put ( "measles" 4 , "measles" 3 ) . put ( "pentavalent_2" 1 , "measles" 3 ) . put ( "opv_1" , "measles" 3 ) . put... | org . junit . Assert . assertEquals ( expectedRegister , register ) |
emptyEnv ( ) { java . util . Map < java . lang . String , java . lang . String > env = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; java . util . Set < java . lang . String > javaResult = runJavaProcess ( command , env ) ; java . util . Set < java . lang . String > nuResult = runNuPro... | org . junit . Assert . assertEquals ( javaResult , nuResult ) |
various ( ) { com . querydsl . core . types . dsl . StringPath a = com . querydsl . core . types . dsl . Expressions . stringPath ( "a" ) ; com . querydsl . core . types . dsl . StringPath b = com . querydsl . core . types . dsl . Expressions . stringPath ( "b" ) ; for ( com . querydsl . core . Tuple strs : com . query... | org . junit . Assert . assertEquals ( strs . get ( a ) , ( ( strs . get ( b ) ) + ( strs . get ( b ) ) ) ) |
updateDataKeyVariableWithResponseBody ( ) { final org . springframework . http . ResponseEntity < java . lang . Object > responseEntity = mock ( org . springframework . http . ResponseEntity . class ) ; given ( responseEntity . getBody ( ) ) . willReturn ( "foo" ) ; doThrow ( com . ge . digitaltwin . tutorial . workflo... | org . junit . Assert . assertNotNull ( re ) |
addingNullAttributeKeyShouldHaveNoEffect ( ) { final ro . isdc . wro . cache . CacheKey key = createValidCacheKey ( ) . addAttribute ( null , "" ) ; "<AssertPlaceHolder>" ; } createValidCacheKey ( ) { return new ro . isdc . wro . cache . CacheKey ( "g1" , ro . isdc . wro . model . resource . ResourceType . JS , false )... | org . junit . Assert . assertEquals ( key , createValidCacheKey ( ) ) |
testQuotedComparison ( ) { org . opengis . filter . Filter filter = org . geotools . filter . text . ecql . ECQL . toFilter ( "\"a\"=\"b\"" ) ; final org . opengis . filter . FilterFactory2 ff = org . geotools . factory . CommonFactoryFinder . getFilterFactory2 ( ) ; final org . opengis . filter . Filter expected = ff ... | org . junit . Assert . assertEquals ( expected , filter ) |
whenClusterStateSpecified_managedServerDesiredStateIsAsSpecified ( ) { configureCluster ( oracle . kubernetes . weblogic . domain . DomainTestBase . CLUSTER_NAME ) . withDesiredState ( "NEVER" ) ; oracle . kubernetes . weblogic . domain . model . ServerSpec spec = domain . getServer ( oracle . kubernetes . weblogic . d... | org . junit . Assert . assertThat ( spec . getDesiredState ( ) , org . hamcrest . Matchers . equalTo ( "NEVER" ) ) |
testPrepareInputsOneFile ( ) { java . util . Map < java . lang . String , java . io . Serializable > rawInputs = new java . util . HashMap ( ) ; org . apache . camel . component . bonita . api . model . FileInput file = new org . apache . camel . component . bonita . api . model . FileInput ( "filename" , "String" . ge... | org . junit . Assert . assertEquals ( rawInputs . size ( ) , inputs . size ( ) ) |
testGetRGBA ( ) { com . ait . lienzo . shared . core . types . Color color = com . ait . lienzo . shared . core . tests . BISQUE . getColor ( ) ; final java . lang . String BISQUE_RGBA = java . lang . String . format ( "rgba(%s,%s,%s,%s)" , com . ait . lienzo . shared . core . tests . BISQUE . getR ( ) , com . ait . li... | org . junit . Assert . assertEquals ( BISQUE_RGBA , color . getRGBA ( ) ) |
isTenantActivated ( ) { final org . bonitasoft . engine . platform . model . impl . STenantImpl tenant = buildTenant ( "ACTIVATED" ) ; "<AssertPlaceHolder>" ; } isActivated ( ) { return ! ( STenant . DEACTIVATED . equals ( getStatus ( ) ) ) ; } | org . junit . Assert . assertTrue ( tenant . isActivated ( ) ) |
run ( ) { org . postgresql . core . CommandCompleteParser expected = new org . postgresql . core . CommandCompleteParser ( ) ; org . postgresql . core . CommandCompleteParser actual = new org . postgresql . core . CommandCompleteParser ( ) ; expected . set ( oid , rows ) ; actual . parse ( input ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( input , expected , actual ) |
cascadeGenericMethodFromSpecializedGenericClass ( mockit . CascadingFieldTest$GenericBaseClass1 ) { mockit . CascadingFieldTest . C value = mock . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return - 1 ; } | org . junit . Assert . assertNotNull ( value ) |
refresh ( ) { io . robe . test . request . TestRequest request = getRequestBuilder ( ) . endpoint ( "refresh" ) . build ( ) ; io . robe . test . request . TestResponse response = client . get ( request ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; } | org . junit . Assert . assertEquals ( response . getStatus ( ) , 200 ) |
testRoundTripOfInstantAndJavaUtilDate ( ) { java . time . Instant givenInstant = java . time . LocalDate . of ( 2016 , 1 , 1 ) . atStartOfDay ( ) . atZone ( ZoneOffset . UTC ) . toInstant ( ) ; java . lang . String json = MAPPER . writer ( ) . without ( com . fasterxml . jackson . databind . SerializationFeature . WRIT... | org . junit . Assert . assertEquals ( givenInstant , actual ) |
givenString_transformedToStream_convertToListOfChar ( ) { java . lang . String programming_languages = "java,python,nodejs,ruby" ; java . util . List < java . lang . Character > expectation = new java . util . ArrayList < java . lang . Character > ( ) ; char [ ] charArray = programming_languages . toCharArray ( ) ; for... | org . junit . Assert . assertEquals ( result , expectation ) |
testReconstructionRandom1 ( ) { org . apache . commons . math3 . random . RandomGenerator rnd = getRandom ( ) ; cc . redberry . rings . util . RandomDataGenerator rndd = getRandomData ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { long num = rndd . nextLong ( 10 , 1000 ) ; long den = rndd . nextLong ( ( num + 1 ) , 1100 )... | org . junit . Assert . assertEquals ( n , cc . redberry . rings . poly . MachineArithmetic . mod ( ( ( re [ 0 ] ) * ( cc . redberry . rings . poly . MachineArithmetic . modInverse ( re [ 1 ] , modulus ) ) ) , modulus ) ) |
testThatBindingContextMustBeNotNull ( ) { try { org . esa . snap . ui . RegionSelectableWorldMapPane . ensureValidBindingContext ( null ) ; org . junit . Assert . fail ( "should<sp>not<sp>come<sp>here" ) ; } catch ( java . lang . IllegalArgumentException expected ) { "<AssertPlaceHolder>" ; } catch ( java . lang . Exce... | org . junit . Assert . assertEquals ( "bindingContext<sp>must<sp>be<sp>not<sp>null" , expected . getMessage ( ) ) |
captureClassesFromTheJavaManagementAPI ( mockit . ThreadMXBean ) { mockit . ThreadMXBean threadingBean = mockit . ManagementFactory . getThreadMXBean ( ) ; int threadCount = threadingBean . getThreadCount ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 0 , threadCount ) |
concurrentInsertions ( ) { org . apache . bookkeeper . util . collections . ConcurrentLongHashSet set = new org . apache . bookkeeper . util . collections . ConcurrentLongHashSet ( ) ; java . util . concurrent . ExecutorService executor = java . util . concurrent . Executors . newCachedThreadPool ( ) ; final int nThrea... | org . junit . Assert . assertEquals ( set . size ( ) , ( n * nThreads ) ) |
testRewritePomDependenciesWithoutDependenciesVersionUpdate ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "internal-snapshot-dependencies-without-dependencies-version-update" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBui... | org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) ) |
testGetBuildScript4 ( ) { java . io . File build = root . newFile ( "build.gradle" ) ; java . io . File settings = root . newFile ( "settings.gradle" ) ; java . io . File module = root . newFolder ( "module" ) ; java . nio . file . Files . write ( settings . toPath ( ) , java . util . Arrays . asList ( "include<sp>':mo... | org . junit . Assert . assertEquals ( "build.gradle" , gf . getBuildScript ( ) . getName ( ) ) |
manageModificationVDiskDeletion_VSERVER_STOPPED_FOR_MODIFICATION_VDiskAttached ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_MODIFICATION ; org . oscm . app . iaas . data . FlowState newState = null ; paramHandler . getIaasContext ( ) . set... | org . junit . Assert . assertEquals ( FlowState . VSDISK_DELETION_REQUESTED , newState ) |
updateFileNameToLoader ( ) { java . lang . String expectedFile = "Stamatis" ; stub . setFileName ( expectedFile ) ; presenter . start ( ) ; presenter . fileNameChanged ( ) ; "<AssertPlaceHolder>" ; } getFileName ( ) { return this . fileName ; } | org . junit . Assert . assertEquals ( expectedFile , loader . getFileName ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.