input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
testIntegerInjectBound ( ) { final java . util . List < java . lang . String > injected = new java . util . ArrayList ( ) ; injected . add ( "1" ) ; injected . add ( "2" ) ; injected . add ( "3" ) ; final org . apache . reef . tang . JavaConfigurationBuilder cb = Tang . Factory . getTang ( ) . newConfigurationBuilder (... | org . junit . Assert . assertEquals ( expected , actual ) |
testGetInfoCacheMaxSize ( ) { "<AssertPlaceHolder>" ; } getInfoCacheMaxSize ( ) { edu . illinois . library . cantaloupe . cache . InfoCache infoCache = edu . illinois . library . cantaloupe . cache . InfoService . getInstance ( ) . getInfoCache ( ) ; return infoCache . maxSize ( ) ; } | org . junit . Assert . assertTrue ( ( ( instance . getInfoCacheMaxSize ( ) ) > 100 ) ) |
testBadOperator ( ) { predicate . setOperator ( org . kie . pmml . pmml_4_2 . model . mining . SimpleSegmentPredicateTest . BAD_OP ) ; org . kie . pmml . pmml_4_2 . model . mining . SimpleSegmentPredicate ssp = new org . kie . pmml . pmml_4_2 . model . mining . SimpleSegmentPredicate ( predicate ) ; java . lang . Strin... | org . junit . Assert . assertNull ( text ) |
testStem1 ( ) { edu . nyu . jet . tipster . Document doc = prepare ( "The<sp>company<sp>president<sp>has<sp>a<sp>private<sp>plane." ) ; edu . nyu . jet . lex . StemmerTest . stemmer . tagStem ( doc , doc . fullSpan ( ) ) ; java . util . Vector < edu . nyu . jet . tipster . Annotation > tokens = doc . annotationsOfType ... | org . junit . Assert . assertEquals ( expected , actual ) |
testPLFM_4191 ( ) { org . sagebionetworks . repo . model . table . RowSet rowSet = new org . sagebionetworks . repo . model . table . RowSet ( ) ; org . sagebionetworks . repo . model . table . Row row = new org . sagebionetworks . repo . model . table . Row ( ) ; rowSet . setRows ( com . google . common . collect . Li... | org . junit . Assert . assertNotNull ( results ) |
testConstructor ( ) { org . openhealthtools . mdht . uml . cda . ccd . operations . EpisodeObservationOperations obj = new org . openhealthtools . mdht . uml . cda . ccd . operations . EpisodeObservationOperations ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
test100MaxAge ( ) { long ttl = org . codehaus . httpcache4j . cache . DefaultCacheItem . getTTL ( new org . codehaus . httpcache4j . cache . HTTPResponse ( Status . OK , createDefaultHeaders ( ) . add ( HeaderConstants . CACHE_CONTROL , "max-age=100" ) ) , DEFAULT_TTL ) ; "<AssertPlaceHolder>" ; } add ( java . lang . S... | org . junit . Assert . assertEquals ( 100 , ttl ) |
testSetupPooledDataSourceForJNDI ( ) { try { org . pentaho . database . model . IDatabaseConnection databaseConnection = mock ( org . pentaho . database . model . IDatabaseConnection . class ) ; when ( databaseConnection . getAccessType ( ) ) . thenReturn ( DatabaseAccessType . JNDI ) ; org . pentaho . platform . engin... | org . junit . Assert . assertNotNull ( ex ) |
testGetSelectOnRightMouseClick ( ) { classUnderTest . setSelectOnRightMouseClick ( true ) ; "<AssertPlaceHolder>" ; } getSelectOnRightMouseClick ( ) { return _selectOnRightMouseClick ; } | org . junit . Assert . assertEquals ( true , classUnderTest . getSelectOnRightMouseClick ( ) ) |
testNegativeY ( ) { org . apache . commons . math3 . geometry . euclidean . threed . Vector3D c = new org . apache . commons . math3 . geometry . euclidean . threed . Vector3D ( 1.2323 , ( - 1.4343 ) , 1.6333 ) ; java . lang . String expected = ( ( ( ( ( "{1" + ( getDecimalCharacter ( ) ) ) + "23;<sp>-1" ) + ( getDecim... | org . junit . Assert . assertEquals ( expected , actual ) |
getUserIDWithNullResultReturnsEmptyString ( ) { when ( sql . sqlQuery ( anyString ( ) ) ) . thenReturn ( null ) ; java . lang . String userID = userIDDao . getUserID ( org . communitybridge . linker . UserIDDaoTest . IDENTIFIER ) ; "<AssertPlaceHolder>" ; } getUserID ( org . bukkit . entity . Player ) { return getUserI... | org . junit . Assert . assertEquals ( "" , userID ) |
getAllLocations_shouldReturnAllLocationsIncludingRetired ( ) { java . util . List < org . openmrs . Location > locations = org . openmrs . api . context . Context . getLocationService ( ) . getAllLocations ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getV... | org . junit . Assert . assertEquals ( 6 , locations . size ( ) ) |
testEncryptMessageWithGeneratedPublicKey_shouldBeTheSameAfterDecryptionWithPrivateKey ( ) { byte [ ] data = org . openengsb . core . util . CipherUtilTest . TEST_STRING . getBytes ( org . openengsb . core . util . CipherUtilTest . DEFAULT_ENCODING ) ; byte [ ] encrypted = org . openengsb . core . util . CipherUtils . e... | org . junit . Assert . assertEquals ( org . openengsb . core . util . CipherUtilTest . TEST_STRING , result ) |
testAddMovieSubtitles6 ( ) { com . moviejukebox . tools . SubtitleToolsTest . LOG . info ( "AddMovieSubtitles6" ) ; java . lang . String actualSubtitles = "English<sp>/<sp>German" ; java . lang . String newSubtitles = com . moviejukebox . tools . SubtitleTools . addMovieSubtitle ( actualSubtitles , "YES" ) ; "<AssertPl... | org . junit . Assert . assertEquals ( "English<sp>/<sp>German" , newSubtitles ) |
testFilterAddDefaultOperatorsToListPopulatesList ( ) { org . dspace . app . rest . model . SearchConfigurationRest . Filter filter = new org . dspace . app . rest . model . SearchConfigurationRest . Filter ( ) ; filter . addDefaultOperatorsToList ( ) ; "<AssertPlaceHolder>" ; } getOperators ( ) { return operators ; } | org . junit . Assert . assertTrue ( ( ! ( filter . getOperators ( ) . isEmpty ( ) ) ) ) |
handleInNonDebug ( ) { creatorManager . isDebug ( ) ; org . easymock . EasyMock . expectLastCall ( ) . andReturn ( Boolean . FALSE ) ; org . easymock . EasyMock . replay ( creatorManager ) ; org . easymock . EasyMock . replay ( accessControl ) ; org . easymock . EasyMock . replay ( converterManager ) ; java . lang . St... | org . junit . Assert . assertNull ( response ) |
testPipeliningStats ( ) { mc . writeln ( "stats" ) ; mc . writeln ( ( "get<sp>" + ( org . infinispan . server . test . client . memcached . AbstractMemcachedLocalIT . KEY_B ) ) ) ; mc . flush ( ) ; java . lang . String line = null ; do { line = mc . readln ( ) ; } while ( ! ( line . equals ( "END" ) ) ) ; "<AssertPlace... | org . junit . Assert . assertEquals ( "END" , mc . readln ( ) ) |
shouldGenerateCorrectSqlForMathOperations2 ( ) { java . lang . String result = testDialect . getSqlFrom ( org . alfasoftware . morf . sql . SqlUtils . field ( "a" ) . divideBy ( org . alfasoftware . morf . sql . SqlUtils . field ( "b" ) ) . plus ( org . alfasoftware . morf . sql . SqlUtils . literal ( 100 ) ) ) ; "<Ass... | org . junit . Assert . assertEquals ( expectedSqlForMathOperations2 ( ) , result ) |
snitch ( ) { io . cereebro . core . Dependency d1 = io . cereebro . core . Dependency . on ( io . cereebro . core . Component . of ( "cards" , "game" ) ) ; io . cereebro . core . Consumer c1 = io . cereebro . core . Consumer . by ( io . cereebro . core . Component . of ( "angel" , "superhero" ) ) ; io . cereebro . core... | org . junit . Assert . assertEquals ( expected , actual ) |
calculateThroughput_a ( ) { java . util . Date date = new java . util . Date ( ) ; java . util . List < com . att . aro . core . packetanalysis . pojo . Throughput > testResult = new java . util . ArrayList < com . att . aro . core . packetanalysis . pojo . Throughput > ( ) ; java . util . List < com . att . aro . core... | org . junit . Assert . assertEquals ( 7 , testResult . size ( ) ) |
shouldBindToRequestParam ( ) { com . threewks . thundr . introspection . ParameterDescription requestParameter = new com . threewks . thundr . introspection . ParameterDescription ( "request" , com . threewks . thundr . request . Request . class ) ; parameterDescriptions . put ( requestParameter , null ) ; binder . bin... | org . junit . Assert . assertThat ( parameterDescriptions . get ( requestParameter ) , org . hamcrest . Matchers . is ( ( ( java . lang . Object ) ( request ) ) ) ) |
testBoolean ( ) { boolean value = com . alicloud . openservices . tablestore . common . TestUtil . randomBoolean ( ) ; com . alicloud . openservices . tablestore . model . ColumnValue v = com . alicloud . openservices . tablestore . model . ColumnValue . fromBoolean ( value ) ; "<AssertPlaceHolder>" ; checkType ( v ) ;... | org . junit . Assert . assertEquals ( v . asBoolean ( ) , value ) |
testThrowCheckedException ( ) { java . io . IOException expected = new java . io . IOException ( "EXPECTED<sp>ERROR" ) ; java . io . IOException actual = null ; try { org . slieb . throwables . LongBinaryOperatorWithThrowable . aLongBinaryOperatorThatUnsafelyThrowsUnchecked ( ( v1 , v2 ) -> { throw expected ; } ) . app... | org . junit . Assert . assertEquals ( expected , actual ) |
testDictEmptyDefaultValue ( ) { java . lang . String templates = ( ( "typeInit<sp>::=<sp>[\"int\":\"0\",<sp>default:]<sp>" + ( newline ) ) + "var(type,name)<sp>::=<sp>\"<type><sp><name><sp>=<sp><typeInit.(type)>;\"" ) + ( newline ) ; writeFile ( tmpdir , "test.stg" , templates ) ; org . stringtemplate . v4 . misc . Err... | org . junit . Assert . assertEquals ( expected , result ) |
overlapsEmpty2 ( ) { net . time4j . PlainDate startA = net . time4j . PlainDate . of ( 2014 , 5 , 13 ) ; net . time4j . PlainDate endA = net . time4j . PlainDate . of ( 2014 , 6 , 15 ) ; net . time4j . PlainDate startB = net . time4j . PlainDate . of ( 2014 , 6 , 16 ) ; net . time4j . range . DateInterval a = net . tim... | org . junit . Assert . assertThat ( a . overlaps ( b ) , org . hamcrest . CoreMatchers . is ( false ) ) |
testPutKnownClass ( ) { java . net . URI fullPathKey = rest . fullPathKey ( "y" ) ; java . io . ByteArrayOutputStream bout = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oo = new java . io . ObjectOutputStream ( bout ) ; java . lang . Integer i1 = 42 ; oo . writeObject ( i1 ) ; oo . flush ... | org . junit . Assert . assertEquals ( i1 , i2 ) |
testGetInputPathsPoolAndFailure ( ) { java . util . List < org . apache . hadoop . fs . Path > pathsToAdd = new java . util . ArrayList ( ) ; org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( "dummy-path" ) ; pathsToAdd . add ( path ) ; pathsToAdd . add ( path ) ; pathsToAdd . add ( path ... | org . junit . Assert . assertNotNull ( e ) |
testVerifyAndRecoverFromNew ( ) { byte [ ] neu = new byte [ ] { 1 , 2 , 3 } ; java . io . File file = new java . io . File ( createTestDir ( ) , "x" ) ; createFile ( new java . io . File ( ( ( file . getAbsolutePath ( ) ) + "-new" ) ) , neu ) ; com . streamsets . datacollector . io . DataStore ds = new com . streamsets... | org . junit . Assert . assertArrayEquals ( neu , res ) |
guessCaseTest ( ) { java . lang . String [ ] inputs = new java . lang . String [ ] { "abc" , "Abc" , "ABC" , "Abc'de" , "ABC'DE" , "ABC." , "A1" 0 , "a" , "12" , "A" , "A1" } ; zemberek . morphology . analysis . WordAnalysisSurfaceFormatter [ ] expected = new CaseType . CaseType [ ] { LOWER_CASE , TITLE_CASE , UPPER_CA... | org . junit . Assert . assertEquals ( expected [ i ] , formatter . guessCase ( input ) ) |
testGetTickId ( ) { uk . ac . ic . kyoto . tradehistory . TickHistory t = new uk . ac . ic . kyoto . tradehistory . TickHistory ( 0 ) ; "<AssertPlaceHolder>" ; } getTickId ( ) { return tickId ; } | org . junit . Assert . assertTrue ( ( ( t . getTickId ( ) ) == 0 ) ) |
testVerifyPolicy1 ( ) { com . liferay . portal . security . membershippolicy . UserGroupMembershipPolicyFactoryImplTest . _atomicState . reset ( ) ; com . liferay . portal . kernel . security . membershippolicy . UserGroupMembershipPolicyUtil . verifyPolicy ( ) ; "<AssertPlaceHolder>" ; } isSet ( ) { if ( Boolean . TRU... | org . junit . Assert . assertTrue ( com . liferay . portal . security . membershippolicy . UserGroupMembershipPolicyFactoryImplTest . _atomicState . isSet ( ) ) |
testParseEmptyList ( ) { java . util . Map < java . lang . String , org . eclipse . lsp4j . jsonrpc . json . JsonRpcMethod > supportedMethods = new java . util . LinkedHashMap ( ) ; supportedMethods . put ( "foo" , org . eclipse . lsp4j . jsonrpc . json . JsonRpcMethod . request ( "foo" , new com . google . gson . refl... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
testKey ( ) { builder . setKey ( com . google . cloud . datastore . BaseEntityTest . KEY ) ; com . google . cloud . datastore . BaseEntity < com . google . cloud . datastore . Key > entity = builder . build ( ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; } | org . junit . Assert . assertEquals ( com . google . cloud . datastore . BaseEntityTest . KEY , entity . getKey ( ) ) |
testGetValueForId ( ) { java . lang . reflect . Method method = org . onebusaway . federations . SimpleFederatedService . class . getDeclaredMethod ( "getValueForId" , java . lang . String . class ) ; org . onebusaway . federations . annotations . FederatedServiceMethodInvocationHandler handler = _factory . getHandlerF... | org . junit . Assert . assertEquals ( 0 , impl . getArgumentIndex ( ) ) |
testSumWithInvalidRange ( ) { org . apache . hadoop . hbase . client . coprocessor . AggregationClient aClient = new org . apache . hadoop . hbase . client . coprocessor . AggregationClient ( org . apache . hadoop . hbase . coprocessor . TestBigDecimalColumnInterpreter . conf ) ; org . apache . hadoop . hbase . client ... | org . junit . Assert . assertEquals ( null , sum ) |
groupCardinalityZeroToZeroWithZeroToZeroAttributeCardinality ( ) { generateDrugsWithGroups ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[0..0]<sp>{<sp>[0..0]<sp>%s<sp>=<sp><%s<sp>}" , com . b2international . snowowl . snomed . core . ecl . Snome... | org . junit . Assert . assertEquals ( expected , actual ) |
testEmptyDomain ( ) { try { new apps . provisioning . config . ConfigData ( "./test/empty-domain.properties" ) ; org . junit . Assert . fail ( "An<sp>incorrect<sp>value<sp>was<sp>passed<sp>as<sp>valid." ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } | org . junit . Assert . assertTrue ( true ) |
shouldDeleteFlowMeter ( ) { org . openkilda . model . TransitVlan vlan = org . openkilda . model . TransitVlan . builder ( ) . vlan ( 1 ) . pathId ( new org . openkilda . model . PathId ( ( ( org . openkilda . persistence . repositories . impl . Neo4jTransitVlanRepositoryTest . TEST_FLOW_ID ) + "_path" ) ) ) . flowId (... | org . junit . Assert . assertEquals ( 0 , org . openkilda . persistence . repositories . impl . Neo4jTransitVlanRepositoryTest . transitVlanRepository . findAll ( ) . size ( ) ) |
testRefreshQueuesWithNewQueue ( ) { org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . CapacityScheduler cs = new org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . CapacityScheduler ( ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . c... | org . junit . Assert . assertEquals ( queueB , queueB4 . getParent ( ) ) |
testDelete ( ) { methodWatcher . executeUpdate ( format ( "update<sp>t1<sp>--splice-properties<sp>useSpark=%s\n<sp>set<sp>d1=a1<sp>where<sp>a1>=3" , useSparkString ) ) ; methodWatcher . executeUpdate ( format ( "delete<sp>from<sp>t1<sp>--splice-properties<sp>useSpark=%s\n<sp>where<sp>d1=999" , useSparkString ) ) ; java... | org . junit . Assert . assertEquals ( expected , TestUtils . FormattedResult . ResultFactory . toString ( rs ) ) |
executeBatch2 ( ) { int [ ] ints = org . fastquery . test . MethodQueryTest . studentDBService . executeBatch ( ( ( ( java . lang . System . getProperty ( "user.dir" ) ) + "/src/test/resources/testFiles" ) + "/update.sql" ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( ints . length , is ( 10 ) ) |
testCaseSensitive ( ) { org . teiid . core . util . Properties p = new org . teiid . core . util . Properties ( ) ; p . setProperty ( "org.teiid.val" , "100" ) ; org . teiid . core . util . TestPropertiesUtils . MyBean test = new org . teiid . core . util . TestPropertiesUtils . MyBean ( ) ; org . teiid . core . util .... | org . junit . Assert . assertEquals ( 100 , test . getVal ( ) ) |
testInvertIntersectingIntervalsAll ( ) { System . out . println ( "Negate<sp>Intersecting<sp>Intervals<sp>All" ) ; java . util . Collection < com . sun . btrace . util . Interval > intervals = java . util . Arrays . asList ( com . sun . btrace . util . Interval . ge ( 1 ) , com . sun . btrace . util . Interval . lt ( 5... | org . junit . Assert . assertEquals ( expResult , result ) |
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . WorkflowDefinitionLink > workflowDefinitionLinks = _persistence... | org . junit . Assert . assertTrue ( workflowDefinitionLinks . isEmpty ( ) ) |
lambdaSingletonTest ( ) { com . amazonaws . services . lambda . AWSLambda firstInstance = fr . d2si . ooso . tests . AWSLambdaProvider . getLambdaClient ( ) ; com . amazonaws . services . lambda . AWSLambda secondInstance = fr . d2si . ooso . tests . AWSLambdaProvider . getLambdaClient ( ) ; "<AssertPlaceHolder>" ; } g... | org . junit . Assert . assertTrue ( ( firstInstance == secondInstance ) ) |
testSetLifecycleRunning ( ) { status . start ( ) ; "<AssertPlaceHolder>" ; verify ( eventBus ) . post ( Lifecycle . RUNNING ) ; } isProcessing ( ) { return isProcessing . get ( ) ; } | org . junit . Assert . assertTrue ( status . isProcessing ( ) ) |
testEmptyIterator ( ) { final org . apache . druid . query . groupby . epinephelinae . TestColumnSelectorFactory columnSelectorFactory = org . apache . druid . query . groupby . epinephelinae . GrouperTestUtil . newColumnSelectorFactory ( ) ; final org . apache . druid . query . groupby . epinephelinae . StreamingMerge... | org . junit . Assert . assertTrue ( ( ! ( grouper . iterator ( true ) . hasNext ( ) ) ) ) |
testConcatSortedPercentEncodedParams_1 ( ) { java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( "key1" , "value1" ) ; params . put ( "key2" , "value2" ) ; params . put ( "key3" , "value3" ) ; java . la... | org . junit . Assert . assertNotNull ( result ) |
testGenerateAnyFromDynAny ( ) { java . lang . String msg ; org . omg . CORBA . Any any = null ; org . omg . CORBA . TypeCode tc = null ; org . omg . DynamicAny . DynUnion dynAny = null ; org . omg . DynamicAny . DynUnion dynAny2 = null ; tc = org . jacorb . test . UnionDefaultShortTypeHelper . type ( ) ; dynAny = creat... | org . junit . Assert . assertTrue ( msg , dynAny . equal ( dynAny2 ) ) |
testLocalBernsenThreshold ( ) { ops . run ( net . imagej . ops . threshold . localBernsen . LocalBernsenThreshold . class , out , in , new net . imglib2 . algorithm . neighborhood . RectangleShape ( 3 , false ) , new net . imglib2 . outofbounds . OutOfBoundsMirrorFactory < net . imglib2 . type . numeric . integer . Byt... | org . junit . Assert . assertEquals ( true , out . firstElement ( ) . get ( ) ) |
connect ( io . vertx . core . net . NetSocket , io . vertx . core . net . NetSocket ) { int port = 8000 ; java . lang . String host = "localhost" ; io . vertx . core . impl . FutureFactoryImpl futureFactory = new io . vertx . core . impl . FutureFactoryImpl ( ) ; new mockit . MockUp < io . vertx . core . net . NetClien... | org . junit . Assert . assertThat ( socks , org . hamcrest . Matchers . contains ( normalSocket , sslSocket ) ) |
test_PromoteQueen ( ) { classUnderTest = addWhitePawn ( GenericPosition . e7 ) ; ml = classUnderTest . generateMoves ( new eubos . board . Board ( pl ) ) ; expectedMove = new eubos . board . pieces . GenericMove ( GenericPosition . e7 , GenericPosition . e8 , GenericChessman . QUEEN ) ; "<AssertPlaceHolder>" ; } genera... | org . junit . Assert . assertTrue ( ml . contains ( expectedMove ) ) |
testTimestamp ( ) { org . apache . cxf . service . Service service = createService ( ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties inProperties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxInInterceptor inhandler = new org . ... | org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) ) |
reverse ( ) { System . out . println ( "reverse" ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes . core . io . ls . LinkSpecification ( "tmp_during_reverse(x.beginsAtDateTime|endsAtDateTime,y.beginsAtDateTime|endsAtDateTime)" , 1.0 ) ; org . aksw . limes . core . execution . plan... | org . junit . Assert . assertTrue ( m . equals ( m3 ) ) |
testIsNull ( ) { try { org . talend . dq . dbms . DbmsLanguage dbms = getMysqlDbmsLanguage ( ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { org . junit . Assert . fail ( e . getMessage ( ) ) ; } } isNull ( ) { return surroundWithSpaces ( SqlPredicate . IS_NULL . getLiteral ( ) ) ; } | org . junit . Assert . assertNotNull ( dbms . isNull ( ) ) |
nextUp4 ( ) { org . diirt . graphene . TimeScales . TimePeriod nextUp = org . diirt . graphene . TimeScales . nextUp ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 10 ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( nextUp , equalTo ( new org . diirt . graphene . TimeScales . TimePeriod ( SECOND , 15 ) ) ) |
testHandle ( ) { org . lnu . is . security . exception . AccessDeniedException e = new org . lnu . is . security . exception . AccessDeniedException ( "" ) ; org . lnu . is . resource . message . MessageResource expected = new org . lnu . is . resource . message . MessageResource ( ) ; expected . setMessageType ( Messa... | org . junit . Assert . assertEquals ( expected , actual ) |
givenKeepPostIfHasComments_whenHasComments_thenSucceed ( ) { final org . baeldung . persistence . model . Post post = new org . baeldung . persistence . model . Post ( ) ; post . setMinScoreRequired ( 5 ) ; post . setKeepIfHasComments ( true ) ; final org . baeldung . reddit . util . PostScores postScores = new org . b... | org . junit . Assert . assertTrue ( getSuccessReason ( post , postScores ) . contains ( "Succeed<sp>because<sp>has<sp>comments" ) ) |
testNumThreadsMoreThanNumTables ( ) { com . streamsets . pipeline . stage . origin . jdbc . table . TableConfigBean tableConfigBean = new com . streamsets . pipeline . stage . origin . jdbc . table . TableJdbcSourceTestBuilder . TableConfigBeanTestBuilder ( ) . tablePattern ( "%" ) . schema ( database ) . offsetColumns... | org . junit . Assert . assertEquals ( com . streamsets . pipeline . stage . origin . jdbc . table . MultiThreadedIT . NUMBER_OF_TABLES , numberOfThreads ) |
preemptedForegroundRequest ( ) { org . eclipse . tracecompass . tmf . ctf . core . tests . temp . request . TmfSchedulerTest . ForegroundRequest foreground9 = new org . eclipse . tracecompass . tmf . ctf . core . tests . temp . request . TmfSchedulerTest . ForegroundRequest ( org . eclipse . tracecompass . tmf . core .... | org . junit . Assert . assertFalse ( foreground9 . isCompleted ( ) ) |
testInstance ( ) { java . lang . reflect . Constructor < org . ff4j . utils . MappingUtil > ce = org . ff4j . utils . MappingUtil . class . getDeclaredConstructor ( ) ; ce . setAccessible ( true ) ; ce . newInstance ( ) ; "<AssertPlaceHolder>" ; org . ff4j . utils . MappingUtil . toMap ( "A&B" ) ; } mapPropertyType ( j... | org . junit . Assert . assertNull ( org . ff4j . utils . MappingUtil . mapPropertyType ( null ) ) |
test_InMemoryLexicon ( ) { org . terrier . realtime . memory . MemoryLexicon lexicon = new org . terrier . realtime . memory . MemoryLexicon ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( lexicon ) |
testFileInFolderAllIgnored ( ) { org . eclipse . jgit . revwalk . RevCommit commit = writeFileInFolderAndCommit ( ) ; writeFileInFolderAllIgnored ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlaceHolder>" ; } next ( ) { org . eclipse . jgit . treewalk . CanonicalTreePa... | org . junit . Assert . assertFalse ( treeWalk . next ( ) ) |
testIsExcludeRecycleBinTables ( ) { classUnderTest . setExcludeRecycleBinTables ( true ) ; "<AssertPlaceHolder>" ; } isExcludeRecycleBinTables ( ) { return excludeRecycleBinTables ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isExcludeRecycleBinTables ( ) ) |
testVisitNeoStoreCommand ( ) { org . neo4j . kernel . impl . transaction . command . Command . NeoStoreCommand cmd = mock ( Command . NeoStoreCommand . class ) ; when ( cmd . handle ( any ( org . neo4j . kernel . impl . api . CommandVisitor . class ) ) ) . thenCallRealMethod ( ) ; boolean result = facade . visitNeoStor... | org . junit . Assert . assertFalse ( result ) |
MOVEDepthINFInITY ( ) { final java . lang . String depth = "INFInITY" ; final java . lang . String srcCol = "davColforMOVE" ; final java . lang . String destCol = "destCol" ; final java . lang . String destUrl = com . fujitsu . dc . test . unit . core . UrlUtils . box ( com . fujitsu . dc . test . jersey . box . dav . ... | org . junit . Assert . assertEquals ( HttpStatus . SC_CREATED , response . getStatusCode ( ) ) |
getRelativePathWorksWithRootDirectory ( ) { "<AssertPlaceHolder>" ; } getRelativeFile ( java . io . File , java . io . File ) { return new java . io . File ( org . eclipse . rdf4j . common . io . FileUtil . getRelativePath ( subj , relativeTo ) ) ; } | org . junit . Assert . assertEquals ( new java . io . File ( "" ) , org . eclipse . rdf4j . common . io . FileUtil . getRelativeFile ( new java . io . File ( "/" ) , new java . io . File ( "/" ) ) ) |
testAgeCounterRollOver ( ) { resultInt = defaultIsisLsdbAge . ageCounterRollOver ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; } | org . junit . Assert . assertThat ( resultInt , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testHasNoArrayWhenMultipleBuffers ( ) { io . netty . buffer . ByteBuf buf1 = buffer ( 10 ) ; io . netty . buffer . ByteBuf buf2 = buffer ( 10 ) ; io . netty . buffer . ByteBuf buf = io . netty . buffer . FixedCompositeByteBufTest . newBuffer ( buf1 , buf2 ) ; "<AssertPlaceHolder>" ; try { buf . array ( ) ; org . junit ... | org . junit . Assert . assertFalse ( buf . hasArray ( ) ) |
testCreateExecutionContextWithRequest ( ) { final com . amazonaws . AmazonWebServiceRequest awsr = new com . amazonaws . AmazonWebServiceClientTest . TestRequest ( ) ; final com . amazonaws . Request < java . lang . String > req = new com . amazonaws . DefaultRequest < java . lang . String > ( awsr , "test" ) ; final c... | org . junit . Assert . assertEquals ( client . requestHandler2s , ec . getRequestHandler2s ( ) ) |
signWithSignatureToken ( ) { byte [ ] digest = java . security . MessageDigest . getInstance ( "SHA-256" ) . digest ( "hello" . getBytes ( ) ) ; org . digidoc4j . DigestDataFile digestDataFile = new org . digidoc4j . DigestDataFile ( "hello.txt" , DigestAlgorithm . SHA256 , digest ) ; org . digidoc4j . Signature signat... | org . junit . Assert . assertTrue ( signature . validateSignature ( ) . isValid ( ) ) |
testCanCreateDescriptor ( ) { com . eclipsesource . tabris . ui . PageConfiguration config = new com . eclipsesource . tabris . ui . PageConfiguration ( "foo" , com . eclipsesource . tabris . internal . ui . TestPage . class ) . setTopLevel ( true ) ; com . eclipsesource . tabris . internal . ui . PageDescriptor descri... | org . junit . Assert . assertNotNull ( descriptor ) |
parseEnableSamplerForDurationHourRegExp ( ) { final org . metricssampler . daemon . commands . ControlCommand expected = mock ( org . metricssampler . daemon . commands . ControlCommand . class ) ; when ( factory . enableSamplerForDuration ( "^what.*ever.+$" , 3600L ) ) . thenReturn ( expected ) ; final org . metricssa... | org . junit . Assert . assertSame ( expected , result ) |
should_verify_passwords ( ) { when ( users . existsWithEmail ( org . mamute . validators . SignupValidatorTest . VALID_EMAIL ) ) . thenReturn ( false ) ; org . mamute . model . User user = user ( org . mamute . validators . SignupValidatorTest . VALID_USER_NAME , org . mamute . validators . SignupValidatorTest . VALID_... | org . junit . Assert . assertFalse ( valid ) |
testSaveCustomerCommunication ( ) { org . libreplan . business . externalcompanies . entities . CustomerCommunication customerCommunication = createValidCustomerCommunication ( ) ; customerCommunicationDAO . save ( customerCommunication ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; } | org . junit . Assert . assertTrue ( ( ( customerCommunication . getId ( ) ) != null ) ) |
testOnConnectionChangedUpdatePre ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) ) |
testNotBound ( ) { org . evosuite . runtime . mock . java . net . MockServerSocket server = new org . evosuite . runtime . mock . java . net . MockServerSocket ( ) ; try { server . accept ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { } int port = 42 ; server . bind ( new java . net . I... | org . junit . Assert . assertTrue ( server . isBound ( ) ) |
testSeqArraySlice ( ) { org . jooq . lambda . Seq < java . lang . Integer > seq = org . jooq . lambda . Seq . seq ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 5 } , 2 , 4 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( asList ( 3 , 4 ) , seq . toList ( ) ) |
whenPresent ( ) { java . util . SortedSet < org . joda . time . LocalDate > dueDates = lease . dueDatesInRange ( org . incode . module . base . integtests . VT . ld ( 2012 , 1 , 1 ) , org . incode . module . base . integtests . VT . ld ( 2014 , 1 , 1 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { assertThat ( linkRepositor... | org . junit . Assert . assertThat ( dueDates . size ( ) , org . hamcrest . CoreMatchers . is ( 10 ) ) |
testGetSupportedIIIF1Qualities ( ) { instance . setSourceFormat ( getAnySupportedSourceFormat ( instance ) ) ; java . util . Set < edu . illinois . library . cantaloupe . resource . iiif . v1 . Quality > expectedQualities = java . util . EnumSet . of ( edu . illinois . library . cantaloupe . processor . edu . illinois ... | org . junit . Assert . assertEquals ( expectedQualities , instance . getSupportedIIIF1Qualities ( ) ) |
testComplexMergeRequired ( ) { uk . gov . dstl . baleen . core . utils . yaml . Yaml toMerge = new uk . gov . dstl . baleen . core . utils . yaml . YamlFile ( getClass ( ) , uk . gov . dstl . baleen . core . utils . yaml . MergedYamlTest . YAMLCONFIGURATION_YAML ) ; java . util . Map < java . lang . String , java . lan... | org . junit . Assert . assertTrue ( ( dataTree instanceof java . util . Map ) ) |
testBase64Npy ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 4 , 4 ) ; java . lang . String base64Npy = org . nd4j . serde . base64 . Nd4jBase64 . base64StringNumpy ( arr ) ; org . nd4j . linalg . api . ndarray . INDArray fromBase64 = org . nd4j . serde ... | org . junit . Assert . assertEquals ( arr , fromBase64 ) |
testSimple2 ( ) { instrument ( org . jacoco . core . test . validation . java5 . CyclomaticComplexityTest . Simple . class ) ; target . test ( 0 ) ; final org . jacoco . core . analysis . ICounter complexity = analyze ( ) ; "<AssertPlaceHolder>" ; } getInstance ( int , int ) { if ( ( missed <= ( org . jacoco . core . i... | org . junit . Assert . assertEquals ( org . jacoco . core . internal . analysis . CounterImpl . getInstance ( 0 , 1 ) , complexity ) |
testFindByRoleUserGroup ( ) { java . lang . String objectName1 = "alphaName1" ; java . lang . String roleUserGroup1 = "sigmaGroup1" ; java . lang . String objectName2 = "alphaName2" ; java . lang . String roleUserGroup2 = "sigmaGroup2" ; org . oscarehr . common . model . SecObjPrivilege secObjPrivilege1 = new org . osc... | org . junit . Assert . assertTrue ( true ) |
testSubsetSchemaNoFields ( ) { org . apache . spark . sql . types . StructField field1 = org . apache . spark . sql . types . DataTypes . createStructField ( "field1" , DataTypes . StringType , true ) ; org . apache . spark . sql . types . StructField field2 = org . apache . spark . sql . types . DataTypes . createStru... | org . junit . Assert . assertEquals ( subset . fields ( ) . length , 0 ) |
testContains ( ) { defaultSetUp ( ) ; org . eclipse . equinox . region . internal . tests . Region r = createDefaultBundleIdBasedRegion ( ) ; r . addBundle ( this . mockBundle ) ; "<AssertPlaceHolder>" ; } contains ( org . eclipse . core . runtime . jobs . ISchedulingRule ) { return rule == ( this ) ; } | org . junit . Assert . assertTrue ( r . contains ( this . mockBundle ) ) |
testFailedGreaterThanWithLessComparison ( ) { new org . opennms . core . criteria . CriteriaBuilder ( org . opennms . netmgt . dao . mock . BeanWrapperVisitorTest . TestBean . class ) . gt ( "four" , 17.0 ) . toCriteria ( ) . visit ( m_visitor ) ; "<AssertPlaceHolder>" ; } getMatches ( ) { return ( m_matches ) == null ... | org . junit . Assert . assertEquals ( 0 , m_visitor . getMatches ( ) . size ( ) ) |
testNonExistentConfig ( ) { org . apache . juneau . config . ConfigStore s = org . apache . juneau . config . ConfigMemoryStore . create ( ) . build ( ) ; org . apache . juneau . config . ConfigMap cm = s . getMap ( "Foo.cfg" ) ; "<AssertPlaceHolder>" ; } toString ( ) { switch ( type ) { case REMOVE_SECTION : return ( ... | org . junit . Assert . assertEquals ( "" , cm . toString ( ) ) |
testAttachedRelease_1 ( ) { lombok . val wsconf = org . nd4j . linalg . api . memory . conf . WorkspaceConfiguration . builder ( ) . build ( ) ; try ( lombok . val ws = org . nd4j . linalg . factory . Nd4j . getWorkspaceManager ( ) . getAndActivateWorkspace ( wsconf , "haha72yjhfdfs" ) ) { lombok . val array = org . nd... | org . junit . Assert . assertFalse ( array . closeable ( ) ) |
connectionMadeDone ( ) { final org . zapodot . junit . db . internal . FilePathInitializationPlugin filePathInitializationPlugin = new org . zapodot . junit . db . internal . FilePathInitializationPlugin ( "classpath:initial.sql" , java . nio . charset . StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; when ( conne... | org . junit . Assert . assertNotNull ( filePathInitializationPlugin ) |
testEquals_notEqualsDifferentPercentage ( ) { org . eclipse . rap . rwt . template . Position position1 = new org . eclipse . rap . rwt . template . Position ( 3.14F , 42 ) ; org . eclipse . rap . rwt . template . Position position2 = new org . eclipse . rap . rwt . template . Position ( 3.141F , 42 ) ; "<AssertPlaceHo... | org . junit . Assert . assertFalse ( position1 . equals ( position2 ) ) |
testEvaluate ( ) { org . apache . tiles . request . Request request = createMock ( org . apache . tiles . request . Request . class ) ; org . apache . tiles . evaluator . AttributeEvaluator evaluator = createMock ( org . apache . tiles . evaluator . AttributeEvaluator . class ) ; org . apache . tiles . Attribute templa... | org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , container . evaluate ( templateAttribute , request ) ) |
thrownExceptionAvailableInGetFallbackUsingExecute ( ) { setUpTenacityCommand ( 2 , 100 ) ; "<AssertPlaceHolder>" ; } exceptionCommand ( ) { return new com . yammer . tenacity . core . TenacityCommand < java . lang . Boolean > ( DependencyKey . EXAMPLE ) { @ com . yammer . tenacity . tests . Override protected com . yam... | org . junit . Assert . assertTrue ( exceptionCommand ( ) . execute ( ) ) |
testProductAttributeUpdateFailPosLong ( ) { org . candlepin . model . Product original = createTestProduct ( ) ; productCurator . create ( original ) ; "<AssertPlaceHolder>" ; original . setAttribute ( "product.long_pos_count" , "-23" ) ; productCurator . merge ( original ) ; } getUuid ( ) { return uuid ; } | org . junit . Assert . assertTrue ( ( ( original . getUuid ( ) ) != null ) ) |
testGetViolationsWithPolicy3 ( ) { eu . atos . sla . datamodel . IPolicy policy ; System . out . println ( "---testEvaluateWithPolicy3()---" ) ; java . util . List < eu . atos . sla . monitoring . IMonitoringMetric > metrics = setUpWithPolicies ( null , null ) ; policy = newPolicy ( "LATENCY" , 3 , new java . util . Da... | org . junit . Assert . assertEquals ( 0 , violations . size ( ) ) |
openFolderByContextMenu ( ) { org . pdfsam . test . HitTestListener < org . pdfsam . ui . commons . OpenFileRequest > listener = new org . pdfsam . test . HitTestListener ( ) ; eventStudio ( ) . add ( org . pdfsam . ui . commons . OpenFileRequest . class , listener ) ; rightClickOn ( "temp3.pdf" ) ; clickOn ( org . pdf... | org . junit . Assert . assertTrue ( listener . isHit ( ) ) |
testTeiidURLNoHostAndPort2 ( ) { java . lang . String SERVER_URL = "mm://" ; "<AssertPlaceHolder>" ; } isValidServerURL ( java . lang . String ) { boolean valid = true ; try { new org . teiid . net . TeiidURL ( serverURL ) ; } catch ( java . lang . Exception e ) { valid = false ; } return valid ; } | org . junit . Assert . assertFalse ( org . teiid . net . TeiidURL . isValidServerURL ( SERVER_URL ) ) |
testSetNotEqual ( ) { org . openscience . cdk . smsd . helper . BinaryTree instance = new org . openscience . cdk . smsd . helper . BinaryTree ( 15 ) ; org . openscience . cdk . smsd . helper . BinaryTree equal = new org . openscience . cdk . smsd . helper . BinaryTree ( 15 ) ; org . openscience . cdk . smsd . helper .... | org . junit . Assert . assertEquals ( expResult , result ) |
testCompareTo ( ) { nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpSoortRelatieCode result = nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpSoortRelatieCode . wrap ( "1" , onderzoek ) ; nl . bzk . migratiebrp . conversie . model . brp . attribuut . BrpSoortRelatieCode result2 = nl ... | org . junit . Assert . assertEquals ( 0 , result . compareTo ( result2 ) ) |
testGetLinksInMst_NullGraph ( ) { networkGraphImpl . clear ( ) ; java . util . List < org . opendaylight . yang . gen . v1 . urn . tbd . params . xml . ns . yang . network . topology . rev131021 . network . topology . topology . Link > mstLinks = networkGraphImpl . getLinksInMst ( ) ; "<AssertPlaceHolder>" ; } getLinks... | org . junit . Assert . assertEquals ( 0 , mstLinks . size ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.