input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
lockShouldReturnTrueItTheTableIsNotLocked ( ) { initShouldNotCreateTheSchemaIfItAlreadyExists ( ) ; reset ( connection , metaData , statement , preparedStatement , resultSet ) ; expect ( connection . isClosed ( ) ) . andReturn ( false ) ; expect ( connection . prepareStatement ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableN... | org . junit . Assert . assertTrue ( lockAcquired ) |
testToAlternateNull ( ) { com . sun . mail . util . logging . CompactFormatter cf = new com . sun . mail . util . logging . CompactFormatter ( ) ; "<AssertPlaceHolder>" ; } toAlternate ( java . lang . String ) { return s != null ? s . replaceAll ( "[\\x00-\\x1F\\x7F]+" , "" ) : null ; } | org . junit . Assert . assertNull ( cf . toAlternate ( ( ( java . lang . String ) ( null ) ) ) ) |
simpleAPI ( ) { java . lang . Long key = 1L ; java . lang . String value1 = "key" ; cache . put ( key , value1 ) ; java . lang . String value2 = cache . get ( key ) ; "<AssertPlaceHolder>" ; } get ( K ) { return writtenKeys . get ( key ) ; } | org . junit . Assert . assertEquals ( value1 , value2 ) |
testSortLongArray ( ) { for ( int r = 0 ; r < ( REPEAT_WITH_RANDOMNESS ) ; r ++ ) { for ( int size : ARRAY_SIZES_TO_TEST ) { long [ ] array = new long [ size ] ; for ( int i = 0 ; i < ( array . length ) ; i ++ ) { array [ i ] = rng . nextLong ( ) ; if ( rng . nextBoolean ( ) ) { array [ i ] *= - 1 ; } } for ( boolean s... | org . junit . Assert . assertArrayEquals ( actual , expected ) |
testGetTextBeforeBufferStart ( ) { org . antlr . v4 . runtime . CharStream input = org . antlr . v4 . test . tool . TestUnbufferedCharStream . createStream ( "xyz" ) ; input . consume ( ) ; int m1 = input . mark ( ) ; "<AssertPlaceHolder>" ; input . getText ( new org . antlr . v4 . runtime . misc . Interval ( 0 , 1 ) )... | org . junit . Assert . assertEquals ( 1 , input . index ( ) ) |
testIterator1 ( ) { java . util . Iterator < java . lang . Integer > i = org . opencastproject . util . data . Collections . iterator ( new java . lang . Integer [ 0 ] ) ; "<AssertPlaceHolder>" ; i . next ( ) ; } hasNext ( ) { return ( index ) < ( nl . getLength ( ) ) ; } | org . junit . Assert . assertFalse ( i . hasNext ( ) ) |
synchronizeSteps ( ) { final java . lang . String stepName = "SharedStep" ; org . pentaho . di . trans . TransMeta transformarion1 = createTransMeta ( ) ; org . pentaho . di . trans . step . StepMeta step1 = org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . createStepMeta ( stepName , true ) ; transformarion... | org . junit . Assert . assertThat ( step1 . getDescription ( ) , org . hamcrest . CoreMatchers . equalTo ( org . pentaho . di . ui . spoon . SharedObjectSyncUtilTest . AFTER_SYNC_VALUE ) ) |
testCreateTokenInfoName06 ( ) { org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck methodAnnotation = mock ( org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck . class ) ; org . terasoluna . gfw . web . token . transaction . TransactionTokenCheck classAnnotation = mock ( ... | org . junit . Assert . assertNotNull ( store . createTokenName ( classAnnotation , methodAnnotation ) ) |
updateUnits ( ) { stackUnitIs ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "MB" ) ; setUpStack ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE , org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV ) ; java . u... | org . junit . Assert . assertEquals ( expected , configuration . getProperties ( ) ) |
testEmptyDocument ( ) { com . sjl . dsl4xml . DocumentReader < java . lang . Object > _r = newDocumentReader ( defs . emptyDocument ( ) ) ; java . lang . Object _result = _r . read ( newReader ( "{}" ) ) ; "<AssertPlaceHolder>" ; } read ( com . sjl . dsl4xml . gson . Reader ) { com . google . gson . stream . JsonReader... | org . junit . Assert . assertNotNull ( _result ) |
testMigratePhoneNumberSuccess ( ) { com . sun . jersey . api . client . Client jerseyClient = com . sun . jersey . api . client . Client . create ( ) ; jerseyClient . addFilter ( new com . sun . jersey . api . client . filter . HTTPBasicAuthFilter ( adminUsername , adminAuthToken ) ) ; java . lang . String provisioning... | org . junit . Assert . assertEquals ( 200 , clientResponse . getStatus ( ) ) |
testSequenceFlowExecutionSetPriorityEmpty ( ) { org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowExecutionSet sequenceFlowExecutionSet = new org . kie . workbench . common . stunner . bpmn . definition . property . connectors . SequenceFlowExecutionSet ( ) ; sequenceFlo... | org . junit . Assert . assertTrue ( violations . isEmpty ( ) ) |
testGetParamteresWithoutSecurity ( ) { unit . setSecurity ( false ) ; java . lang . Long personId = 1L ; org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; person . setId ( personId ) ; java . lang . Long contactTypeId = 2L ; org . lnu . is . domain . contact . type .... | org . junit . Assert . assertEquals ( expected , actual ) |
testConvertReplyOneDoc ( ) { final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Arrays . asList ( com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . build ( ) ) ; final com . allanbank . mongodb . client . message . Reply reply = new com . allanbank . mo... | org . junit . Assert . assertSame ( docs . get ( 0 ) , callback . convert ( reply ) ) |
givenResourceExists_whenResourceIsRetrieved_thenResourceIsRetrievedCorrectly ( ) { final com . baeldung . domain . Foo existingResource = persistNewEntity ( ) ; final com . baeldung . domain . Foo retrievedResource = getApi ( ) . findOne ( existingResource . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id... | org . junit . Assert . assertEquals ( existingResource , retrievedResource ) |
testVarAndArgs_Cfscript_OK2 ( ) { final java . lang . String cfcSrc = "component<sp>{<sp>\r\n" + ( ( "public<sp>void<sp>function<sp>foo(any<sp>arg1=\"123\")<sp>{<sp>\r\n" + "}<sp>\r\n" ) + "}" ) ; com . cflint . api . CFLintResult lintresult = cfBugs . scan ( cfcSrc , "test" ) ; final java . util . Map < java . lang . ... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
defaultExecution_noRetryRule_testcaseRunOnce ( ) { ( count ) ++ ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( 2 , count ) |
shouldRaiseConstraintViolationCausePriceLow ( ) { org . agoncal . book . javaee7 . chapter03 . ex02 . Book02 book = new org . agoncal . book . javaee7 . chapter03 . ex02 . Book02 ( "H2G2" , 0.5F , "Best<sp>IT<sp>Scifi<sp>Book" , "1234-4566-9876" , 247 , false ) ; java . util . Set < javax . validation . ConstraintViola... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testPutForceCheckpointCommitReplay ( ) { java . util . Map < java . lang . String , java . lang . String > overrides = com . google . common . collect . Maps . newHashMap ( ) ; overrides . put ( FileChannelConfiguration . CAPACITY , java . lang . String . valueOf ( 2 ) ) ; overrides . put ( FileChannelConfiguration . T... | org . junit . Assert . assertTrue ( channel . isOpen ( ) ) |
testGetJointAdmission ( ) { boolean isArchived = true ; int clientId1 = 101 ; int clientId2 = 202 ; org . oscarehr . common . model . JointAdmission jointAdmission1 = new org . oscarehr . common . model . JointAdmission ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( ... | org . junit . Assert . assertEquals ( expectedResult , result ) |
testSpaceToBatch ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 7331 ) ; int miniBatch = 4 ; int [ ] inputShape = new int [ ] { 1 , 2 , 2 , 1 } ; int M = 2 ; int [ ] blockShape = new int [ ] { M , 1 } ; int [ ] paddingShape = new int [ ] { M ,... | org . junit . Assert . assertNull ( err , err ) |
testShouldBeAbleToPassABooleanAsArgument ( ) { driver . get ( pages . javascriptPage ) ; boolean value = ( ( java . lang . Boolean ) ( executeScript ( "return<sp>arguments[0]<sp>==<sp>true;" , true ) ) ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String , java . lang . Object [ ] ) { return null ; } | org . junit . Assert . assertTrue ( value ) |
testUnitaryOnSphere ( ) { for ( int phi = - 90 ; phi <= 90 ; phi += 15 ) { transform = org . geotoolkit . referencing . operation . projection . LambertAzimuthalEqualAreaTest . create ( false , phi ) ; tolerance = org . geotoolkit . referencing . operation . projection . LambertAzimuthalEqualAreaTest . TOLERANCE ; vali... | org . junit . Assert . assertTrue ( isSpherical ( ) ) |
set_boolean_enablesChaining ( ) { array . add ( false ) ; "<AssertPlaceHolder>" ; } set ( java . lang . String , com . restfb . json . JsonValue ) { if ( name == null ) { throw new java . lang . NullPointerException ( com . restfb . json . JsonObject . NAME_IS_NULL ) ; } if ( value == null ) { throw new java . lang . N... | org . junit . Assert . assertSame ( array , array . set ( 0 , true ) ) |
testRouterDeployPathLookUp ( ) { java . lang . String path = "/v3/namespaces/default//apps/" ; 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 . ... | org . junit . Assert . assertEquals ( RouterPathLookup . APP_FABRIC_HTTP , result ) |
testQueueIsEmptyAfterCreation ( ) { queue = new org . apache . flume . channel . file . FlumeEventQueue ( backingStore , backingStoreSupplier . getInflightTakes ( ) , backingStoreSupplier . getInflightPuts ( ) , backingStoreSupplier . getQueueSetDir ( ) ) ; "<AssertPlaceHolder>" ; } removeHead ( long ) { if ( ( backing... | org . junit . Assert . assertNull ( queue . removeHead ( 0L ) ) |
testOwnerInfoEntitlementsConsumedByFamilySeperatesVirtAndPhysical ( ) { owner . addEntitlementPool ( pool1 ) ; org . candlepin . model . Product product = org . candlepin . test . TestUtil . createProduct ( ) ; product . setAttribute ( Pool . Attributes . VIRT_ONLY , "true" ) ; createProduct ( product , owner ) ; pool1... | org . junit . Assert . assertEquals ( expected , info . getEntitlementsConsumedByFamily ( ) ) |
test ( ) { java . util . Vector xaRecoveryNodes = new java . util . Vector ( ) ; xaRecoveryNodes . add ( "2" ) ; System . err . println ( ( "Bogus<sp>XA<sp>node<sp>name:<sp>" + "2" ) ) ; com . arjuna . ats . jta . xa . XidImple xid = new com . arjuna . ats . jta . xa . XidImple ( new com . arjuna . ats . arjuna . commo... | org . junit . Assert . assertFalse ( xaRecoveryNodes . contains ( nodeName ) ) |
testDelete ( ) { java . lang . String grammar = "grammar<sp>T;\n" + ( ( ( ( "options<sp>{output=AST;}\n" + "a<sp>:<sp>ID<sp>;\n" ) + "ID<sp>:<sp>\'a\'..\'z\'+<sp>;\n" ) + "a" 0 ) + "a" 1 ) ; java . lang . String treeGrammar = "tree<sp>grammar<sp>TP;\n" + ( ( "options<sp>{output=AST;<sp>ASTLabelType=CommonTree;<sp>token... | org . junit . Assert . assertEquals ( "a" 4 , found ) |
testIsSerializable ( ) { shell . setText ( "text" ) ; org . eclipse . swt . widgets . Shell deserializedShell = serializeAndDeserialize ( shell ) ; "<AssertPlaceHolder>" ; } getText ( ) { checkWidget ( ) ; return getText ( 0 ) ; } | org . junit . Assert . assertEquals ( shell . getText ( ) , deserializedShell . getText ( ) ) |
testExceptionRecovery ( ) { when ( connectionFactory . createTopicConnection ( ) ) . thenReturn ( connection ) . thenThrow ( new javax . jms . JMSException ( "some<sp>problem<sp>4" ) ) . thenReturn ( connection ) ; when ( connection . createTopicSession ( false , Session . AUTO_ACKNOWLEDGE ) ) . thenReturn ( session ) ... | org . junit . Assert . assertFalse ( failed . get ( ) ) |
getOrganizationalUnits ( ) { int limit = 1 ; int offset = 0 ; org . oscm . paginator . Pagination pagination = new org . oscm . paginator . Pagination ( offset , limit ) ; java . util . List < org . oscm . domobjects . UserGroup > users = spy ( new java . util . ArrayList < org . oscm . domobjects . UserGroup > ( ) ) ;... | org . junit . Assert . assertEquals ( 1 , result . size ( ) ) |
testDefaultVolledigeVerstrekkingsbeperking ( ) { final nl . bzk . brp . model . algemeen . stamgegeven . kern . Partij partij = nl . bzk . brp . business . regels . impl . levering . definitieregels . BRLV0035Test . VERSTREKKINGSBEPERKING_MOGELIJK_JA_PARTIJ ; final boolean verstrekkingsbeperkingAanwezig = brlv0035 . is... | org . junit . Assert . assertFalse ( verstrekkingsbeperkingAanwezig ) |
testImportStatement ( ) { script = "component<sp>{<sp>import<sp>projectshen.core.*;<sp>}" ; scriptStatement = null ; scriptStatement = parseScript ( script ) ; if ( ( fCfmlParser . getMessages ( ) . size ( ) ) > 0 ) { org . junit . Assert . fail ( ( "whoops!<sp>" + ( fCfmlParser . getMessages ( ) ) ) ) ; } "<AssertPlac... | org . junit . Assert . assertNotNull ( scriptStatement ) |
testSettings ( ) { final boolean [ ] success = new boolean [ 1 ] ; boolean oldValue = nom . tam . fits . FitsFactory . getUseHierarch ( ) ; try { java . lang . Thread thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ nom . tam . fits . test . Override public void run ( ) { nom . tam . fits . FitsFa... | org . junit . Assert . assertTrue ( success [ 0 ] ) |
syncInvokeIOExceptionTest ( ) { com . aliyuncs . http . clients . HttpClientConfig config = mock ( com . aliyuncs . http . clients . HttpClientConfig . class ) ; when ( config . isIgnoreSSLCerts ( ) ) . thenReturn ( true ) ; com . aliyuncs . http . clients . CompatibleUrlConnClient client0 = new com . aliyuncs . http .... | org . junit . Assert . assertEquals ( "http://www.aliyun.com" , response . getSysUrl ( ) ) |
date ( ) { model . setMyDate ( new java . util . Date ( 0 ) ) ; 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 ... | org . junit . Assert . assertThat ( model2 . getMyDate ( ) , org . hamcrest . CoreMatchers . is ( new java . util . Date ( 0 ) ) ) |
equalsContractNull ( ) { final org . jboss . aerogear . simplepush . protocol . Ack x = new org . jboss . aerogear . simplepush . protocol . impl . AckImpl ( "ch1" , 10L ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( obj == null ) { return false ; } if ( ! ... | org . junit . Assert . assertThat ( x . equals ( null ) , org . hamcrest . CoreMatchers . is ( false ) ) |
areAllLinksOpenReturnsFalseIfAuthClosed ( ) { final tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager amqpsSessionManager = new tests . unit . com . microsoft . azure . sdk . iot . device . transport . amqps . AmqpsSessionManager ( mockDeviceClientConfig , mockSchedul... | org . junit . Assert . assertFalse ( result ) |
testRetrievalLastBackupVersion_emptyResult ( ) { java . util . Optional < java . lang . String > lastBackupVersion = fr . gouv . vitam . storage . engine . client . RestoreBackupIT . recoverBackupService . getLatestSavedFileName ( fr . gouv . vitam . storage . engine . client . RestoreBackupIT . STRATEGY_ID , DataCateg... | org . junit . Assert . assertEquals ( java . util . Optional . empty ( ) , lastBackupVersion ) |
testNotificationCount ( ) { java . util . List < org . opennms . web . filter . Filter > filterList = new java . util . ArrayList ( ) ; org . opennms . web . filter . Filter [ ] filters = filterList . toArray ( new org . opennms . web . filter . Filter [ 0 ] ) ; org . opennms . web . notification . AcknowledgeType ackT... | org . junit . Assert . assertEquals ( 1 , notificationCount ) |
notAdjacent ( ) { java . lang . String h = "<ol><li<sp>id=1>One<li<sp>id=2>Two<li<sp>id=3>Three</ol>" ; com . itextpdf . styledxmlparser . jsoup . nodes . Document doc = com . itextpdf . styledxmlparser . jsoup . Jsoup . parse ( h ) ; com . itextpdf . styledxmlparser . jsoup . select . Elements sibs = doc . select ( "l... | org . junit . Assert . assertEquals ( 0 , sibs . size ( ) ) |
test_null_height_input ( ) { java . lang . Double result = instance . calculate ( 75.0 , null ) ; "<AssertPlaceHolder>" ; } calculate ( java . lang . Double , java . lang . Double ) { java . lang . Double result = null ; if ( ( ( ( weight != null ) && ( height != null ) ) && ( weight > 0.0 ) ) && ( height > 0.0 ) ) { j... | org . junit . Assert . assertNull ( result ) |
testEvaluationPhraseBasic ( ) { java . lang . String query = buildFunction ( ContentFunctions . CONTENT_PHRASE_FUNCTION_NAME , Constants . TERM_OFFSET_MAP_JEXL_VARIABLE_NAME , "'dog'" , "'cat'" ) ; org . apache . commons . jexl2 . Expression expr = datawave . query . jexl . functions . ContentFunctionsTest . engine . c... | org . junit . Assert . assertTrue ( datawave . query . jexl . functions . ContentFunctionsTest . expect ( o , true ) ) |
testApply ( ) { org . opentripplanner . model . Trip trip = new org . opentripplanner . model . Trip ( ) ; trip . setId ( org . opentripplanner . routing . trippattern . TripTimesTest . tripId ) ; java . util . List < org . opentripplanner . model . StopTime > stopTimes = new java . util . LinkedList < org . opentrippl... | org . junit . Assert . assertFalse ( updatedTripTimesA . timesIncreasing ( ) ) |
testRowValueConstructorOnLHSBuiltInFunctionOperatingOnIntegerLiteralRHS ( ) { long ts = nextTimestamp ( ) ; java . lang . String tenantId = getOrganizationId ( ) ; initATableValues ( tenantId , getDefaultSplits ( tenantId ) , null , ts ) ; java . lang . String query = "SELECT<sp>a_integer,<sp>x_integer<sp>FROM<sp>aTabl... | org . junit . Assert . assertEquals ( 3 , count ) |
invalidKeyOps ( ) { com . microsoft . azure . keyvault . webkey . JsonWebKey key = com . microsoft . azure . keyvault . webkey . test . AesValidationTests . getAes ( ) ; key . withKeyOps ( java . util . Arrays . asList ( JsonWebKeyOperation . ENCRYPT , new com . microsoft . azure . keyvault . webkey . JsonWebKeyOperati... | org . junit . Assert . assertFalse ( key . isValid ( ) ) |
canConvertAuthority ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . Authority . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; } | org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . Authority . class ) ) |
testFamilieRechtelijkeBetrekking ( ) { nl . bzk . brp . model . objecttype . bericht . RelatieBericht familie = new nl . bzk . brp . util . RelatieBuilder ( ) . bouwFamilieRechtelijkeBetrekkingRelatie ( ) . voegOuderToe ( nl . bzk . brp . util . PersoonBuilder . bouwPersoon ( "papa" , null , 19840404 , null , null , nu... | org . junit . Assert . assertTrue ( meldingen . isEmpty ( ) ) |
testGetAnonymizedClientId_useSavedId ( ) { when ( preferences . get ( eq ( AnalyticsPreferences . ANALYTICS_CLIENT_ID ) , anyString ( ) ) ) . thenReturn ( "some-unique-client-id" ) ; java . lang . String clientId = com . google . cloud . tools . eclipse . usagetracker . AnalyticsPingManager . getAnonymizedClientId ( pr... | org . junit . Assert . assertEquals ( "some-unique-client-id" , clientId ) |
testIntPrimitiveReturnType ( ) { a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass ns = new a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass ( ) ; java . lang . Class c = a . org . fakereplace . test . replacement . staticmethod . StaticAccessingClass . cla... | org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 10 ) ) , res ) |
parametersInBody ( ) { final net . jadler . Request req = net . jadler . Request . builder ( ) . method ( "POST" ) . requestURI ( java . net . URI . create ( "http://localhost/" ) ) . body ( java . lang . String . format ( "%s=%s&%s=%s&%s=%s" , net . jadler . RequestTest . PARAM1_NAME , net . jadler . RequestTest . PAR... | org . junit . Assert . assertThat ( req . getParameters ( ) , is ( expected ) ) |
fetchItems ( ) { itemProvider . addItems ( book . twju . chapter_3 . Listing_2_Stub_TimelineTest . FIRST_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . SECOND_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . THIRD_ITEM ) ; timeline . setFetchCount ( 1 ) ; timeline . fetchItems ( ) ; timeli... | org . junit . Assert . assertArrayEquals ( new book . twju . chapter_3 . Item [ ] { book . twju . chapter_3 . Listing_2_Stub_TimelineTest . THIRD_ITEM , book . twju . chapter_3 . Listing_2_Stub_TimelineTest . SECOND_ITEM } , actual . toArray ( new book . twju . chapter_3 . Item [ 2 ] ) ) |
assertFindJobRegisterStatisticsWhenRdbIsNotConfigured ( ) { org . unitils . util . ReflectionUtils . setFieldValue ( statisticManager , "rdbRepository" , null ) ; "<AssertPlaceHolder>" ; } findJobRegisterStatisticsSinceOnline ( ) { if ( ! ( isRdbConfigured ( ) ) ) { return java . util . Collections . emptyList ( ) ; } ... | org . junit . Assert . assertTrue ( statisticManager . findJobRegisterStatisticsSinceOnline ( ) . isEmpty ( ) ) |
testTwo ( ) { org . terrier . matching . MatchingQueryTerms mqt = new org . terrier . matching . MatchingQueryTerms ( ) ; mqt . add ( org . terrier . querying . parser . Query . QTPBuilder . of ( new org . terrier . matching . matchops . SingleTermOp ( "a" ) ) . build ( ) ) ; mqt . add ( org . terrier . querying . pars... | org . junit . Assert . assertEquals ( 5 , mqt . size ( ) ) |
testAcceptInValidParameter5 ( ) { final org . openspotlight . graph . query . console . ConsoleState state = new org . openspotlight . graph . query . console . ConsoleState ( null ) ; state . setInput ( "/<sp>><sp>" ) ; "<AssertPlaceHolder>" ; } accept ( org . openspotlight . graph . query . console . ConsoleState ) {... | org . junit . Assert . assertThat ( command . accept ( state ) , org . hamcrest . core . Is . is ( false ) ) |
deleteInvalidBlocksPeriodically ( ) { alluxio . AlluxioURI uri = new alluxio . AlluxioURI ( "/test" ) ; int len = 10 ; alluxio . client . file . FileSystem fs = mCluster . getClient ( ) ; alluxio . worker . block . BlockWorker worker = mCluster . getWorkerProcess ( ) . getWorker ( alluxio . worker . block . BlockWorker... | org . junit . Assert . assertEquals ( 1 , worker . getStoreMetaFull ( ) . getNumberOfBlocks ( ) ) |
testBlockMatrix ( ) { final double [ ] [ ] input = new double [ ] [ ] { new double [ ] { 2.0 , 1.0 , 2.0 } , new double [ ] { 1.0 , 2.0 , 1.0 } , new double [ ] { 0.0 , 0.0 , 0.0 } } ; final double [ ] [ ] expected = new double [ ] [ ] { new double [ ] { 1.0 , 1.0 / 3.0 , 1.0 } , new double [ ] { 1.0 / 3.0 , 1.0 , 1.0 ... | org . junit . Assert . assertEquals ( correlation . computeCorrelationMatrix ( new org . hipparchus . linear . BlockRealMatrix ( input ) ) , new org . hipparchus . linear . BlockRealMatrix ( expected ) ) |
testValidAndNullIdModifiesRoot ( ) { try { testGroup . addMembers ( getTestUser ( ) . getID ( ) , null ) ; } catch ( javax . jcr . nodetype . ConstraintViolationException e ) { } "<AssertPlaceHolder>" ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; } | org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) ) |
testIsValidEncryptedBackupFilename_withInvalidFilename_fails ( ) { java . lang . String givenFilename = "/example/filename.dbb123" ; boolean result = this . target . isValidEncryptedBackupFilename ( givenFilename ) ; "<AssertPlaceHolder>" ; } isValidEncryptedBackupFilename ( java . lang . String ) { return ( "." + ( or... | org . junit . Assert . assertFalse ( result ) |
testTenantRoutingContentStoreMayBeNullWhenProxyingAndInterfaceNotImplemented ( ) { org . alfresco . repo . content . ContentStore contentStore = new org . alfresco . repo . tenant . MultiTAdminServiceImplTest . FakeSubsystemProxy ( true ) ; org . alfresco . repo . tenant . TenantRoutingContentStore router = tenantAdmin... | org . junit . Assert . assertNull ( router ) |
getYear_A$Calendar ( ) { java . lang . Integer expected = 2009 ; java . util . Calendar arg0 = java . util . Calendar . getInstance ( ) ; arg0 . set ( Calendar . YEAR , expected ) ; java . lang . Integer actual = com . github . seratch . taskun . util . CalendarUtil . getYear ( arg0 ) ; "<AssertPlaceHolder>" ; } getYea... | org . junit . Assert . assertEquals ( expected , actual ) |
testCompare ( ) { java . util . Set < com . pearson . statsagg . metric_aggregation . MetricTimestampAndValue > sortedMetricTimestampsAndValuesSet = new java . util . TreeSet ( MetricTimestampAndValue . COMPARE_BY_TIMESTAMP ) ; for ( com . pearson . statsagg . metric_aggregation . MetricTimestampAndValue metricTimestam... | org . junit . Assert . assertTrue ( ( ( sortedMetricTimestampsAndValuesList . get ( i ) . getTimestamp ( ) ) > ( sortedMetricTimestampsAndValuesList . get ( ( i - 1 ) ) . getTimestamp ( ) ) ) ) |
testScalarMultiply ( ) { org . apache . commons . math . complex . Complex x = new org . apache . commons . math . complex . Complex ( 3.0 , 4.0 ) ; double yDouble = 2.0 ; org . apache . commons . math . complex . Complex yComplex = new org . apache . commons . math . complex . Complex ( yDouble ) ; "<AssertPlaceHolder... | org . junit . Assert . assertEquals ( x . multiply ( yComplex ) , x . multiply ( yDouble ) ) |
testSkipTokenNoSystemOptions ( ) { org . teiid . adminapi . impl . ModelMetaData mmd = new org . teiid . adminapi . impl . ModelMetaData ( ) ; mmd . setName ( "vw" ) ; mmd . addSourceMetadata ( "ddl" , ( "create<sp>view<sp>x<sp>(a<sp>string<sp>primary<sp>key,<sp>b<sp>integer)<sp>" + "as<sp>select<sp>'xyz',<sp>123<sp>un... | org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) ) |
visitDocuments ( ) { org . xwiki . model . reference . SpaceReference sourceReference = new org . xwiki . model . reference . SpaceReference ( "wiki" , "Path" , "To" , "Space" ) ; org . xwiki . model . reference . SpaceReference destinationReference = new org . xwiki . model . reference . SpaceReference ( "wiki" , "Oth... | org . junit . Assert . assertEquals ( java . util . Arrays . asList ( five , six , two , one , three , four ) , visitedPages ) |
should_N_pad_at_start_of_variant ( ) { au . edu . wehi . idsv . sim . SequentialVariantPlacer svp = new au . edu . wehi . idsv . sim . SequentialVariantPlacer ( B ( "NNNNNNAAAAAAAAAA" ) ) ; svp . setDistanceBetweenVariants ( 0 ) ; svp . setMinimumDistanceFromN ( 2 ) ; "<AssertPlaceHolder>" ; } getNext ( int ) { if ( fe... | org . junit . Assert . assertEquals ( 9 , svp . getNext ( 1 ) ) |
testWalkChain ( ) { com . iota . iri . controllers . TransactionViewModel transaction ; com . iota . iri . controllers . TransactionViewModel transaction1 ; com . iota . iri . controllers . TransactionViewModel transaction2 ; com . iota . iri . controllers . TransactionViewModel transaction3 ; com . iota . iri . contro... | org . junit . Assert . assertEquals ( tip , transaction4 . getHash ( ) ) |
testNoExec ( ) { org . eclipse . debug . core . ILaunchConfiguration config = createConfiguration ( proj . getProject ( ) ) ; doLaunch ( config , "testNoExec" ) ; org . eclipse . linuxtools . valgrind . core . IValgrindMessage [ ] messages = org . eclipse . linuxtools . internal . valgrind . ui . ValgrindUIPlugin . get... | org . junit . Assert . assertEquals ( 1 , messages . length ) |
treeMenuAllElements ( ) { java . util . List < ? extends org . geosdi . geoplatform . gui . configuration . GPMenuGenericTool > tools = gpTreeMenuStore . getTools ( new org . geosdi . geoplatform . gui . configuration . composite . menu . store . MultiSelectionCompositeKey ( org . geosdi . geoplatform . gui . configura... | org . junit . Assert . assertEquals ( 1 , tools . size ( ) ) |
simpleBeanLookupByName ( ) { org . apache . deltaspike . test . core . api . provider . TestBean testBean = org . apache . deltaspike . core . api . provider . BeanProvider . getContextualReference ( "extraNameBean" , false , org . apache . deltaspike . test . core . api . provider . TestBean . class ) ; "<AssertPlaceH... | org . junit . Assert . assertNotNull ( testBean ) |
shouldNotInvokeDispatcherWhenServletContextOnlyStrategyIsUsed ( ) { final java . util . concurrent . atomic . AtomicBoolean dispatcherInvokedFlag = new java . util . concurrent . atomic . AtomicBoolean ( ) ; victim = new ro . isdc . wro . model . resource . locator . ServletContextUriLocator ( ) { @ ro . isdc . wro . m... | org . junit . Assert . assertFalse ( dispatcherInvokedFlag . get ( ) ) |
testBlobMetadataNotFound ( ) { when ( _server . getMetadata ( "table-name" , "blob-id" ) ) . thenThrow ( new com . bazaarvoice . emodb . blob . api . BlobNotFoundException ( "blob-id" ) ) ; try { blobClient ( ) . getMetadata ( "table-name" , "blob-id" ) ; org . junit . Assert . fail ( ) ; } catch ( com . bazaarvoice . ... | org . junit . Assert . assertEquals ( e . getBlobId ( ) , "blob-id" ) |
setFullySpecifiedName_shouldAddTheNameToTheListOfNamesIfItNotAmongThemBefore ( ) { org . openmrs . Concept concept = createConcept ( 1 , org . openmrs . api . context . Context . getLocale ( ) ) ; int expectedNumberOfNames = ( concept . getNames ( ) . size ( ) ) + 1 ; concept . setFullySpecifiedName ( new org . openmrs... | org . junit . Assert . assertEquals ( expectedNumberOfNames , concept . getNames ( ) . size ( ) ) |
testTermDetection3 ( ) { de . jetwick . data . JTweet tw = new de . jetwick . data . JTweet ( 1L , ( "A<sp>Year<sp>Without<sp>Rain<sp>" + ( "A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>" + "A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>Without<sp>Rain<sp>A<sp>Year<sp>W... | org . junit . Assert . assertEquals ( 2 , tw . getTextTerms ( ) . size ( ) ) |
testCompileTestData ( ) { this . batchCompiler . compile ( ) ; java . io . File _file = new java . io . File ( ( ( org . jnario . standalone . tests . FeatureBatchCompilerTest . OUTPUT_DIRECTORY ) + "/test" ) ) ; final java . io . FilenameFilter _function = new java . io . FilenameFilter ( ) { public boolean accept ( f... | org . junit . Assert . assertEquals ( 3 , _size ) |
singlePushNotification ( ) { app . clear ( ) ; java . lang . String payload = "Hello,<sp>World!" ; org . apache . usergrid . services . notifications . gcm . Map < java . lang . String , java . lang . String > payloads = new org . apache . usergrid . services . notifications . gcm . HashMap < java . lang . String , jav... | org . junit . Assert . assertEquals ( notification . getPayloads ( ) . get ( notifier . getUuid ( ) . toString ( ) ) , payload ) |
testWithNulls ( org . baeldung . mocks . jmockit . ExpectationsCollaborator ) { new mockit . Expectations ( ) { { mock . methodForNulls1 ( anyString , null ) ; result = "null" ; } } ; "<AssertPlaceHolder>" ; mock . methodForNulls2 ( "blablabla" , null ) ; new mockit . Verifications ( ) { { mock . methodForNulls2 ( anyS... | org . junit . Assert . assertEquals ( "null" , mock . methodForNulls1 ( "blablabla" , new java . util . ArrayList < java . lang . String > ( ) ) ) |
testRuntime ( ) { sqlite . feature . in . BindAppDataSource ds = sqlite . feature . in . BindAppDataSource . getInstance ( ) ; ds . execute ( new sqlite . feature . in . case4 . BindAppDataSource . Transaction ( ) { @ sqlite . feature . in . Override public com . abubusoft . kripton . android . sqlite . TransactionResu... | org . junit . Assert . assertTrue ( ( ( dao . selectAll ( params ) . size ( ) ) == 2 ) ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . security . wedeploy . auth . model . WeDeployAuthToken > weDeployAuthTokens = _p... | org . junit . Assert . assertTrue ( weDeployAuthTokens . isEmpty ( ) ) |
startProcess ( ) { org . activiti . engine . RepositoryService repositoryService = activitiRule . getRepositoryService ( ) ; repositoryService . createDeployment ( ) . addInputStream ( "myProcess.bpmn20.xml" , new java . io . FileInputStream ( filename ) ) . deploy ( ) ; org . activiti . engine . RuntimeService runtime... | org . junit . Assert . assertNotNull ( processInstance . getId ( ) ) |
setServiceName ( ) { route . setServiceName ( "frontend-alt" ) ; "<AssertPlaceHolder>" ; } getServiceName ( ) { return asString ( com . openshift . internal . restclient . model . Route . ROUTE_SERVICE_NAME ) ; } | org . junit . Assert . assertEquals ( "frontend-alt" , route . getServiceName ( ) ) |
testEquals ( ) { uk . ac . ebi . ep . ebeye . protein . model . EntryTest . LOGGER . info ( "equals" ) ; java . lang . Object obj = new uk . ac . ebi . ep . ebeye . model . Fields ( ) ; boolean expResult = false ; boolean result = instance . equals ( obj ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { i... | org . junit . Assert . assertEquals ( expResult , result ) |
testLocalPingServiceSuccess ( ) { io . cloudslang . content . utilities . entities . LocalPingInputs localPingInputs = new io . cloudslang . content . utilities . entities . LocalPingInputs . LocalPingInputsBuilder ( ) . targetHost ( io . cloudslang . content . utilities . services . localping . LocalPingServiceTest . ... | org . junit . Assert . assertEquals ( io . cloudslang . content . utilities . services . localping . LocalPingServiceTest . COMMAND_OUTPUT , resultsMap . get ( io . cloudslang . content . utilities . services . localping . RETURN_RESULT ) ) |
findByNoTest ( ) { java . lang . String no = org . hibernate . id . UUIDGenerator . UUID_GEN_STRATEGY ; me . j360 . boot . microservice . order . entity . Express express = new me . j360 . boot . microservice . order . entity . Express ( ) ; express . setCost ( BigDecimal . ONE ) ; express . setNo ( no ) ; expressRepos... | org . junit . Assert . assertEquals ( no , express1 . getNo ( ) ) |
testMoveAndRenameAutonomousArea ( ) { org . apache . directory . api . ldap . model . entry . Entry autonomousArea = new org . apache . directory . api . ldap . model . entry . DefaultEntry ( "ou=autonomousArea,<sp>ou=system" , "ObjectClass:<sp>top" , "ObjectClass:<sp>organizationalUnit" , "ou:<sp>autonomousArea" , "ad... | org . junit . Assert . assertTrue ( true ) |
filter_not_exists_scoping_03 ( ) { org . apache . jena . sparql . algebra . Op orig = org . apache . jena . sparql . sse . SSE . parseOp ( org . apache . jena . atlas . lib . StrUtils . strjoinNL ( "<sp>(extend<sp>((?openTriplets<sp>?.0))" 0 , "<sp>(project<sp>(?openTriplets)" , "<sp>(extend<sp>((?openTriplets<sp>?.0))... | org . junit . Assert . assertEquals ( transformed , expected ) |
test_isRegisteredURIIllegal ( ) { "<AssertPlaceHolder>" ; } isRegistered ( com . github . sarxos . webcam . ds . ipcam . IpCamDevice ) { if ( ipcam == null ) { throw new java . lang . IllegalArgumentException ( "IP<sp>camera<sp>device<sp>cannot<sp>be<sp>null" ) ; } java . util . Iterator < com . github . sarxos . webca... | org . junit . Assert . assertTrue ( com . github . sarxos . webcam . ds . ipcam . IpCamDeviceRegistry . isRegistered ( ( ( java . net . URI ) ( null ) ) ) ) |
testDecryptsMultitplePartsOfPartiallyEncryptedProperty ( ) { java . lang . StringBuilder propertyValue = new java . lang . StringBuilder ( ) ; java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 100 ; i ++ ) { propertyValue . append ( java . lang . String . format ( "param... | org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( expected . toString ( ) ) ) |
testSize ( ) { org . ccnx . ccn . impl . support . Log . info ( Log . FAC_TEST , "Starting<sp>testSize" ) ; org . ccnx . ccn . io . content . Collection cd = new org . ccnx . ccn . io . content . Collection ( ) ; for ( int i = 0 ; i < ( org . ccnx . ccn . io . content . CollectionTest . lrs . length ) ; ++ i ) { cd . a... | org . junit . Assert . assertTrue ( ( ( cd . size ( ) ) == ( org . ccnx . ccn . io . content . CollectionTest . lrs . length ) ) ) |
testGetBuild ( ) { hudson . plugins . jacoco . report . CoverageReport report = new hudson . plugins . jacoco . report . CoverageReport ( action , new hudson . plugins . jacoco . ExecutionFileLoader ( ) ) ; "<AssertPlaceHolder>" ; } getBuild ( ) { return parent . getBuild ( ) ; } | org . junit . Assert . assertNull ( report . getBuild ( ) ) |
testCreateFileHeaderForRenameModeChange ( ) { org . eclipse . jgit . diff . DiffEntry a = org . eclipse . jgit . diff . DiffEntry . delete ( org . eclipse . jgit . diff . DiffFormatterTest . PATH_A , org . eclipse . jgit . lib . ObjectId . zeroId ( ) ) ; org . eclipse . jgit . diff . DiffEntry b = org . eclipse . jgit ... | org . junit . Assert . assertEquals ( expected , fh . getScriptText ( ) ) |
getAllIdsShouldIncludeArrayIndices ( ) { org . mozilla . javascript . NativeArray array = new org . mozilla . javascript . NativeArray ( new java . lang . String [ ] { "a" , "b" } ) ; java . lang . Object [ ] expectedIds = new java . lang . Object [ ] { 0 , 1 , "length" } ; java . lang . Object [ ] actualIds = array . ... | org . junit . Assert . assertArrayEquals ( expectedIds , actualIds ) |
canHandleForwardingBuildTargetSourcePathsWithDifferentFilesystems ( ) { com . facebook . buck . io . filesystem . ProjectFilesystem filesystem1 = new com . facebook . buck . io . filesystem . impl . FakeProjectFilesystem ( java . nio . file . Paths . get ( "first" , "root" ) ) ; com . facebook . buck . io . filesystem ... | org . junit . Assert . assertEquals ( ruleKey . values . get ( ".path1" ) , ruleKey . values . get ( ".path2" ) ) |
testFile3 ( ) { eu . europa . esig . dss . DSSDocument dssDocument = new eu . europa . esig . dss . FileDocument ( "src/test/resources/plugtest/esig2014/ESIG-CAdES/DE_CRY/Signature-C-DE_CRY-4.p7m" ) ; eu . europa . esig . dss . cades . validation . CAdESSignature signature = new eu . europa . esig . dss . cades . valid... | org . junit . Assert . assertNotNull ( cmsSignedData ) |
sumLong ( ) { super . sumLong ( ) ; com . gs . collections . api . bag . sorted . MutableSortedBag < java . lang . Integer > bag = this . newWith ( com . gs . collections . impl . block . factory . Comparators . reverseNaturalOrder ( ) , 1 , 1 , 2 , 3 , 4 , 5 ) ; "<AssertPlaceHolder>" ; } sumOfLong ( com . gs . collect... | org . junit . Assert . assertEquals ( 16 , bag . sumOfLong ( Integer :: longValue ) ) |
adapt_noRow ( ) { when ( mockBigtableResultScanner . next ( ) ) . thenReturn ( null ) ; org . apache . hadoop . hbase . client . ResultScanner scanner = adapter . adapt ( mockBigtableResultScanner , mockSpan ) ; "<AssertPlaceHolder>" ; verify ( mockBigtableResultScanner ) . next ( ) ; verifyZeroInteractions ( mockRowAd... | org . junit . Assert . assertNull ( scanner . next ( ) ) |
testComponensRegisteredWithClassKeyTakePrecedenceOverOthersWhenThereAreMultipleImplementations ( ) { com . picocontainer . DefaultPicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; pico . addComponent ( "default" , com . picocontainer . testmodel . SimpleTouchable . class ) ; pico . addComponent ... | org . junit . Assert . assertEquals ( com . picocontainer . testmodel . DecoratedTouchable . class , touchable . getClass ( ) ) |
compute ( ) { final org . apache . commons . io . input . NullInputStream in = new org . apache . commons . io . input . NullInputStream ( 0L ) ; new ch . cyberduck . core . io . DisabledChecksumCompute ( ) . compute ( in , new ch . cyberduck . core . transfer . TransferStatus ( ) ) ; "<AssertPlaceHolder>" ; in . read ... | org . junit . Assert . assertEquals ( ( - 1 ) , in . read ( ) ) |
testTestWhenTrue ( ) { org . apache . commons . functor . NullaryFunction < java . lang . Boolean > f = new org . apache . commons . functor . adapter . NullaryPredicateNullaryFunction ( org . apache . commons . functor . core . Constant . TRUE ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { return java . lang . Integer .... | org . junit . Assert . assertEquals ( Boolean . TRUE , f . evaluate ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.