input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
fastForwardRebase ( ) { java . lang . String branch = mk . branch ( null ) ; branch = mk . commit ( "" , "+\"/a\":{}" , branch , null ) ; java . lang . String rebased = mk . rebase ( branch , null ) ; "<AssertPlaceHolder>" ; } rebase ( org . apache . jackrabbit . oak . plugins . document . RevisionVector , org . apache... | org . junit . Assert . assertEquals ( branch , rebased ) |
testNoArgConstructor ( ) { final com . github . rinde . rinsim . scenario . Scenario scenario = new com . github . rinde . rinsim . scenario . ScenarioTest . EmptyScenario ( ) ; "<AssertPlaceHolder>" ; } getEvents ( ) { return java . util . Collections . unmodifiableList ( events ) ; } | org . junit . Assert . assertTrue ( scenario . getEvents ( ) . isEmpty ( ) ) |
removalOfNodeIndexDoesNotClearRelationshipCommandsForRelationshipIndexWithSameName ( ) { org . neo4j . kernel . impl . api . state . ExplicitIndexTransactionStateImpl state = newExplicitIndexTxState ( ) ; state . addNode ( "index" , 1 , "key" , "value" ) ; state . addRelationship ( "index" , 1 , "key" , "value" , 11 , ... | org . junit . Assert . assertEquals ( expectedCommands , org . neo4j . kernel . impl . api . state . ExplicitIndexTransactionStateImplTest . extractCommands ( state ) ) |
testBadge_plus_0 ( ) { cn . jpush . api . push . model . notification . IosNotification ios = cn . jpush . api . push . model . notification . IosNotification . newBuilder ( ) . incrBadge ( 0 ) . build ( ) ; com . google . gson . JsonObject json = new com . google . gson . JsonObject ( ) ; json . add ( "badge" , new co... | org . junit . Assert . assertEquals ( "" , json , ios . toJSON ( ) ) |
testRemove ( ) { com . liferay . portal . kernel . model . Repository newRepository = addRepository ( ) ; _persistence . remove ( newRepository ) ; com . liferay . portal . kernel . model . Repository existingRepository = _persistence . fetchByPrimaryKey ( newRepository . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; }... | org . junit . Assert . assertNull ( existingRepository ) |
testEmptyQuery ( ) { org . terrier . querying . parser . Query q = org . terrier . querying . parser . QueryParser . parseQuery ( "" ) ; java . util . List < org . terrier . querying . parser . Query > terms = new java . util . ArrayList < org . terrier . querying . parser . Query > ( ) ; q . getTerms ( terms ) ; "<Ass... | org . junit . Assert . assertEquals ( 0 , terms . size ( ) ) |
testGetContextPath ( ) { "<AssertPlaceHolder>" ; } getContextPath ( ) { return "" ; } | org . junit . Assert . assertEquals ( "" , request . getContextPath ( ) ) |
testMnemonic ( ) { java . security . SecureRandom random = new java . security . SecureRandom ( ) ; for ( int i = 0 ; i < 10 ; ++ i ) { for ( int s = 3 ; s < 10 ; ++ s ) { for ( int g = 0 ; g < s ; ++ g ) { for ( int n = 2 ; n < ( s - g ) ; ++ n ) { byte [ ] secret = new byte [ 32 ] ; random . nextBytes ( secret ) ; ja... | org . junit . Assert . assertTrue ( java . util . Arrays . equals ( recreated , secret ) ) |
shouldReadBackPersistedIdsWhenAggressiveModeIsSet ( ) { org . neo4j . io . fs . StoreChannel channel = getStoreChannel ( ) ; int batchSize = 10 ; org . neo4j . kernel . impl . store . id . FreeIdKeeper keeper = getFreeIdKeeperAggressive ( channel , batchSize ) ; for ( int i = 0 ; i < batchSize ; i ++ ) { keeper . freeI... | org . junit . Assert . assertEquals ( i , keeper . getId ( ) ) |
parseAccountJson ( ) { java . util . List < com . cd . reddit . json . mapping . RedditAccount > parsedTypes = null ; java . io . InputStream jsonStream = this . getClass ( ) . getResourceAsStream ( "/user.json" ) ; testParser = new com . cd . reddit . json . jackson . RedditJsonParser ( convertStreamToString ( jsonStr... | org . junit . Assert . assertEquals ( true , ( ( parsedTypes . get ( 0 ) ) instanceof com . cd . reddit . json . mapping . RedditAccount ) ) |
fromDocument ( ) { final org . bson . Document document = new org . bson . Document ( ) . append ( RyaTypeDocumentConverter . DATA_TYPE , XMLSchema . DOUBLE . toString ( ) ) . append ( RyaTypeDocumentConverter . VALUE , "4.5" ) ; final org . apache . rya . api . domain . RyaType ryaType = new org . apache . rya . index... | org . junit . Assert . assertEquals ( expected , ryaType ) |
testCreateNotebook ( ) { com . evernote . edam . type . Notebook notebook = new com . evernote . edam . type . Notebook ( ) ; notebook . setName ( "BusinessNoteStoreClientTest#testCreateNotebook" ) ; com . evernote . edam . type . LinkedNotebook createdLinkedNotebook = client . createNotebook ( notebook ) ; "<AssertPla... | org . junit . Assert . assertNotNull ( createdLinkedNotebook ) |
testGetPreviousResult_skip_decreasing_result ( ) { org . joda . time . DateTime now = new org . joda . time . DateTime ( ) ; org . jmxtrans . agent . QueryResult tooHigh = new org . jmxtrans . agent . QueryResult ( "mymetric" , 60 , now . minusSeconds ( 65 ) . getMillis ( ) ) ; writer . storeQueryResult ( tooHigh ) ; o... | org . junit . Assert . assertThat ( actual , is ( expected ) ) |
multi_classloader_Test ( ) { java . net . URL [ ] urls = new java . net . URL [ ] { new java . net . URL ( "file:test-resources/classpath/multi1/beans.jar" ) } ; java . net . URLClassLoader classLoader = new java . net . URLClassLoader ( urls ) ; org . openl . rules . project . instantiation . SimpleProjectEngineFactor... | org . junit . Assert . assertNotNull ( instance ) |
count ( ) { com . gs . collections . api . map . MapIterable < java . lang . String , java . lang . String > map = this . newMapWithKeysValues ( "1" , "One" , "2" , "Two" , "3" , "Three" ) ; int actual = map . count ( com . gs . collections . impl . block . factory . Predicates . or ( "One" :: equals , "Three" :: equal... | org . junit . Assert . assertEquals ( 2 , actual ) |
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . paper . usage . PaperUsage context = new org . lnu . is . domain . paper . usage . PaperUsage ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PaperUsage<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGr... | org . junit . Assert . assertEquals ( expectedQuery , actualQuery ) |
withOneEmpty ( ) { "<AssertPlaceHolder>" ; } isOneAway ( java . lang . String , java . lang . String ) { if ( ( a . length ( ) ) == ( b . length ( ) ) ) { return oneReplace ( a , b ) ; } else if ( ( ( a . length ( ) ) - ( b . length ( ) ) ) == 1 ) { return oneInsertion ( a , b ) ; } else if ( ( ( b . length ( ) ) - ( a... | org . junit . Assert . assertTrue ( s . isOneAway ( "" , "b" ) ) |
testGetClasspathFile ( ) { java . io . File folderToLook = new java . io . File ( "C:\\dev\\workspace\\hg\\hg-support\\LendNet\\Calculators<sp>Component\\Calculators" ) ; classpathFile = com . shri . eclipsetomaven . util . ClasspathUtil . getClasspathFile ( folderToLook ) ; "<AssertPlaceHolder>" ; } getClasspathFile (... | org . junit . Assert . assertNotNull ( classpathFile ) |
testGetNumberOfMovies ( ) { long count = mediaRepository . getNumberOfMovies ( 1L ) ; "<AssertPlaceHolder>" ; } getNumberOfMovies ( java . lang . String ) { int count = 0 ; java . util . List < org . sculptor . examples . library . media . domain . Media > all = findAll ( ) ; for ( org . sculptor . examples . library .... | org . junit . Assert . assertEquals ( 2 , count ) |
testGetSubscriptionList ( ) { org . jinstagram . realtime . InstagramSubscription fixture = new org . jinstagram . realtime . InstagramSubscription ( ) ; org . jinstagram . realtime . SubscriptionsListResponse result = fixture . getSubscriptionList ( ) ; "<AssertPlaceHolder>" ; } getSubscriptionList ( ) { final org . j... | org . junit . Assert . assertNotNull ( result ) |
testTreeWithInvalidGitmodules ( ) { org . eclipse . jgit . lib . ObjectId treeId = org . eclipse . jgit . lib . ObjectId . fromString ( "0123012301230123012301230123012301230123" ) ; java . lang . StringBuilder b = new java . lang . StringBuilder ( ) ; org . eclipse . jgit . lib . ObjectCheckerTest . entry ( b , "10064... | org . junit . Assert . assertEquals ( 0 , checker . getGitsubmodules ( ) . size ( ) ) |
writeCharArrayTest ( ) { int start = 0 ; int end = 10 ; char [ ] data = new char [ ( end - start ) + 1 ] ; for ( int i = start ; i <= end ; i ++ ) { data [ ( i - start ) ] = ( ( char ) ( i ) ) ; } sbw . write ( data ) ; for ( int i = start ; i <= end ; i ++ ) { "<AssertPlaceHolder>" ; } } charAt ( int ) { return sb . c... | org . junit . Assert . assertEquals ( ( ( char ) ( i ) ) , sb . charAt ( ( i - start ) ) ) |
testSentryVersionCheck ( ) { org . apache . sentry . provider . db . service . persistent . TestSentryStore . sentryStore . verifySentryStoreSchema ( false ) ; "<AssertPlaceHolder>" ; org . apache . sentry . provider . db . service . persistent . TestSentryStore . sentryStore . verifySentryStoreSchema ( true ) ; org . ... | org . junit . Assert . assertEquals ( org . apache . sentry . provider . db . service . persistent . TestSentryStore . sentryStore . getSentryVersion ( ) , org . apache . sentry . provider . db . service . persistent . SentryStoreSchemaInfo . getSentryVersion ( ) ) |
testZoekHisVolledigRootObjectVoorPersoonBerichtMetIdentificerendeSleutelAangemaakteRootObjecten ( ) { final nl . bzk . brp . bijhouding . business . stappen . context . BijhoudingBerichtContext context = new nl . bzk . brp . bijhouding . business . stappen . context . BijhoudingBerichtContext ( new nl . bzk . brp . web... | org . junit . Assert . assertEquals ( persoonHisVolledig , resultaat ) |
testAxesMetadataError ( ) { final int [ ] shape = new int [ ] { 1 , 2 , 3 , 1 } ; int r = shape . length ; org . eclipse . january . dataset . ILazyDataset axis = org . eclipse . january . dataset . Random . lazyRand ( Dataset . INT32 , "axis" , 2 ) ; org . eclipse . january . metadata . AxesMetadata amd = org . eclips... | org . junit . Assert . assertTrue ( ( slice != null ) ) |
shouldInvokeClientWhenPutWithStringParamAndHttpEntityParam ( ) { org . apache . http . HttpResponse expectedResponse = mock ( org . ektorp . http . HttpResponse . class , new org . mockito . internal . stubbing . answers . ThrowsException ( new java . lang . UnsupportedOperationException ( ) ) ) ; doReturn ( "mock<sp>e... | org . junit . Assert . assertNotNull ( androidHttpResponse ) |
whenNoProcessesFailTheFirstProcessValueIsDecided ( ) { process . ConsensusCapableEventuallyStrongFailureDetectorProcess p1 = processes . get ( 0 ) ; java . util . concurrent . Future < java . lang . String > consensusResult = p1 . getDecision ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( consensusResult . get ( ) . startsWith ( "value" ) ) |
immediateValueIsAvailable ( ) { com . spotify . flo . AwaitValue < java . lang . String > val = new com . spotify . flo . AwaitValue ( ) ; context . immediateValue ( "hello" ) . consume ( val ) ; "<AssertPlaceHolder>" ; } awaitAndGet ( ) { if ( ! ( await ( ) ) ) { throw new java . lang . IllegalStateException ( "Value<... | org . junit . Assert . assertThat ( val . awaitAndGet ( ) , org . hamcrest . Matchers . is ( "hello" ) ) |
testUpdateFloatField ( ) { com . jmethods . catatumbo . entities . FloatField entity = new com . jmethods . catatumbo . entities . FloatField ( ) ; entity . setArea ( 322.456F ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; entity . setArea ( 456.322F ) ; entity = com . jmethods .... | org . junit . Assert . assertTrue ( ( ( entity . getArea ( ) ) == 456.322F ) ) |
testGetValueForOneProbability ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( expected , values ) |
shoudCompleteWithNumberForAddCommand ( ) { java . lang . String [ ] args = new java . lang . String [ ] { "add" , "" } ; java . util . List < java . lang . String > completionResult = underTest . onTabComplete ( commandSender , command , null , args ) ; "<AssertPlaceHolder>" ; } onTabComplete ( org . bukkit . command .... | org . junit . Assert . assertEquals ( asList ( "1" ) , completionResult ) |
testConcat_1 ( ) { for ( char order : new char [ ] { 'c' , 'f' } ) { org . nd4j . linalg . api . ndarray . INDArray arr1 = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 } , order ) ; org . nd4j . linalg . api . ndarray . INDArray arr2 = org . nd4j . linalg . factory . Nd4j . create ( new double... | org . junit . Assert . assertEquals ( java . lang . String . valueOf ( order ) , exp , out ) |
testResourceAdapterConfigs ( ) { clickAndWait ( "treeForm:tree:resources:resourceAdapterConfigs:resourceAdapterConfigs_link" , org . glassfish . admingui . devtests . ResourceAdapterConfigsTest . TRIGGER_RESOURCE_ADAPTER_CONFIGS ) ; if ( tableContainsRow ( "propertyForm:poolTable" , "col1" , "jmsra" ) ) { deleteRow ( "... | org . junit . Assert . assertTrue ( isTextPresent ( "jmsra" ) ) |
testCoordinatesParsing ( ) { com . simpligility . maven . provisioner . Configuration configuration = new com . simpligility . maven . provisioner . Configuration ( ) ; configuration . setArtifactCoordinate ( "a|b|c" ) ; java . util . List < java . lang . String > coordinates = configuration . getArtifactCoordinates ( ... | org . junit . Assert . assertEquals ( 3 , coordinates . size ( ) ) |
constructorCreatesCBS ( ) { baseExpectationsSAS ( ) ; 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 , mockSched... | org . junit . Assert . assertEquals ( actualList . size ( ) , 1 ) |
testGetContainer ( ) { final java . lang . String pid = getRandomPid ( ) ; final org . fcrepo . kernel . api . models . Container container = containerService . findOrCreate ( session , ( "/" + pid ) ) ; final org . fcrepo . kernel . api . models . FedoraResource resource = containerService . findOrCreate ( session , (... | org . junit . Assert . assertEquals ( container , resource . getContainer ( ) ) |
legacy_testIsReadOnlyWhenTwoDescriptionProvidersHigherRankingIsReadOnly ( ) { org . eclipse . smarthome . core . types . StateDescription stateDescription1 = new org . eclipse . smarthome . core . types . StateDescription ( null , null , null , null , true , null ) ; org . eclipse . smarthome . core . types . StateDesc... | org . junit . Assert . assertThat ( finalStateDescription . isReadOnly ( ) , org . hamcrest . CoreMatchers . is ( stateDescription1 . isReadOnly ( ) ) ) |
testGetRationalPolinomialCoefficients ( ) { "<AssertPlaceHolder>" ; } getRationalPolinomialCoefficients ( ) { org . esa . s2tbx . dataio . rapideye . metadata . RapidEyeMetadata . RationalCoefficients coefficients = null ; org . esa . snap . core . datamodel . MetadataElement currentElement ; if ( ( currentElement = ro... | org . junit . Assert . assertNull ( metadata . getRationalPolinomialCoefficients ( ) ) |
testOnException ( ) { java . util . concurrent . atomic . AtomicReference < org . slieb . throwables . java . lang . Throwable > reference = new java . util . concurrent . atomic . AtomicReference ( ) ; org . slieb . throwables . java . lang . Exception expected = new org . slieb . throwables . java . lang . Exception ... | org . junit . Assert . assertEquals ( expected , reference . get ( ) ) |
shouldFlatMapSync ( ) { com . spotify . apollo . RequestContext context = com . spotify . apollo . route . TestContext . forPathArgs ( com . google . common . collect . ImmutableMap . of ( "foo" , "bar" , "bar" , "baz" ) ) ; com . spotify . apollo . route . AsyncHandler < java . lang . String > a = ( ctx ) -> completed... | org . junit . Assert . assertThat ( baz , org . hamcrest . CoreMatchers . is ( "baz" ) ) |
testNextRequestId_returnsIncrementedValue ( ) { int requestId = org . eclipse . rap . rwt . internal . lifecycle . RequestCounter . getInstance ( ) . nextRequestId ( ) ; "<AssertPlaceHolder>" ; } nextRequestId ( ) { return ++ ( requestId ) ; } | org . junit . Assert . assertEquals ( 1 , requestId ) |
parse_withParamReplace_shouldReturnProperly ( ) { System . out . println ( "parse" ) ; java . lang . String text = "test<sp>abcd<sp>A" ; coffeepot . bean . wr . mapper . Metadata metadata = null ; coffeepot . bean . wr . typeHandler . DefaultStringHandler instance = new coffeepot . bean . wr . typeHandler . DefaultStri... | org . junit . Assert . assertEquals ( expResult , result ) |
isConnectionSetupTest ( ) { redis . clients . jedis . Jedis jedis = qa . qcri . aidr . output . utils . JedisConnectionObjectTest . jedisConnectionObject . getJedisResource ( ) ; boolean actual = qa . qcri . aidr . output . utils . JedisConnectionObjectTest . jedisConnectionObject . isConnectionSetup ( ) ; "<AssertPlac... | org . junit . Assert . assertEquals ( true , actual ) |
testSingleIPWithDefault ( ) { connectionStates . connecting ( nodeId1 , time . milliseconds ( ) , "localhost" , ClientDnsLookup . DEFAULT ) ; java . net . InetAddress currAddress = connectionStates . currentAddress ( nodeId1 ) ; connectionStates . connecting ( nodeId1 , time . milliseconds ( ) , "localhost" , ClientDns... | org . junit . Assert . assertSame ( currAddress , connectionStates . currentAddress ( nodeId1 ) ) |
wadlXML ( ) { final javax . ws . rs . core . Response response = org . apache . cxf . jaxrs . client . WebClient . create ( org . apache . openejb . server . cxf . rs . SimpleApplicationTest . BASE_URL ) . path ( "http://www.w3.org/2001/XMLSchema" 5 ) . query ( "_wadl" ) . query ( "_type" , "http://www.w3.org/2001/XMLS... | org . junit . Assert . assertTrue ( "http://www.w3.org/2001/XMLSchema" 4 , wadl . startsWith ( "http://www.w3.org/2001/XMLSchema" 2 ) ) |
shouldConcatNoneNoneAsNone ( ) { org . dcache . auth . attributes . Restriction none = org . dcache . auth . attributes . Restrictions . none ( ) ; org . dcache . auth . attributes . Restriction concat = org . dcache . auth . attributes . Restrictions . concat ( none , none ) ; "<AssertPlaceHolder>" ; } concat ( java .... | org . junit . Assert . assertThat ( concat , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( none ) ) ) |
deleteServiceSessionsForSubscription_Admin_Authorized ( ) { java . lang . reflect . Method method = beanClass . getMethod ( "deleteServiceSessionsForSubscription" , long . class ) ; boolean isRoleAllowed = isRoleAllowed ( method , UserRoleType . ORGANIZATION_ADMIN ) ; "<AssertPlaceHolder>" ; } isRoleAllowed ( java . la... | org . junit . Assert . assertTrue ( isRoleAllowed ) |
testCanInitNotListened ( ) { java . net . ServerSocket ss = new java . net . ServerSocket ( 0 ) ; int port = ss . getLocalPort ( ) ; ss . close ( ) ; new mockit . Expectations ( org . apache . servicecomb . transport . rest . vertx . TransportConfig . class ) { { org . apache . servicecomb . transport . rest . vertx . ... | org . junit . Assert . assertTrue ( transport . canInit ( ) ) |
equal_null ( ) { final net . ripe . db . whois . update . domain . NicHandle nicHandle = net . ripe . db . whois . update . domain . NicHandle . parse ( "DW" , source , countryCodes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ( o == null ) || ( ( getClass ( ) ... | org . junit . Assert . assertFalse ( nicHandle . equals ( null ) ) |
sortOnThisFieldTest ( ) { "<AssertPlaceHolder>" ; } sortOnThisField ( ) { return sort ; } | org . junit . Assert . assertTrue ( column . sortOnThisField ( ) ) |
testGenerateAllConstructorOfListOfSpecificObject ( ) { final spoon . reflect . factory . Factory factory = eu . stamp_project . Utils . getFactory ( ) ; final spoon . reflect . reference . CtTypeReference < java . util . ArrayList > listReference = factory . Type ( ) . createReference ( java . util . ArrayList . class ... | org . junit . Assert . assertEquals ( 1 , constructionOf . size ( ) ) |
testGetCh1ByDemographicNo ( ) { java . lang . Integer demographicNo1 = 101 ; java . lang . Integer demographicNo2 = 202 ; org . oscarehr . common . model . BillingONCHeader1 bONCH11 = new org . oscarehr . common . model . BillingONCHeader1 ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTest... | org . junit . Assert . assertTrue ( true ) |
noFieldsSpecified ( ) { java . lang . String snapshotQuery = org . apache . apex . malhar . lib . appdata . schemas . SchemaUtils . jarResourceFileToString ( "snapshotquery_deserialize3.json" ) ; org . apache . apex . malhar . lib . appdata . schemas . DataQuerySnapshot query = ( ( org . apache . apex . malhar . lib . ... | org . junit . Assert . assertEquals ( expectedFields , query . getFields ( ) . getFields ( ) ) |
loadUser ( ) { when ( userStore . getUserByOpenId ( "openId" ) ) . thenReturn ( user ) ; de . blizzy . documentr . access . User result = userDetailsService . loadUser ( "openId" ) ; "<AssertPlaceHolder>" ; } loadUser ( java . lang . String ) { try { return getUserStore ( ) . getUserByOpenId ( openId ) ; } catch ( de .... | org . junit . Assert . assertEquals ( user , result ) |
testGetToNeuron ( ) { org . neuroph . core . Connection instance = new org . neuroph . core . Connection ( fromNeuron , toNeuron ) ; org . neuroph . core . Neuron expResult = toNeuron ; org . neuroph . core . Neuron result = instance . getToNeuron ( ) ; "<AssertPlaceHolder>" ; } getToNeuron ( ) { return toNeuron ; } | org . junit . Assert . assertEquals ( expResult , result ) |
addProductToCartQuicklyTest ( ) { System . out . print ( "-><sp>addProductToCartQuickly()<sp>-<sp>" ) ; java . lang . String view = ua . com . alexcoffee . controller . client . HomeControllerTest . homeController . addProductToCartQuickly ( ua . com . alexcoffee . controller . client . ID , ua . com . alexcoffee . con... | org . junit . Assert . assertEquals ( view , viewName ) |
testBasics ( ) { try ( org . apache . curator . test . TestingServer server = new org . apache . curator . test . TestingServer ( ) ) { server . start ( ) ; java . lang . String connStr = server . getConnectString ( ) ; org . apache . drill . yarn . zk . ZKClusterCoordinatorDriver driver = new org . apache . drill . ya... | org . junit . Assert . assertTrue ( driver . getInitialEndpoints ( ) . isEmpty ( ) ) |
testGetMaxX ( ) { System . out . println ( "getMaxX" ) ; kg . apc . charting . rows . GraphRowPercentiles instance = new kg . apc . charting . rows . GraphRowPercentiles ( ) ; long expResult = 1000 ; long result = instance . getMaxX ( ) ; "<AssertPlaceHolder>" ; } getMaxX ( ) { return graphRow . getMaxX ( ) ; } | org . junit . Assert . assertEquals ( expResult , result ) |
whenDeleteFirstElementThenFirstElementBecomeTwo ( ) { this . arr . delete ( 1 ) ; "<AssertPlaceHolder>" ; } get ( K ) { return this . cache . getOrDefault ( key , null ) ; } | org . junit . Assert . assertThat ( this . arr . get ( 1 ) , org . hamcrest . core . Is . is ( 2 ) ) |
refreshAccessToken_success ( ) { com . google . auth . oauth2 . GoogleCredentials sourceCredentials = getSourceCredentials ( ) ; com . google . auth . oauth2 . ImpersonatedCredentialsTest . MockIAMCredentialsServiceTransportFactory mtransportFactory = new com . google . auth . oauth2 . ImpersonatedCredentialsTest . Moc... | org . junit . Assert . assertEquals ( com . google . auth . oauth2 . ImpersonatedCredentialsTest . ACCESS_TOKEN , targetCredentials . refreshAccessToken ( ) . getTokenValue ( ) ) |
isVSysIdValid_valid ( ) { org . oscm . app . ror . client . LPlatformClient lPlatformClient = mock ( org . oscm . app . ror . client . LPlatformClient . class ) ; doReturn ( lPlatformClient ) . when ( rorVServerCommunication ) . getLPlatformClient ( paramHandler ) ; doReturn ( LPlatformStatus . NORMAL ) . when ( lPlatf... | org . junit . Assert . assertTrue ( isVsysIdValid ) |
testGetPluralName ( ) { org . apache . ambari . server . api . resources . ResourceDefinition resourceDefinition = new org . apache . ambari . server . api . resources . SimpleResourceDefinition ( Resource . Type . Stage , "stage" , "stages" , Resource . Type . Task ) ; "<AssertPlaceHolder>" ; } getPluralName ( ) { ret... | org . junit . Assert . assertEquals ( "stages" , resourceDefinition . getPluralName ( ) ) |
shouldCreateConfigOverridenPath ( ) { victim = new ro . isdc . wro . config . factory . ServletContextPropertyWroConfigurationFactory ( mockServletContext ) { @ ro . isdc . wro . config . factory . Override protected java . lang . String getConfigPath ( ) { return "/path/to/another/config.properties" ; } } ; "<AssertPl... | org . junit . Assert . assertNotNull ( victim . create ( ) ) |
constructorShouldTakeName ( ) { java . lang . String expectedName = "taskStep" ; se . diabol . jenkins . workflow . step . TaskStep taskStep = new se . diabol . jenkins . workflow . step . TaskStep ( expectedName ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( taskStep . name , org . hamcrest . core . Is . is ( expectedName ) ) |
testNullLastMessageReplyRecipient ( ) { com . earth2me . essentials . User user1 = ess . getUser ( base1 ) ; com . earth2me . essentials . Console console = com . earth2me . essentials . Console . getInstance ( ) ; if ( ess . getSettings ( ) . isLastMessageReplyRecipient ( ) ) { "<AssertPlaceHolder>" ; if ( ess . getSe... | org . junit . Assert . assertNull ( console . getReplyRecipient ( ) ) |
testTSV ( ) { io . cdap . cdap . api . data . format . FormatSpecification spec = new io . cdap . cdap . api . data . format . FormatSpecification ( io . cdap . cdap . api . data . format . Formats . TSV , null , java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; io . cdap . cd... | org . junit . Assert . assertArrayEquals ( expected , actual ) |
testOrs ( ) { java . lang . String str = ( ( ( ( ( ( ( ( "package<sp>org.drools.compiler.integrationtests\n" + "import<sp>" ) + ( org . drools . compiler . Message . class . getName ( ) ) ) + "\n" ) + "rule<sp>X\n" ) + "<sp>when\n" ) + "<sp>Message(<sp>message<sp>==<sp>\'test\'<sp>)\n" ) + "<sp>Message(<sp>!fired<sp>)<... | org . junit . Assert . assertEquals ( 2 , rules ) |
shouldConvertToResourceClass ( ) { final java . lang . String path = toBinary ( "com" , "github" , "bmsantos" , "MyClass" ) ; final java . lang . String expected = ( path . replace ( "." , com . github . bmsantos . core . cola . utils . RESOURCE_SEPARATOR ) ) + ".class" ; final java . lang . String result = binaryToRes... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expected ) ) |
testInitDynAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynAny dynAny = null ; org . omg . DynamicAny . DynAny dynAny2 = null ; tc = orb . get_primitive_tc ( org . omg . CORBA . TCKind . tk_long ) ; dynAny = createD... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
canAddEmployeeToEmployee ( ) { structural . composite . Employee e1 = new structural . composite . Employee ( "Test" , "HR" , 5 ) ; structural . composite . Employee e2 = new structural . composite . Employee ( "Test<sp>2" , "Asst" , 2.5 ) ; e1 . addSubordinate ( e2 ) ; java . util . List < structural . composite . Emp... | org . junit . Assert . assertTrue ( empList . contains ( e2 ) ) |
tracksReferenceDoesNotHitDatabase ( ) { fm . last . musicbrainz . data . model . Medium medium = ( ( fm . last . musicbrainz . data . model . Medium ) ( session . load ( fm . last . musicbrainz . data . model . Medium . class , 2 ) ) ) ; java . util . List < fm . last . musicbrainz . data . model . Track > tracks = med... | org . junit . Assert . assertThat ( fetchCount ( ) , org . hamcrest . CoreMatchers . is ( 1L ) ) |
testSparse ( ) { final java . util . List < java . lang . Integer > expected = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 1000000 ; i += 10000 ) { bits . set ( i ) ; expected . add ( i ) ; } final java . util . List < java . lang . Integer > answer = new java . util . ArrayList ( ) ; for ( int i = bits . n... | org . junit . Assert . assertArrayEquals ( expected . toArray ( ) , answer . toArray ( ) ) |
testThatClientRejectsInvalidServer ( ) { java . lang . String url = "http://www.google.com" ; nl . tudelft . jenkins . client . ClientServerValidationIntegrationTest . LOG . trace ( "Testing<sp>that<sp>{}<sp>is<sp>not<sp>a<sp>Jenkins<sp>server<sp>(anonymous<sp>check)..." , url ) ; boolean exceptionWasThrown = false ; t... | org . junit . Assert . assertThat ( exceptionWasThrown , org . hamcrest . Matchers . is ( true ) ) |
deveObterCnaePrincipalContribuinteComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral retorno = new com . fincatto . documentofiscal . nfe310 . classes . cadastro . NFRetornoConsultaCadastroSituacaoCadastral ( ) ; retorno . setCnaePrincip... | org . junit . Assert . assertEquals ( "123456879" , retorno . getCnaePrincipalContribuinte ( ) ) |
shouldRaiseConstraintViolationWithDefaultGroupCauseNullTitleAndPrice ( ) { org . agoncal . book . javaee7 . chapter03 . ex21 . CD21 cd = new org . agoncal . book . javaee7 . chapter03 . ex21 . CD21 ( ) ; cd . setDescription ( "Best<sp>Jazz<sp>CD<sp>ever" ) ; java . util . Set < org . agoncal . book . javaee7 . chapter0... | org . junit . Assert . assertEquals ( 2 , violations . size ( ) ) |
testDgRecordNumShapes ( ) { org . apache . poi . hssf . usermodel . HSSFWorkbook wb = new org . apache . poi . hssf . usermodel . HSSFWorkbook ( ) ; org . apache . poi . hssf . usermodel . HSSFSheet sheet = wb . createSheet ( ) ; org . apache . poi . hssf . usermodel . HSSFPatriarch patriarch = sheet . createDrawingPat... | org . junit . Assert . assertEquals ( dgRecord . getNumShapes ( ) , 1 ) |
existingDocumentFromUITemplateProviderSpecifiedNonTerminal ( ) { org . xwiki . model . reference . DocumentReference documentReference = new org . xwiki . model . reference . DocumentReference ( "WebHome" 1 , java . util . Arrays . asList ( "Main" ) , "WebHome" ) ; com . xpn . xwiki . doc . XWikiDocument document = moc... | org . junit . Assert . assertNull ( result ) |
commit_noLogin ( ) { com . ibm . ws . security . authentication . jaas . modules . HashtableLoginModule module = new com . ibm . ws . security . authentication . jaas . modules . HashtableLoginModule ( ) ; "<AssertPlaceHolder>" ; } commit ( ) { System . out . println ( ( ( com . ibm . ws . rest . handler . validator . ... | org . junit . Assert . assertFalse ( module . commit ( ) ) |
testGeenBronnen ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht nieuwSituatie = maakNieuwSituatie ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . verbintenis . BRAL2110Test . GEMEENTE_AMSTERDAM ) ; final nl . bzk . brp . model . bericht . kern . Act... | org . junit . Assert . assertEquals ( 0 , berichtEntiteits . size ( ) ) |
testNuxeoRegionProviderWithoutNuxeoConfiguration ( ) { org . junit . Assume . assumeTrue ( "Cannot<sp>run<sp>if<sp>AWS<sp>env<sp>vars<sp>are<sp>already<sp>set" , ( ( new com . amazonaws . regions . AwsEnvVarOverrideRegionProvider ( ) . getRegion ( ) ) == null ) ) ; java . lang . String oldRegion = java . lang . System ... | org . junit . Assert . assertEquals ( "SYSPROP_REGION" , region ) |
testSparseInterpolation5 ( ) { cc . redberry . rings . poly . multivar . MultivariatePolynomial < cc . redberry . rings . bigint . BigInteger > a = cc . redberry . rings . poly . multivar . MultivariatePolynomial . parse ( "7*a*b*c^3+8*a^3*c+8*a^4*b^2*c^4+8*a^4*b^6*c^6" , Rings . Z , MonomialOrder . DEFAULT , "a" , "b"... | org . junit . Assert . assertEquals ( gcd1 . monic ( ) , intrp . monic ( ) ) |
activeMembershipSize_shouldDetermineSizeCorrectly ( ) { java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . add ( Calendar . DAY_OF_YEAR , 1 ) ; java . util . Date endDateLater = calendar . getTime ( ) ; calendar . add ( Calendar . DAY_OF_YEAR , ( - 2 ) ) ; java . util . Date endDate... | org . junit . Assert . assertEquals ( 2 , cohort . activeMembershipSize ( ) ) |
testInit199 ( ) { org . pentaho . di . trans . steps . couchdbinput . CouchDbInputMeta couchDbInputMeta = ( ( org . pentaho . di . trans . steps . couchdbinput . CouchDbInputMeta ) ( stepMockHelper . initStepMetaInterface ) ) ; org . pentaho . di . trans . steps . couchdbinput . CouchDbInputData couchDbInputData = ( ( ... | org . junit . Assert . assertFalse ( couchDbInput . init ( couchDbInputMeta , couchDbInputData ) ) |
testSetting_SourceHiveConfigurationFileHdfsPath ( ) { java . lang . String actualCommand = com . thinkbiganalytics . kylo . nifi . teradata . tdch . core . processor . utils . TdchBuilderTest . getBaseTdchBuilder ( ) . setSourceHiveConfigurationFileHdfsPath ( "/hdfs/path/to/hive.xml" ) . build ( ) ; java . lang . Strin... | org . junit . Assert . assertEquals ( expectedCommand , actualCommand ) |
emptyTextsWithTitle ( ) { java . lang . String diff = com . github . ferstl . maven . pomenforcers . util . SideBySideDiffUtil . diff ( java . util . Collections . emptyList ( ) , java . util . Collections . emptyList ( ) , "left" , "right" ) ; "<AssertPlaceHolder>" ; } diff ( java . util . Collection , java . util . C... | org . junit . Assert . assertEquals ( "" , diff ) |
testVoerRegelUitGeenOuwkivAdres ( ) { final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht nieuweSituatie = maakFamilierechtelijkeBetrekkingBericht ( true ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaand... | org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) ) |
testPhaseListenersHaveApplicationScope ( ) { org . eclipse . rap . rwt . internal . lifecycle . SimpleLifeCycle_Test . registerEntryPoint ( org . eclipse . rap . rwt . internal . lifecycle . SimpleLifeCycle_Test . TestEntryPoint . class ) ; org . eclipse . rap . rwt . testfixture . internal . LoggingPhaseListener phase... | org . junit . Assert . assertTrue ( ( ( phaseListener . getLoggedEvents ( ) . length ) > 0 ) ) |
shouldAcceptValidPathWithLongPath ( ) { hm = org . openstack . atlas . api . validation . validators . HealthMonitorValidatorTest . whenValidatingPut . initHealthMonitor ( null , org . openstack . atlas . api . validation . validators . HTTP , "10" , null , null , "/fail/this/should/not/fail" , null , null ) ; result =... | org . junit . Assert . assertTrue ( resultMessage ( result , org . openstack . atlas . api . validation . validators . PUT ) , result . passedValidation ( ) ) |
testJsonParsing ( ) { final java . lang . String json = "\"foo:17:deadbeef\"" ; final com . spotify . helios . common . descriptors . JobId jobId = com . spotify . helios . common . Json . read ( json , com . spotify . helios . common . descriptors . JobId . class ) ; final com . spotify . helios . common . descriptors... | org . junit . Assert . assertEquals ( expectedJobId , jobId ) |
testStorageMemoryReplication6 ( ) { net . tomp2p . dht . StorageMemory storageMemoryReplication = new net . tomp2p . dht . StorageMemory ( ) ; net . tomp2p . peers . Number160 testLoc = net . tomp2p . peers . Number160 . createHash ( "test1" ) ; net . tomp2p . peers . Number160 testPer = net . tomp2p . peers . Number16... | org . junit . Assert . assertEquals ( null , storageMemoryReplication . findPeerIDsForResponsibleContent ( testLoc ) ) |
testCDSDeletionSpanningIntoCDSFromTheLeftForward ( ) { de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( new de . charite . compbio . jannovar . reference . GenomePosition ( de . charite . compbio . jannovar . reference . Transcrip... | org . junit . Assert . assertEquals ( expectedBuilder . toString ( ) , resultTranscript ) |
testEncodeAndReEncodeContainedJson ( ) { org . hl7 . fhir . dstu3 . model . Composition comp = new org . hl7 . fhir . dstu3 . model . Composition ( ) ; comp . addSection ( ) . addEntry ( ) . setResource ( new org . hl7 . fhir . dstu3 . model . AllergyIntolerance ( ) . addNote ( new org . hl7 . fhir . dstu3 . model . An... | org . junit . Assert . assertEquals ( 2 , parsed . getContained ( ) . size ( ) ) |
testStagedCombinationOfDot1 ( ) { org . apache . taverna . scufl2 . api . core . Processor p = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyStack iss = new org . apache . taverna . scufl2 . api . iterationstrategy . Itera... | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 2 ) , sv . calculateResultWrappingDepth ( tempDepths ) ) |
validatePaymentTypeSupportedBySupplier_RefNotEnabled ( ) { createSupplierCustomerReference ( ) ; "<AssertPlaceHolder>" ; org . oscm . validation . PaymentDataValidator . validatePaymentTypeSupportedBySupplier ( customer , product_none , creditCard ) ; } isPaymentTypeSupportedBySupplier ( org . oscm . domobjects . Organ... | org . junit . Assert . assertFalse ( org . oscm . validation . PaymentDataValidator . isPaymentTypeSupportedBySupplier ( customer , product_none , creditCard ) ) |
testMultiLayerId ( ) { de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH app = new de . vandermeer . svg2vector . applications . fh . Svg2Vector_FH ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . fh . Test_Svg2Vect... | org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) ) |
testGetPropertyDocument ( ) { org . wikidata . wdtk . datamodel . helpers . PropertyDocument o1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makePropertyDocument ( factory . getPropertyIdValue ( "P42" , "foo" ) , java . util . Collections . emptyList ( ) , java . util . Collections . emptyList ( ) , java... | org . junit . Assert . assertEquals ( o1 , o2 ) |
testInOperatorSerialization ( ) { final com . spotify . helios . common . descriptors . HostSelector orig = com . spotify . helios . common . descriptors . HostSelector . parse ( "a<sp>in<sp>(foo,bar)" ) ; final com . spotify . helios . common . descriptors . HostSelector parsed = com . spotify . helios . common . Json... | org . junit . Assert . assertEquals ( orig , parsed ) |
testObvious ( ) { for ( net . roboconf . core . model . runtime . EventType et : net . roboconf . core . model . runtime . EventType . values ( ) ) "<AssertPlaceHolder>" ; } toString ( ) { return getClass ( ) . getSimpleName ( ) ; } | org . junit . Assert . assertNotNull ( et . toString ( ) ) |
nullConversion ( ) { "<AssertPlaceHolder>" ; } convertToModel ( java . lang . Enum , java . lang . Class , java . util . Locale ) { if ( value == null ) { return null ; } return value . toString ( ) ; } | org . junit . Assert . assertEquals ( null , converter . convertToModel ( null , null , null ) ) |
getOperationsForUser1 ( ) { java . util . List < org . oscm . domobjects . OperationRecord > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . domobjects . OperationRecord > > ( ) { @ org . oscm . techproductoperation . dao . Override public java . util . List < org . oscm . d... | org . junit . Assert . assertEquals ( 3 , result . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.