input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testApplyTagsBrokenEL ( ) { com . streamsets . pipeline . stage . executor . s3 . config . AmazonS3ExecutorConfig config = getConfig ( ) ; config . taskConfig . tags = org . testcontainers . shaded . com . google . common . collect . ImmutableMap . of ( "${record:value('/ke" , "${record:value('/value')}" ) ; com . stre... | org . junit . Assert . assertEquals ( 1 , runner . getErrorRecords ( ) . size ( ) ) |
testIsSubTypeSuperClassNull ( ) { spoon . reflect . factory . Factory factory = spoon . testing . utils . ModelUtils . createFactory ( ) ; factory . Class ( ) . create ( "Tacos" ) ; spoon . reflect . reference . CtTypeReference < ? > subRef = factory . Type ( ) . createReference ( spoon . test . reference . AutoCloseab... | org . junit . Assert . assertFalse ( subRef . isSubtypeOf ( superRef ) ) |
canControlLogLevel ( ) { setLogLevel ( Level . OFF ) ; java . lang . String message = "an<sp>error<sp>occured" ; log ( Level . SEVERE , message ) ; "<AssertPlaceHolder>" ; } log ( org . infinitest . util . Level , java . lang . String ) { org . infinitest . util . InfinitestUtils . fireLoggingEvent ( level , logMsg ) ;... | org . junit . Assert . assertNull ( messages . get ( message ) ) |
testBadDfman ( ) { java . io . File dir = com . cloudera . util . FileUtil . mktempdir ( ) ; com . cloudera . flume . agent . diskfailover . DiskFailoverManager dfman = new com . cloudera . flume . agent . diskfailover . NaiveFileFailoverManager ( dir ) { @ com . cloudera . flume . agent . diskfailover . Override publi... | org . junit . Assert . assertEquals ( null , src . next ( ) ) |
shouldReturnEmptyQueryOnEmptyListOfHvals ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "hvals" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( QueryParsing . V ) ) . thenReturn ( "string_field" ) ; when ( jedisMock . hvals ( anyString ( ) ) ... | org . junit . Assert . assertEquals ( 0 , terms . size ( ) ) |
getRuntimeIdentity ( ) { createStage ( ) ; cloud . orbit . actors . test . RuntimeIdentityTest . IdentityGetter identityGetter = cloud . orbit . actors . Actor . getReference ( cloud . orbit . actors . test . RuntimeIdentityTest . IdentityGetter . class , "0" ) ; "<AssertPlaceHolder>" ; } getReference ( java . lang . C... | org . junit . Assert . assertNotNull ( identityGetter . getRuntimeIdentity ( ) . join ( ) ) |
testPeek ( ) { com . sun . sgs . test . app . util . TestScalableDeque . txnScheduler . runTask ( new com . sun . sgs . test . util . TestAbstractKernelRunnable ( ) { public void run ( ) throws com . sun . sgs . test . app . util . Exception { com . sun . sgs . app . util . ScalableDeque < java . lang . Integer > d = n... | org . junit . Assert . assertEquals ( 2 , ( ( int ) ( d . peek ( ) ) ) ) |
testWithWrongPackage ( ) { com . google . inject . Injector injector = com . google . inject . Guice . createInjector ( de . devsurf . injection . guice . scanner . StartupModule . create ( de . devsurf . injection . guice . scanner . asm . ASMClasspathScanner . class , de . devsurf . injection . guice . scanner . Pack... | org . junit . Assert . assertNotNull ( injector ) |
testMenuItemVisibility_ManageLanguages ( ) { setUser ( OPERATOR ) ; org . oscm . ui . menu . MenuGroup accountGroup = getGroup ( HiddenUIConstants . MENU_GROUP_NAVIGATION_OPERATOR ) ; boolean isManageLanguagesVisible = isVisible ( HiddenUIConstants . MENU_ITEM_OPERATOR_MANAGE_LANGUAGES , accountGroup ) ; "<AssertPlaceH... | org . junit . Assert . assertTrue ( isManageLanguagesVisible ) |
testToString ( ) { java . lang . String string1 = generalization . toString ( ) ; java . lang . String string2 = ( "{id:<sp>" + ( generalization . getId ( ) ) ) + ",<sp>name:<sp>\"TestGeneralization\",<sp>parent:<sp>\"5678\",<sp>child:<sp>\"1234\"}" ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertEquals ( string2 , string1 ) |
testProcess ( ) { io . beanmother . testmodel . Author author = new io . beanmother . testmodel . Author ( ) ; author . setId ( 1 ) ; io . beanmother . core . postprocessor . PostProcessor < io . beanmother . testmodel . Author > postProcessor = new io . beanmother . core . postprocessor . PostProcessor < io . beanmoth... | org . junit . Assert . assertEquals ( 9 , author . getId ( ) ) |
testToString2 ( ) { org . eclipse . kura . core . net . LoopbackInterfaceConfigImpl config = createConfig ( 2 ) ; config . setHardwareAddress ( org . eclipse . kura . core . net . util . NetworkUtil . macToBytes ( "<sp>getUsbDevicePath()=usbDevicePath,<sp>getUsbPort()=usbBusNumber-usbDevicePath]<sp>::<sp>driver=driverN... | org . junit . Assert . assertEquals ( expected , config . toString ( ) ) |
testGetAzureStorageSourceBlobKeyReturningNil ( ) { edu . illinois . library . cantaloupe . resource . RequestContext context = new edu . illinois . library . cantaloupe . resource . RequestContext ( ) ; context . setIdentifier ( new edu . illinois . library . cantaloupe . image . Identifier ( "missing" ) ) ; instance .... | org . junit . Assert . assertNull ( instance . getAzureStorageSourceBlobKey ( ) ) |
testProxyHost ( ) { model . setProxyHost ( "localhost" ) ; "<AssertPlaceHolder>" ; } getProxyHost ( ) { return proxyHost ; } | org . junit . Assert . assertEquals ( "localhost" , model . getProxyHost ( ) ) |
proxyToSuccess ( ) { io . trane . future . Promise < java . lang . Integer > p1 = io . trane . future . Promise . apply ( ) ; io . trane . future . Promise < java . lang . Integer > p2 = io . trane . future . Promise . apply ( ) ; p1 . proxyTo ( p2 ) ; p1 . setValue ( 1 ) ; "<AssertPlaceHolder>" ; } get ( io . trane . ... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , get ( p2 ) ) |
leesAlsCacheReedsBestaat ( ) { nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig persoonHisVolledig = new nl . bzk . brp . model . hisvolledig . kern . PersoonHisVolledig ( ) ; when ( entityManager . find ( eq ( nl . bzk . brp . model . hisvolledig . PersoonHisVolledigCache . class ) , anyInt ( ) ) ) . t... | org . junit . Assert . assertNotNull ( resultaat ) |
testBootstrapPath ( ) { java . lang . String path = "/v3/bootstrap" ; io . netty . handler . codec . http . HttpRequest httpRequest = new io . netty . handler . codec . http . DefaultHttpRequest ( io . cdap . cdap . gateway . router . RouterPathLookupTest . VERSION , new io . netty . handler . codec . http . HttpMethod... | org . junit . Assert . assertEquals ( RouterPathLookup . APP_FABRIC_HTTP , result ) |
testAddConnectionChangeListener ( ) { final org . bff . javampd . server . ConnectionChangeEvent [ ] changeEvent = new org . bff . javampd . server . ConnectionChangeEvent [ 1 ] ; connectionMonitor . addConnectionChangeListener ( ( event ) -> changeEvent [ 0 ] = event ) ; when ( server . isConnected ( ) ) . thenReturn ... | org . junit . Assert . assertEquals ( false , changeEvent [ 0 ] . isConnected ( ) ) |
designateSuspect_InputNewSuspectAndSuspectSet_Success ( ) { java . lang . String testSuspect = "testSuspect" ; java . util . List < java . lang . String > suspectSet = new java . util . ArrayList ( ) ; suspectSet . add ( "SuspectA" ) ; suspectSet . add ( "SuspectB" ) ; suspectSet . add ( "SuspectC" ) ; testDocResult . ... | org . junit . Assert . assertEquals ( testSuspect , testDocResult . getSuspectedAuthor ( ) ) |
skillViolationAtEnd_shouldWork ( ) { jsprit . core . analysis . SolutionAnalyser analyser = new jsprit . core . analysis . SolutionAnalyser ( vrp , solution , new jsprit . core . problem . cost . TransportDistance ( ) { @ jsprit . core . analysis . Override public double getDistance ( jsprit . core . problem . Location... | org . junit . Assert . assertFalse ( violated ) |
breakStatementNotInLoop2 ( ) { com . fizzed . rocker . compiler . TemplateParser parser = createParser ( ) ; java . io . File f = findTemplate ( "rocker/parser/BreakStatementNotInLoop2.rocker.html" ) ; try { com . fizzed . rocker . compiler . TemplateModel model = parser . parse ( f ) ; org . junit . Assert . fail ( ) ... | org . junit . Assert . assertEquals ( 1 , e . getLineNumber ( ) ) |
testIsWifiReady ( ) { org . eclipse . kura . net . admin . monitor . WifiMonitorServiceImpl svc = new org . eclipse . kura . net . admin . monitor . WifiMonitorServiceImpl ( ) { @ org . eclipse . kura . net . admin . monitor . Override protected boolean isWifiDeviceOn ( java . lang . String interfaceName ) { return tru... | org . junit . Assert . assertTrue ( ready ) |
should_send_email_when_contract_expires_in_1_day ( ) { com . autentia . tnt . businessobject . User user = com . autentia . tnt . test . utils . SpringUtilsForTesting . createUser ( "contract-1d" ) ; user . setEndContractDate ( java . util . Date . from ( java . time . LocalDate . now ( ) . plusDays ( 1 ) . atStartOfDa... | org . junit . Assert . assertThat ( userCount , is ( 1 ) ) |
shouldReturnNullWhenBranchDoesntExist ( ) { org . eclipse . jgit . lib . BranchTrackingStatus status = org . eclipse . jgit . lib . BranchTrackingStatus . of ( util . getRepository ( ) , "doesntexist" ) ; "<AssertPlaceHolder>" ; } getRepository ( ) { return repository ; } | org . junit . Assert . assertNull ( status ) |
testRightIntegerLong ( ) { int expected = 5 ; int actual = cFunction . right ( 10 , 1L ) ; "<AssertPlaceHolder>" ; } right ( java . lang . Integer , java . lang . Long ) { return l1 > > l2 ; } | org . junit . Assert . assertEquals ( expected , actual ) |
manifestConsumerVirtOnly ( ) { org . candlepin . model . ConsumerType type = new org . candlepin . model . ConsumerType ( ConsumerType . ConsumerTypeEnum . CANDLEPIN ) ; consumerTypeCurator . create ( type ) ; org . candlepin . model . Consumer c = new org . candlepin . model . Consumer ( "test-consumer" , "test-user" ... | org . junit . Assert . assertEquals ( 1 , results . size ( ) ) |
testClose ( ) { registration . setActive ( true ) ; registration . close ( ) ; "<AssertPlaceHolder>" ; } isActive ( ) { return org . opendaylight . netconf . callhome . protocol . MinaSshNettyChannel . notClosing ( session ) ; } | org . junit . Assert . assertFalse ( registration . isActive ( ) ) |
testNumberToStringWithNonTenRadix ( ) { java . lang . Object result = eval ( "Number(255).toString(16)" ) ; "<AssertPlaceHolder>" . isEqualTo ( "ff" ) ; } eval ( java . io . InputStream ) { return getRuntime ( ) . evaluate ( new org . dynjs . runtime . source . InputStreamSourceProvider ( in ) ) ; } | org . junit . Assert . assertThat ( result ) |
shouldReturnNewEditRelationIfBothHaveSameIdentifierAndSameSlaveGroupId ( ) { ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation existingEditRelation = new ch . puzzle . itc . mobiliar . business . property . entity . ResourceEditRelation ( null , null , "Test" , null , null , null , null... | org . junit . Assert . assertThat ( replaced , org . hamcrest . CoreMatchers . is ( newEditRelation ) ) |
testCopyToOtherGradoopId ( ) { org . gradoop . common . model . impl . id . GradoopId inputId = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; org . gradoop . common . model . impl . id . GradoopId emptyId = new org . gradoop . common . model . impl . id . GradoopId ( ) ; inputId . copyTo ( emptyId ... | org . junit . Assert . assertEquals ( inputId , emptyId ) |
testDatasourceSerialization ( ) { javax . naming . InitialContext context = new javax . naming . InitialContext ( ) ; javax . sql . DataSource originalDs = ( ( javax . sql . DataSource ) ( context . lookup ( org . jboss . as . test . smoke . datasource . DsTestCase . JNDI_NAME ) ) ) ; java . io . ByteArrayOutputStream ... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
testDot ( ) { tl . lin . data . map . HMapII m1 = new tl . lin . data . map . HMapII ( ) ; m1 . put ( 1 , 2 ) ; m1 . put ( 2 , 1 ) ; m1 . put ( 3 , 3 ) ; tl . lin . data . map . HMapII m2 = new tl . lin . data . map . HMapII ( ) ; m2 . put ( 1 , 1 ) ; m2 . put ( 2 , 4 ) ; m2 . put ( 4 , 5 ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertEquals ( 6 , m1 . dot ( m2 ) ) |
testFetchPlanDepth ( ) { com . orientechnologies . orient . core . db . document . ODatabaseDocument database = new com . orientechnologies . orient . core . db . document . ODatabaseDocumentTx ( ( "memory:" + ( com . orientechnologies . orient . core . sql . fetch . DepthFetchPlanTest . class . getSimpleName ( ) ) ) )... | org . junit . Assert . assertEquals ( 1 , listener . count ) |
findExactOrClosestPastReleaseShouldReturnClosestPastRelease ( ) { ch . puzzle . itc . mobiliar . business . generator . control . extracted . SortedSet < ch . puzzle . itc . mobiliar . business . releasing . entity . ReleaseEntity > releases = new ch . puzzle . itc . mobiliar . business . generator . control . extracte... | org . junit . Assert . assertThat ( release2 , org . hamcrest . CoreMatchers . is ( mostRelevantRelease ) ) |
testConvert ( ) { java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; org . lnu . is . domain . gender . type . GenderType source = new org . lnu . is . domain . gender . type . GenderType ( ) ; source . setName ( name ) ; source . setAbbrName ( abbrName ) ; org . lnu . is . resource .... | org . junit . Assert . assertEquals ( expected , actual ) |
shouldConsumeArchiveCompletely ( ) { final java . io . InputStream is = org . apache . commons . compress . archivers . zip . ZipArchiveInputStreamTest . class . getResourceAsStream ( "/archive_with_trailer.zip" ) ; final org . apache . commons . compress . archivers . zip . ZipArchiveInputStream zip = new org . apache... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
listAllVisibilityOptionsForwardsCalls ( ) { final java . util . List < org . phenotips . data . permissions . Visibility > visibilities = java . util . Arrays . asList ( org . phenotips . data . permissions . internal . DefaultEntityPermissionsManagerTest . PUBLIC_VISIBILITY , org . phenotips . data . permissions . int... | org . junit . Assert . assertSame ( visibilities , this . component . listAllVisibilityOptions ( ) ) |
testDetermineFileFormat ( ) { org . pentaho . platform . dataaccess . datasource . wizard . csv . CsvInspector inspector = new org . pentaho . platform . dataaccess . datasource . wizard . csv . CsvInspector ( ) ; java . lang . String line = "12;24;45\r\n59;99;100\r\n" ; "<AssertPlaceHolder>" ; } determineFileFormat ( ... | org . junit . Assert . assertEquals ( TextFileInputMeta . FILE_FORMAT_DOS , inspector . determineFileFormat ( line ) ) |
testQueryRawObjectsThrow ( ) { com . j256 . ormlite . dao . Dao < com . j256 . ormlite . dao . Foo , java . lang . Integer > dao = createDao ( com . j256 . ormlite . dao . Foo . class , true ) ; com . j256 . ormlite . dao . Foo foo = new com . j256 . ormlite . dao . Foo ( ) ; "<AssertPlaceHolder>" ; com . j256 . ormlit... | org . junit . Assert . assertEquals ( 1 , dao . create ( foo ) ) |
testGetProtectedItemImporters ( ) { "<AssertPlaceHolder>" ; } getProtectedItemImporters ( ) { return java . util . Collections . singletonList ( new org . apache . jackrabbit . oak . spi . security . authentication . external . impl . principal . ExternalIdentityImporter ( ) ) ; } | org . junit . Assert . assertTrue ( configuration . getProtectedItemImporters ( ) . isEmpty ( ) ) |
multi_source ( ) { java . io . File output = folder . newFolder ( "output" ) ; java . io . File source1 = folder . newFolder ( "dmdl" ) ; new java . io . File ( source1 , "a.dmdl" ) . createNewFile ( ) ; new java . io . File ( source1 , "b.dmdl" ) . createNewFile ( ) ; java . io . File source2 = folder . newFile ( "fil... | org . junit . Assert . assertThat ( config . getSource ( ) , is ( source ( "a.dmdl" , "b.dmdl" , "file.dmdl" ) ) ) |
testWriteReadSeq ( ) { useFCOption = false ; positionReadOption = false ; java . lang . String fname = filenameOption ; long rdBeginPos = 0 ; int stat = testWriteAndRead ( fname , org . apache . hadoop . hdfs . TestWriteRead . WR_NTIMES , org . apache . hadoop . hdfs . TestWriteRead . WR_CHUNK_SIZE , rdBeginPos ) ; org... | org . junit . Assert . assertEquals ( 0 , stat ) |
findBySubjectOpenSocialIdWithNoResults ( ) { java . util . List < org . eurekastreams . server . domain . Recommendation > actual = jpaRecommendationMapper . findBySubjectOpenSocialId ( "no-such-id" ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( org . eurekastreams . se... | org . junit . Assert . assertEquals ( 0 , actual . size ( ) ) |
formatNoS3LinkValue ( ) { final java . lang . String noS3Link = "http://www.acme.io/resource" ; when ( sensor . getDataType ( ) ) . thenReturn ( DataType . LINK ) ; when ( observation . getValue ( ) ) . thenReturn ( noS3Link ) ; final java . lang . String formattedValue = valueFormatter . formatValue ( sensor , observa... | org . junit . Assert . assertEquals ( noS3Link , formattedValue ) |
testCalculateNextStartIndex_SecondPage ( ) { int nextStartIndex = org . deegree . services . wfs . util . ResponsePagingUtils . calculateNextStartIndex ( 0 , 10 , 97 ) ; "<AssertPlaceHolder>" ; } calculateNextStartIndex ( int , int , int ) { int nextStartIndex = startIndex + count ; if ( nextStartIndex < hits ) { retur... | org . junit . Assert . assertThat ( nextStartIndex , org . hamcrest . CoreMatchers . is ( 10 ) ) |
testCellIncrement ( ) { setUp ( ) ; int [ ] coords = table . getCoordinates ( 30 ) ; table . increment ( coords , 1 ) ; "<AssertPlaceHolder>" ; } getValue ( int [ ] ) { return table . getValue ( testCell ) ; } | org . junit . Assert . assertEquals ( 1 , table . getValue ( coords ) ) |
validatePaymentTypeSupportedBySupplier_RefNotEnabledDefault ( ) { createSupplierCustomerReference ( ) ; "<AssertPlaceHolder>" ; org . oscm . validation . PaymentDataValidator . validatePaymentTypeSupportedBySupplier ( customer , product_none , invoice ) ; } isPaymentTypeSupportedBySupplier ( org . oscm . domobjects . O... | org . junit . Assert . assertFalse ( org . oscm . validation . PaymentDataValidator . isPaymentTypeSupportedBySupplier ( customer , product_none , invoice ) ) |
testDoubleClickFunction ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testDoubleClickFunction" ) ; org . eclipse . linuxtools . internal . valgrind . cachegrind . CachegrindViewPart view = ( ( org . eclipse . linuxtools . internal... | org . junit . Assert . assertEquals ( expectedLine , line ) |
setIndex ( ) { org . sejda . sambox . cos . COSArray victim = new org . sejda . sambox . cos . COSArray ( ) ; victim . growToSize ( 2 ) ; victim . set ( 1 , COSInteger . THREE ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return actuals . get ( key ) ; } | org . junit . Assert . assertEquals ( COSInteger . THREE , victim . get ( 1 ) ) |
testShutdown ( ) { java . lang . Shutdown p1 = new java . lang . Shutdown ( ) ; p1 . setMessageNumber ( 9874 ) ; p1 . setTimeStamp ( 3453 ) ; p1 . setDestinationID ( 3 ) ; byte [ ] p1_data = p1 . getEncoded ( ) ; udt . UDTPacket p = udt . packets . PacketFactory . createPacket ( p1_data ) ; java . lang . Shutdown p2 = ... | org . junit . Assert . assertEquals ( p1 , p2 ) |
shouldParseJsonTermsFromRedisOnGetCommand ( ) { when ( localParamsMock . get ( "command" ) ) . thenReturn ( "get" ) ; when ( localParamsMock . get ( "key" ) ) . thenReturn ( "simpleKey" ) ; when ( localParamsMock . get ( "serialization" ) ) . thenReturn ( "json" ) ; when ( localParamsMock . get ( QueryParsing . V ) ) .... | org . junit . Assert . assertEquals ( 3 , terms . size ( ) ) |
testIsProjectSelected_NotSelected ( ) { final org . kie . workbench . common . screens . examples . model . ImportProject project = mock ( org . kie . workbench . common . screens . examples . model . ImportProject . class ) ; "<AssertPlaceHolder>" ; } isProjectSelected ( org . kie . workbench . common . screens . exam... | org . junit . Assert . assertFalse ( page . isProjectSelected ( project ) ) |
testGetBorder_returnsZeroRectangle ( ) { org . eclipse . rap . rwt . theme . BoxDimensions border = folder . getAdapter ( org . eclipse . rap . rwt . theme . ControlThemeAdapter . class ) . getBorder ( folder ) ; "<AssertPlaceHolder>" ; } getBorder ( org . eclipse . swt . custom . CLabel ) { int style = clabel . getSty... | org . junit . Assert . assertEquals ( new org . eclipse . rap . rwt . theme . BoxDimensions ( 0 , 0 , 0 , 0 ) , border ) |
testDeleteAuditTaskInfoLogByDateRangeEnd ( ) { java . util . Date endDate = taskTestData [ 4 ] . getTaskData ( ) . getCreatedOn ( ) ; org . kie . internal . task . query . AuditTaskDeleteBuilder updateBuilder = this . auditTaskDelete ( ) . dateRangeEnd ( endDate ) ; int result = updateBuilder . build ( ) . execute ( ) ... | org . junit . Assert . assertEquals ( 5 , result ) |
activeMQTest ( ) { javax . jms . Destination dest = org . apache . activemq . command . ActiveMQQueue . createDestination ( "testQueue" , ActiveMQQueue . QUEUE_TYPE ) ; javax . jms . ConnectionFactory factory = new org . apache . activemq . ActiveMQConnectionFactory ( "vm://localhost?broker.useJmx=false&broker.persiste... | org . junit . Assert . assertEquals ( sentMsg , receivedMsg ) |
testGetSigner ( ) { xades4j . production . XadesSigner s = new xades4j . production . XadesBesSigningProfile ( new xades4j . providers . KeyingDataProvider ( ) { @ xades4j . production . Override public java . util . List < java . security . cert . X509Certificate > getSigningCertificateChain ( ) { throw new java . lan... | org . junit . Assert . assertNotNull ( s ) |
testZip ( ) { final java . util . HashMap < java . lang . String , byte [ ] > hashMap = new java . util . HashMap < java . lang . String , byte [ ] > ( 2 ) ; hashMap . put ( "file1.txt" , "content1" . getBytes ( ) ) ; hashMap . put ( "file2.txt" , "content2\ncontent2" . getBytes ( ) ) ; final byte [ ] zip = org . bonit... | org . junit . Assert . assertNotNull ( zip ) |
testScanCloseAfterRollback ( ) { for ( int i = 0 ; i < ( com . geophile . erdo . OrderedMapTransactionTest . N ) ; i ++ ) { map . put ( com . geophile . erdo . TestRecord . createRecord ( i , null ) ) ; } com . geophile . erdo . Cursor cursor = map . first ( ) ; db . rollbackTransaction ( ) ; cursor . close ( ) ; "<Ass... | org . junit . Assert . assertNull ( cursor . next ( ) ) |
testVolumeTooLow ( ) { int volume = player . getVolume ( ) ; player . setVolume ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getVolume ( ) { return volume ; } | org . junit . Assert . assertEquals ( volume , player . getVolume ( ) ) |
findFeedUsingPrincipalsName_NonMatchingUserNameAndFeedName ( ) { com . thinkbiganalytics . metadata . jpa . feed . JpaOpsManagerFeed feed = new com . thinkbiganalytics . metadata . jpa . feed . JpaOpsManagerFeed ( com . thinkbiganalytics . metadata . jpa . feed . OpsManagerFeedId . create ( ) , "non-matching-feed-name"... | org . junit . Assert . assertEquals ( 0 , feedNames . size ( ) ) |
testGetMatchingRecords_GET ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/DiscoveryServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . DiscoveryService discoveryService = argusService . getDiscover... | org . junit . Assert . assertEquals ( expected , result ) |
testParameterType ( ) { org . nuxeo . ecm . automation . OperationContext context = new org . nuxeo . ecm . automation . OperationContext ( session ) ; service . run ( context , "testChainParameterType" ) ; org . nuxeo . ecm . core . api . DocumentModelList list = ( ( org . nuxeo . ecm . core . api . DocumentModelList ... | org . junit . Assert . assertEquals ( 3 , list . size ( ) ) |
testStripPom ( ) { final java . io . File out = java . io . File . createTempFile ( "pom" , null ) ; out . deleteOnExit ( ) ; new io . github . zlika . reproducible . PomPropertiesStripper ( ) . strip ( new java . io . File ( this . getClass ( ) . getResource ( "pom.properties" ) . getFile ( ) ) , out ) ; final byte [ ... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testCopyProperties ( ) { com . github . emailtohl . building . site . entities . user . User u = com . github . emailtohl . building . common . utils . BeanUtil . copyProperties ( bar , com . github . emailtohl . building . site . entities . user . User . class ) ; com . github . emailtohl . building . common . utils .... | org . junit . Assert . assertEquals ( "bar" , u . getName ( ) ) |
getPropertyWhenNoExistAsRequestParam ( ) { final javax . servlet . http . HttpServletRequest httpRequest = mockery . mock ( javax . servlet . http . HttpServletRequest . class ) ; this . mockery . checking ( new org . jmock . Expectations ( ) { { oneOf ( httpRequest ) . getParameter ( "key" ) ; will ( returnValue ( "va... | org . junit . Assert . assertEquals ( "value" , request . getProperty ( "key" ) ) |
testTwoFilesInTwoReferencedProjects ( ) { createTwoReferencedProjects ( ) ; org . eclipse . core . resources . IFile firstFile = createFile ( ( "first/src/first" + ( F_EXT ) ) , "object<sp>First<sp>" ) ; createFile ( ( "second/src/second" + ( F_EXT ) ) , "object<sp>Second<sp>references<sp>First" ) ; build ( ) ; startLo... | org . junit . Assert . assertEquals ( 2 , getInvocationCount ( ) ) |
testDeleteRecursiveEmptyDirectoriesOnlyButIsFile ( ) { java . io . File f1 = new java . io . File ( trash , "test/test/a" ) ; org . eclipse . jgit . util . FileUtils . mkdirs ( f1 . getParentFile ( ) ) ; org . eclipse . jgit . util . FileUtils . createNewFile ( f1 ) ; try { org . eclipse . jgit . util . FileUtils . del... | org . junit . Assert . assertTrue ( f1 . exists ( ) ) |
testAfterPropertiesSet_not_define_one_CodeList ( ) { org . springframework . context . support . StaticApplicationContext mockApplicationContext = new org . springframework . context . support . StaticApplicationContext ( ) ; mockApplicationContext . registerSingleton ( "simpleMapCodeList" , org . terasoluna . gfw . co... | org . junit . Assert . assertThat ( testTarget . getCodeLists ( ) . toString ( ) , org . hamcrest . CoreMatchers . is ( expectedCodeLists . toString ( ) ) ) |
verifyStapANaluLengts_OneNal_ShouldPass ( ) { "<AssertPlaceHolder>" ; } buildAndVerifyStapA ( int [ ] , int ) { return buildAndVerifyStapA ( naluSizes , offset , packetLength ( naluSizes ) ) ; } | org . junit . Assert . assertTrue ( buildAndVerifyStapA ( new int [ ] { 10 } , 1 ) ) |
test_Same_Value_Yet_Native_Vs_IOU_Inequality ( ) { com . ripple . core . coretypes . Amount a = com . ripple . core . AmountTest . amt ( "1/USD/rNDKeo9RrCiRdfsMG8AdoZvNZxHASGzbZL" ) ; com . ripple . core . coretypes . Amount b = com . ripple . core . AmountTest . amt ( "1" ) ; "<AssertPlaceHolder>" ; } equals ( java . ... | org . junit . Assert . assertFalse ( a . equals ( b ) ) |
testVarAndArgs_Disabled2 ( ) { final java . lang . String cfcSrc = "<cfcomponent>\r\n" + ( ( ( ( ( "<cffunction<sp>name=\"test\">\r\n" + "<sp>" ) + "<!---CFLINT-DISABLE<sp>ARG_DEFAULT_MISSING<sp>,XXX<sp>--->" ) + "<cfargument<sp>name=\"xyz\">\r\n" ) + "</cffunction>\r\n" ) + "</cfcomponent>" ) ; com . cflint . api . CF... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
shouldSelectDistinctNodesWhenJoiningMultiValueReferenceProperties ( ) { javax . jcr . Node nodeA = session . getRootNode ( ) . addNode ( "B" 4 , "B" 7 ) ; nodeA . setProperty ( "test:name" , "B" 4 ) ; javax . jcr . Node nodeB = session . getRootNode ( ) . addNode ( "B" , "B" 7 ) ; nodeB . setProperty ( "test:name" , "B... | org . junit . Assert . assertNotNull ( row . getValue ( "B" 6 ) ) |
trie_longest_match_03 ( ) { org . apache . jena . atlas . lib . Trie < java . lang . Integer > trie = new org . apache . jena . atlas . lib . Trie ( ) ; trie . add ( "test" , 123 ) ; trie . add ( "testing" , 456 ) ; trie . remove ( "testing" ) ; "<AssertPlaceHolder>" ; } longestMatch ( java . lang . String ) { T value ... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 123 ) ) , trie . longestMatch ( "testing" ) ) |
testContainsNoTimeValues ( ) { de . lessvoid . xml . xpp3 . Attributes p = new de . lessvoid . xml . xpp3 . Attributes ( ) ; p . set ( "suff" , "2" ) ; p . set ( "value" , "4" ) ; effectValues . add ( p ) ; "<AssertPlaceHolder>" ; } containsTimeValues ( ) { if ( values . isEmpty ( ) ) { return false ; } for ( de . less... | org . junit . Assert . assertFalse ( effectValues . containsTimeValues ( ) ) |
definitelyImmutableResultsAreEqual ( ) { org . mutabilitydetector . AnalysisResult first = org . mutabilitydetector . AnalysisResult . definitelyImmutable ( "some.Class" ) ; org . mutabilitydetector . AnalysisResult second = org . mutabilitydetector . AnalysisResult . definitelyImmutable ( "some.Class" ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( first , second ) |
testGetLevenshteinScore1 ( ) { final double EXPECT = 0.2857142857142857 ; java . lang . String inputStr = "name" ; java . lang . String outputStr = "created" ; double result = org . talend . utils . string . Levenshtein . getLevenshteinScore ( inputStr , outputStr ) ; "<AssertPlaceHolder>" ; } getLevenshteinScore ( jav... | org . junit . Assert . assertTrue ( ( result == EXPECT ) ) |
testNoDeliveryAnnotationsReturnedOnEmptyDeliveryAnnotationsMap ( ) { org . apache . qpid . jms . provider . amqp . message . AmqpJmsMessageFacade amqpMessageFacade = createNewMessageFacade ( ) ; java . util . Map < org . apache . qpid . proton . amqp . Symbol , java . lang . Object > deliveryAnnotationsMap = new java .... | org . junit . Assert . assertNull ( amqpMessageFacade . getDeliveryAnnotations ( ) ) |
testSetScope ( ) { org . opengis . util . InternationalString result = ( ( org . geotools . temporal . reference . DefaultTemporalReferenceSystem ) ( temporalReferenceSystem1 ) ) . getScope ( ) ; "<AssertPlaceHolder>" ; } getScope ( ) { return scope ; } | org . junit . Assert . assertEquals ( ( ( org . geotools . temporal . reference . DefaultTemporalReferenceSystem ) ( temporalReferenceSystem1 ) ) . getScope ( ) , result ) |
testGetPropertyWithUnknownProperty ( ) { target = new org . o3project . odenos . remoteobject . ObjectProperty ( "ObjType" , "ObjID" ) ; java . lang . String result = target . getProperty ( "Unknown" ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { return property . get ( key ) ; } | org . junit . Assert . assertNull ( result ) |
executeForStaticValue ( ) { org . springframework . integration . xquery . support . XQueryParameter param = new org . springframework . integration . xquery . support . XQueryParameter ( "paramName" , java . lang . Integer . valueOf ( 10 ) ) ; java . lang . Object value = param . evaluate ( null ) ; "<AssertPlaceHolde... | org . junit . Assert . assertEquals ( value , java . lang . Integer . valueOf ( 10 ) ) |
testPreserveProperty ( ) { java . lang . Object value = new java . lang . Object ( ) ; adapter . preserve ( "prop" , value ) ; "<AssertPlaceHolder>" ; } getPreserved ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; } | org . junit . Assert . assertSame ( value , adapter . getPreserved ( "prop" ) ) |
should_getCssContent_return_bonitaCss_when_portal ( ) { final org . bonitasoft . engine . theme . impl . ThemeServiceStartupHelper themeServiceStartupHelper = spy ( new org . bonitasoft . engine . theme . impl . ThemeServiceStartupHelper ( themeService , themeRetriever , themeActionCalculator ) ) ; doReturn ( org . bon... | org . junit . Assert . assertThat ( cssContent ) |
collectFloatOverOptimizeLimit ( ) { 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 . primitiv... | org . junit . Assert . assertEquals ( expected , actual ) |
barcodeSearch ( ) { java . lang . String expected = "http://musicbrainz.org/ws/2/release/?query=barcode:792258106329&limit=1" ; java . lang . String actual = org . musicbrainz . android . api . webservice . QueryBuilder . barcodeSearch ( "792258106329" ) ; "<AssertPlaceHolder>" ; } barcodeSearch ( java . lang . String ... | org . junit . Assert . assertEquals ( expected , actual ) |
testRuntimeMetricsWhenDisabled ( ) { com . microsoft . azure . eventhubs . sendrecv . ReceiverRuntimeMetricsTest . receiverWithOptionsDisabled . receiveSync ( 10 ) ; "<AssertPlaceHolder>" ; } getRuntimeInformation ( ) { java . util . concurrent . CompletableFuture < com . microsoft . azure . eventhubs . EventHubRuntime... | org . junit . Assert . assertTrue ( ( ( com . microsoft . azure . eventhubs . sendrecv . ReceiverRuntimeMetricsTest . receiverWithOptionsDisabled . getRuntimeInformation ( ) ) == null ) ) |
marshallableToScalar3 ( ) { net . openhft . chronicle . wire . UnsupportedChangesTest . BooleanWrapper wrapper = net . openhft . chronicle . wire . Marshallable . fromString ( net . openhft . chronicle . wire . UnsupportedChangesTest . BooleanWrapper . class , ( "{\n" + ( ( "flag:<sp>{<sp>a:<sp>128,<sp>b:<sp>1.0<sp>},\... | org . junit . Assert . assertNotNull ( wrapper ) |
testAtomsTo_Int_OutOfBoundsIndex ( ) { org . openscience . cdk . interfaces . IAtomContainer simple = org . openscience . cdk . graph . ShortestPathsTest . simple ( ) ; org . openscience . cdk . graph . ShortestPaths paths = new org . openscience . cdk . graph . ShortestPaths ( simple , simple . getAtom ( 0 ) ) ; "<Ass... | org . junit . Assert . assertArrayEquals ( new org . openscience . cdk . interfaces . IAtom [ 0 ] , paths . atomsTo ( 20 ) ) |
timeWindowIfEnclosing ( ) { net . time4j . range . IntervalCollection < net . time4j . PlainDate > coll = net . time4j . range . IntervalCollection . onDateAxis ( ) . plus ( net . time4j . range . DateInterval . parseISO ( "2013-06-30/2013-12-31" ) ) . plus ( net . time4j . range . DateInterval . parseISO ( "2014-06-30... | org . junit . Assert . assertThat ( coll . withTimeWindow ( window ) , org . hamcrest . CoreMatchers . is ( coll ) ) |
one_$parent_projection_list ( ) { java . lang . String pr = "[{'field':'field7.$parent.field6.*','include':1},{'field':'field5'}]" ; com . redhat . lightblue . eval . Projector projector = projector ( pr , md ) ; com . fasterxml . jackson . databind . JsonNode expectedNode = com . redhat . lightblue . util . JsonUtils ... | org . junit . Assert . assertEquals ( expectedNode . toString ( ) , newDoc . toString ( ) ) |
testSerialization ( ) { org . jfree . chart . axis . NumberAxis a1 = new org . jfree . chart . axis . NumberAxis ( "Test<sp>Axis" ) ; org . jfree . chart . axis . NumberAxis a2 = ( ( org . jfree . chart . axis . NumberAxis ) ( org . jfree . chart . TestUtilities . serialised ( a1 ) ) ) ; "<AssertPlaceHolder>" ; } seria... | org . junit . Assert . assertEquals ( a1 , a2 ) |
split_string_comma_java ( ) { java . lang . String [ ] elementsInString = "Yo,Gabba,<sp>Gabba,<sp>Keep<sp>Trying" . split ( "," ) ; com . levelup . java . string . SplitStringByComma . logger . info ( java . util . Arrays . toString ( elementsInString ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( elementsInString . length ) == 4 ) ) |
testGetPaginatedThesaurusSandoxedTermsList ( ) { fr . mcc . ginco . beans . ThesaurusTerm thesaurusTerm1 = new fr . mcc . ginco . beans . ThesaurusTerm ( ) ; fr . mcc . ginco . beans . ThesaurusTerm thesaurusTerm2 = new fr . mcc . ginco . beans . ThesaurusTerm ( ) ; java . util . List < fr . mcc . ginco . beans . Thesa... | org . junit . Assert . assertEquals ( 2 , actualResponse . size ( ) ) |
testGetConnectionUrlValidParamsAndAdditionalJDBCParams ( ) { this . setAdditionalJDBCParameters ( ) ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; java . lang . String expectedUrl = builder . append ( "jdbc:snowflake://" ) . append ( org . talend . components . snowflake . SnowflakeConnec... | org . junit . Assert . assertEquals ( expectedUrl , resultUrl ) |
testFindBySqlDataType ( ) { try { java . lang . String [ ] [ ] data = new java . lang . String [ ] [ ] { new java . lang . String [ ] { java . lang . String . valueOf ( Types . BIT ) , "CHAR" 1 } , new java . lang . String [ ] { java . lang . String . valueOf ( Types . TINYINT ) , "CHAR" 7 } , new java . lang . String ... | org . junit . Assert . assertEquals ( ( ( "STRUCT" 3 + sqlType ) + "CHAR" 4 ) , expectedMnType , mysqlNativeType ) |
finishedQueueTest ( ) { executeTest ( ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( 60000 ) ; this . mockMvc . perform ( get ( "/nmap/finishedQueued" ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( content ( ) . string ( org . hamcrest . CoreMatchers . containsString ( "true" ) ) ) ; } executeTest ... | org . junit . Assert . assertNotNull ( "mockMvc<sp>couldn't<sp>be<sp>initiated" , mockMvc ) |
testRemove ( ) { com . liferay . social . kernel . model . SocialActivity newSocialActivity = addSocialActivity ( ) ; _persistence . remove ( newSocialActivity ) ; com . liferay . social . kernel . model . SocialActivity existingSocialActivity = _persistence . fetchByPrimaryKey ( newSocialActivity . getPrimaryKey ( ) )... | org . junit . Assert . assertNull ( existingSocialActivity ) |
testThatWeGetAVersion ( ) { com . datasift . client . DataSiftConfig config = new com . datasift . client . DataSiftConfig ( ) ; java . io . File pom = new java . io . File ( "./pom.xml" ) ; if ( ! ( pom . exists ( ) ) ) { org . junit . Assert . fail ( "Unable<sp>to<sp>find<sp>pom.xml" ) ; } java . util . List < java .... | org . junit . Assert . assertEquals ( version , config . getClientVersion ( ) ) |
testConstructorWithValidTargetClass ( ) { final org . teiid . core . util . ReflectionHelper helper = new org . teiid . core . util . ReflectionHelper ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( helper ) |
groupByUniqueKey_target ( ) { org . eclipse . collections . api . map . MutableMap < java . lang . Integer , java . lang . Integer > integers = this . newSetWith ( 1 , 2 , 3 ) . groupByUniqueKey ( ( id ) -> id , org . eclipse . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( 0 , 0 ) ) ; "<AssertPl... | org . junit . Assert . assertEquals ( org . eclipse . collections . impl . map . mutable . UnifiedMap . newWithKeysValues ( 0 , 0 , 1 , 1 , 2 , 2 , 3 , 3 ) , integers ) |
testFallback ( ) { org . apache . beam . sdk . extensions . sorter . ExternalSorter mockExternalSorter = mock ( org . apache . beam . sdk . extensions . sorter . ExternalSorter . class ) ; org . apache . beam . sdk . extensions . sorter . InMemorySorter mockInMemorySorter = mock ( org . apache . beam . sdk . extensions... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( kvs [ 0 ] , kvs [ 1 ] , kvs [ 2 ] ) , testSorter . sort ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.