input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isDiskImageIdValid_ValidDiskImageID ( ) { paramHandler . setDiskImageId ( "diskimgid" ) ; doReturn ( givenDiskImages ( ) ) . when ( vServerProcessor . vsysComm ) . getDiskImages ( any ( org . oscm . app . iaas . PropertyHandler . class ) ) ; org . oscm . app . iaas . data . DiskImage validDiskImage = vServerProcessor .... | org . junit . Assert . assertNotNull ( validDiskImage ) |
getCurrentPermutationTest ( ) { int size = 4 ; org . openscience . cdk . graph . Permutor permutor = new org . openscience . cdk . graph . Permutor ( size ) ; boolean allOk = true ; while ( permutor . hasNext ( ) ) { permutor . getNextPermutation ( ) ; int [ ] current = permutor . getCurrentPermutation ( ) ; if ( array... | org . junit . Assert . assertTrue ( allOk ) |
testWithInterfaces4 ( ) { java . lang . reflect . Type selectedType = new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Interface4 < java . util . Set < java . lang . Integer > > > ( ) { } . getType ( ) ; java . lang . reflect . Type type = org . jboss . w... | org . junit . Assert . assertEquals ( new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Charlie < java . lang . Integer > > ( ) { } . getType ( ) , type ) |
Attribute07Test ( ) { java . lang . String code = "class<sp>A{isA<sp>T1;isA<sp>T2;}trait<sp>T1{name;}trait<sp>T2{name;}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( ... | org . junit . Assert . assertTrue ( result ) |
testCascadeDeleteOrganization ( ) { final java . math . BigDecimal value = new java . math . BigDecimal ( "5.01" ) ; final org . oscm . domobjects . Organization organization = runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . Organization > ( ) { public org . oscm . domobjects . Organization ... | org . junit . Assert . assertEquals ( null , discount ) |
testGetFragmentSortColumnCreatedOn ( ) { org . sagebionetworks . repo . model . entity . SortBy sortBy = org . sagebionetworks . repo . model . entity . SortBy . CREATED_ON ; java . lang . String result = org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . getFragmentSortColumn ( sortBy ) ; "<AssertPlaceHo... | org . junit . Assert . assertEquals ( NodeDAOImpl . N_CREATED_ON , result ) |
deserializeTest ( ) { createBufer ( buffer ) ; action = learnCodec . deserialize ( buffer ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflowjava . nx . action . rev140421 . action . container . action . choice . ActionLearn result = ( ( org . opendaylight . yang . gen . v1 . urn . opendaylight . o... | org . junit . Assert . assertEquals ( expResult , result ) |
testGetUsageDetailsForRole ( ) { details . putUsageDetails ( org . oscm . billingservice . business . calculation . revenue . model . L1 , new org . oscm . billingservice . business . calculation . revenue . model . UsageDetails ( ) ) ; org . oscm . billingservice . business . calculation . revenue . model . UsageDetai... | org . junit . Assert . assertNotNull ( usageDetails ) |
testNoExpiryByDefault ( ) { org . springframework . data . couchbase . core . mapping . CouchbasePersistentEntity < org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntityTests . DefaultExpiry > entity = new org . springframework . data . couchbase . core . mapping . BasicCouchbasePer... | org . junit . Assert . assertEquals ( 0 , entity . getExpiry ( ) ) |
defaultPatternNotToMatchMavenRelease ( ) { hudson . model . FreeStyleBuild build = mock ( hudson . model . FreeStyleBuild . class ) ; hudson . scm . ChangeLogSet changeLogSet = mock ( hudson . scm . ChangeLogSet . class ) ; when ( build . getChangeSet ( ) ) . thenReturn ( changeLogSet ) ; java . util . Set < ? extends ... | org . junit . Assert . assertEquals ( 0 , ids . size ( ) ) |
shouldGetTimeOutWhenStatusRunningAndTimerMetricValueIsLifeTimeAndStatusDescriptorIsNew1 ( ) { when ( descriptor . getRunStats ( ) ) . thenReturn ( metricList ) ; when ( descriptor . getStatus ( ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . models . NEW ) ; when ( stat . getName ( ) ) . thenRetu... | org . junit . Assert . assertThat ( runner . getTimeout ( ) , org . hamcrest . core . Is . is ( org . eclipse . che . ide . ext . runner . client . models . ALWAYS_ON ) ) |
testListQuery ( ) { com . spikeify . SpikeifyService . register ( com . spikeify . entity . EntityOne . class ) ; com . spikeify . Map < java . lang . Long , com . spikeify . entity . EntityOne > entities = com . spikeify . TestUtils . randomEntityOne ( 1000 , setName ) ; int count = 0 ; for ( com . spikeify . entity .... | org . junit . Assert . assertEquals ( 50 , list . size ( ) ) |
orderBestOrders ( ) { vn . com . vndirect . exchangesimulator . matching . BestOrderQueue q = new vn . com . vndirect . exchangesimulator . matching . BestOrderQueue ( vn . com . vndirect . exchangesimulator . model . NewOrderSingle . BUY , new vn . com . vndirect . exchangesimulator . matching . PriceRange ( 16000 , 1... | org . junit . Assert . assertEquals ( target , q . getBestOrderList ( ) . get ( 2 ) ) |
shouldInstrumentSwitchWithIfParent ( ) { java . lang . String source = "if<sp>(<sp>i<sp>><sp>0<sp>)\n" + ( ( "<sp>case<sp>1:\n" 0 + "<sp>case<sp>1:<sp>break;\n" ) + "}\n" ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'t... | org . junit . Assert . assertEquals ( expectedSource , instrumentedSource ) |
testTableSink ( ) { io . cdap . cdap . api . data . schema . Schema outputSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "purchase" , Schema . Field . of ( "rowkey" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "user" , io . cdap . cda... | org . junit . Assert . assertEquals ( outputSchema , mockPipelineConfigurer . getOutputSchema ( ) ) |
testUpdateTag ( ) { org . finra . herd . model . api . xml . TagKey parentTagKey = new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) ; org . finra . herd . model . api . xml . TagUpdateRequest request = new org . finra . herd . model . api . xml . TagUpdateRequest ( TAG_DISPLAY_NAME_3 , TAG_SE... | org . junit . Assert . assertEquals ( tag , updatedTag ) |
testTableExists ( ) { final com . amazonaws . services . dynamodbv2 . model . DescribeTableResult result = new com . amazonaws . services . dynamodbv2 . model . DescribeTableResult ( ) ; dynamoDB . describeTable ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ; ... | org . junit . Assert . assertTrue ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManager . doesTableExist ( dynamoDB , com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ) |
testGetMolecularFormula_int ( ) { org . openscience . cdk . interfaces . IAdductFormula mfS = getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAdductFormula . class ) ; mfS . addMolecularFormula ( getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ) ;... | org . junit . Assert . assertNotNull ( mfS . getMolecularFormula ( 2 ) ) |
testGetRelaties ( ) { nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst pl = nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstTest . createPL ( ) ; java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpRelatie > lijst = pl . getRelaties ( BrpSoortRelatieCode . FA... | org . junit . Assert . assertEquals ( 1 , lijst . size ( ) ) |
rdfMappingThreeColTester ( ) { org . aksw . limes . core . io . mapping . AMapping testMap = org . aksw . limes . core . io . mapping . MappingFactory . createDefaultMapping ( ) ; testMap . add ( "http://linkedgeodata.org/triplify/node2806760713" , "http://linkedgeodata.org/triplify/node2478449224" , 1.0 ) ; testMap . ... | org . junit . Assert . assertTrue ( readMap . equals ( testMap ) ) |
testXMLSerialisation ( ) { org . apache . ivy . osgi . repo . FSManifestIterable it = new org . apache . ivy . osgi . repo . FSManifestIterable ( bundlerepo ) ; org . apache . ivy . osgi . repo . BundleRepoDescriptor repo = new org . apache . ivy . osgi . repo . BundleRepoDescriptor ( bundlerepo . toURI ( ) , org . apa... | org . junit . Assert . assertEquals ( repo , repo2 ) |
testEmptyEchoBytes ( ) { java . nio . ByteBuffer data = java . nio . ByteBuffer . allocate ( 0 ) ; java . nio . ByteBuffer echoed = org . apache . avro . TestProtocolSpecific . proxy . echoBytes ( data ) ; data . flip ( ) ; "<AssertPlaceHolder>" ; } echoBytes ( java . nio . ByteBuffer ) { return data ; } | org . junit . Assert . assertEquals ( data , echoed ) |
isAmong_null_returnsFalse ( ) { java . lang . String [ ] haystack = new java . lang . String [ ] { "something" , "some<sp>other<sp>thing" } ; boolean found = eu . chargetime . ocpp . utilities . ModelUtil . isAmong ( null , haystack ) ; "<AssertPlaceHolder>" ; } isAmong ( java . lang . String , java . lang . String [ ]... | org . junit . Assert . assertThat ( found , org . hamcrest . CoreMatchers . is ( false ) ) |
createHashSet_noArgs ( ) { java . util . Set < java . lang . Integer > set = createHashSet ( ) ; "<AssertPlaceHolder>" ; } createHashSet ( ) { return new java . util . HashSet < T > ( ) ; } | org . junit . Assert . assertTrue ( ( set instanceof java . util . HashSet < ? > ) ) |
decapitalizeForEmptyString ( ) { "<AssertPlaceHolder>" ; } decapitalize ( java . lang . String ) { if ( org . slim3 . util . StringUtil . isEmpty ( text ) ) { return text ; } char [ ] chars = text . toCharArray ( ) ; if ( ( ( ( chars . length ) >= 2 ) && ( java . lang . Character . isUpperCase ( chars [ 0 ] ) ) ) && ( ... | org . junit . Assert . assertThat ( org . slim3 . util . StringUtil . decapitalize ( "" ) , org . hamcrest . CoreMatchers . is ( "" ) ) |
testContainerCompleteMsgNotLostAfterAMFailedAndRMRestart ( ) { rm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockRM ( conf ) ; rm1 . start ( ) ; org . apache . hadoop . yarn . server . resourcemanager . MockNM nm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockNM ( "127.0.0.1:... | org . junit . Assert . assertEquals ( 1 , loadedAttempt1 . getJustFinishedContainers ( ) . size ( ) ) |
carIsValid ( ) { com . example . Car car = new com . example . Car ( "Morris" , "DD-AB-123" , 2 ) ; java . util . Set < javax . validation . ConstraintViolation < com . example . Car > > constraintViolations = com . example . CarTest . validator . validate ( car ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . s... | org . junit . Assert . assertEquals ( 0 , constraintViolations . size ( ) ) |
shouldReturnFalseWhenComparingContainerAndContainer ( ) { org . eclipse . egit . core . synchronize . GitResourceVariantComparator grvc = new org . eclipse . egit . core . synchronize . GitResourceVariantComparator ( null ) ; org . eclipse . core . runtime . IPath localPath = mock ( org . eclipse . core . runtime . IPa... | org . junit . Assert . assertFalse ( grvc . compare ( local , remote ) ) |
testOnBucketEmptyAllowed ( ) { org . bukkit . block . Block block = mock ( org . bukkit . block . Block . class ) ; when ( block . getLocation ( ) ) . thenReturn ( location ) ; when ( block . getRelative ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( block ) ; org . bukkit . inventory . ItemStack item = mock ( ... | org . junit . Assert . assertFalse ( e . isCancelled ( ) ) |
whenPopValueWeGetItAndRemoveValueFromList ( ) { ru . szhernovoy . linkedlist . QueueLinkedList < java . lang . Integer > dlink = new ru . szhernovoy . linkedlist . QueueLinkedList ( ) ; dlink . push ( 4 ) ; dlink . push ( 12 ) ; dlink . push ( ( - 7 ) ) ; System . out . println ( dlink . getCapacility ( ) ) ; int contr... | org . junit . Assert . assertThat ( control , org . hamcrest . core . Is . is ( ( - 7 ) ) ) |
testGetSetCurrentPlayer ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatus bs = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatus ( 1 ) ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gam... | org . junit . Assert . assertEquals ( p , bs . getCurrentPlayer ( ) ) |
testCharacterNoMatchReservedCharacter ( ) { char reserved = 'f' ; org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher underTest = new org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher ( reserved ) ; char toTest = 'b' ; "<AssertP... | org . junit . Assert . assertFalse ( underTest . matches ( toTest ) ) |
runBenchFlowTestValid ( ) { java . io . InputStream testBundle = cloud . benchflow . testmanager . helpers . constants . TestBundle . getLoadTestBundleInputStream ( temporaryFolder ) ; java . lang . String expectedTestID = ( ( ( ( cloud . benchflow . testmanager . helpers . constants . TestConstants . TEST_USER_NAME ) ... | org . junit . Assert . assertTrue ( response . getTestID ( ) . contains ( TestConstants . LOAD_TEST_NAME ) ) |
testBaseUriResolutionWithoutSlash ( ) { java . lang . String base = "https://test.com" ; java . lang . String relative = "/api/push/" ; java . lang . String expected = "https://test.com/api/push/" ; java . net . URI uriBase = new java . net . URI ( base ) ; java . net . URI uriNuResolved = com . urbanairship . api . cl... | org . junit . Assert . assertEquals ( expected , uriNuResolved . toString ( ) ) |
checkNBTOutput ( ) { com . voxelwind . server . game . item . VoxelwindItemStack itemStack = new com . voxelwind . server . game . item . VoxelwindItemStack ( com . voxelwind . api . game . item . ItemTypes . COAL , 1 , com . voxelwind . api . game . item . data . Coal . CHARCOAL ) ; short data = com . voxelwind . serv... | org . junit . Assert . assertEquals ( data , 1 ) |
testIn2 ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ( ) ) .... | org . junit . Assert . assertEquals ( 0 , list . size ( ) ) |
testAddEntryFromString ( ) { java . io . File tempZipFile = new java . io . File ( _tempZipFilePath ) ; com . liferay . portal . kernel . zip . ZipWriter zipWriter = new com . liferay . portal . zip . ZipWriterImpl ( tempZipFile ) ; zipWriter . addEntry ( "string.txt" , "This<sp>is<sp>a<sp>string." ) ; java . io . File... | org . junit . Assert . assertEquals ( "This<sp>is<sp>a<sp>string." , zipReader . getEntryAsString ( "string.txt" ) ) |
testMemoryOffsetAfterClearIsSameAsNewTypedProperties ( ) { org . apache . activemq . artemis . utils . collections . TypedProperties props = new org . apache . activemq . artemis . utils . collections . TypedProperties ( ) ; props . putSimpleStringProperty ( org . apache . activemq . artemis . api . core . SimpleString... | org . junit . Assert . assertEquals ( new org . apache . activemq . artemis . utils . collections . TypedProperties ( ) . getMemoryOffset ( ) , props . getMemoryOffset ( ) ) |
testST_RemoveHoles ( ) { com . vividsolutions . jts . geom . Polygon polygon = ( ( com . vividsolutions . jts . geom . Polygon ) ( wKTReader . read ( ( "POLYGON<sp>((<sp>112<sp>68,<sp>112<sp>307,<sp>318<sp>307,<sp>318<sp>68,<sp>112<sp>68<sp>),<sp>" + "(<sp>184<sp>169,<sp>247<sp>197,<sp>242<sp>247,<sp>167<sp>258,<sp>184... | org . junit . Assert . assertTrue ( result . equals ( expected ) ) |
testDeliveryResultTypeSets ( ) { java . lang . String code = "" ; try { code = _setupTestDeliveryResultType ( true ) ; _checkDeliveryResultTypeIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkDeliveryResultTypeIntoDb ( java . lang . String ) ... | org . junit . Assert . assertEquals ( true , false ) |
testNDArrayToWritablesScalars ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . arange ( 5 ) ; java . util . List < org . datavec . api . writable . Writable > expected = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) expected . add ( new org . datavec... | org . junit . Assert . assertEquals ( expected , actual ) |
testIsSelected ( ) { classUnderTest . setSelected ( true ) ; "<AssertPlaceHolder>" ; } isSelected ( ) { return _selected ; } | org . junit . Assert . assertEquals ( true , classUnderTest . isSelected ( ) ) |
test ( ) { io . ebean . EbeanServer server = io . ebean . Ebean . getServer ( "mysql" ) ; org . tests . model . basic . EBasic basic = new org . tests . model . basic . EBasic ( ) ; basic . setName ( "calling" ) ; server . save ( basic ) ; io . ebean . CallableSql cs = server . createCallableSql ( "{call<sp>my_stored_p... | org . junit . Assert . assertEquals ( "modBySP" , basic1 . getName ( ) ) |
testPfam ( ) { final java . lang . String name = SignatureLibrary . PFAM . getName ( ) ; final uk . ac . ebi . interpro . scan . web . model . MatchDataSource m = uk . ac . ebi . interpro . scan . web . model . MatchDataSource . parseName ( name ) ; "<AssertPlaceHolder>" ; } parseName ( java . lang . String ) { if ( na... | org . junit . Assert . assertEquals ( MatchDataSource . PFAM , m ) |
testAutocastLong ( ) { org . openl . meta . BigDecimalValue expectedResult = new org . openl . meta . BigDecimalValue ( "2000000000" ) ; java . lang . Long value = java . lang . Long . valueOf ( "2000000000" ) ; org . openl . meta . BigDecimalValue result = org . openl . meta . BigDecimalValue . autocast ( value . long... | org . junit . Assert . assertEquals ( expectedResult , result ) |
searchSubscriptions ( ) { org . oscm . dataservice . bean . DataServiceBean bean = spy ( new org . oscm . dataservice . bean . DataServiceBean ( ) ) ; org . oscm . subscriptionservice . bean . SubscriptionSearchServiceBean ssb = spy ( new org . oscm . subscriptionservice . bean . SubscriptionSearchServiceBean ( ) ) ; d... | org . junit . Assert . assertTrue ( result . contains ( new java . lang . Long ( 1L ) ) ) |
testAssociationExists ( ) { com . sap . core . odata . api . edm . EdmAssociationSet associationSet = com . sap . core . odata . core . edm . provider . EdmAssociationSetImplProvTest . edmAssociationSet ; "<AssertPlaceHolder>" ; } getAssociation ( ) { return association ; } | org . junit . Assert . assertNotNull ( associationSet . getAssociation ( ) ) |
getUnsignedInt ( ) { org . threadly . litesockets . buffers . MergedByteBuffers mbb = new org . threadly . litesockets . buffers . ReuseableMergedByteBuffers ( ) ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . allocate ( 4 ) ; bb . putInt ( ( ( Integer . MAX_VALUE ) + 500 ) ) ; bb . flip ( ) ; mbb . add ( bb )... | org . junit . Assert . assertEquals ( value , mbb . getUnsignedInt ( ) ) |
getOrCreateIdPutsReverseMappingFirst ( ) { uid = new net . opentsdb . uid . UniqueId ( client , net . opentsdb . uid . TestUniqueId . table , net . opentsdb . uid . TestUniqueId . kind , 3 ) ; when ( client . get ( net . opentsdb . uid . TestUniqueId . anyGet ( ) ) ) . thenReturn ( com . stumbleupon . async . Deferred ... | org . junit . Assert . assertArrayEquals ( id , uid . getOrCreateId ( "foo" ) ) |
testStackOverflowOnRevisitationOfSameDirectory ( ) { com . drew . metadata . Metadata metadata = com . drew . metadata . exif . ExifReaderTest . processBytes ( "Tests/Data/recursiveDirectories.jpg.app1" ) ; "<AssertPlaceHolder>" ; } getDirectoryCount ( ) { return _directories . size ( ) ; } | org . junit . Assert . assertEquals ( 5 , metadata . getDirectoryCount ( ) ) |
testSimpleNoDecimals ( ) { org . apache . commons . math3 . geometry . euclidean . oned . Vector1D c = new org . apache . commons . math3 . geometry . euclidean . oned . Vector1D ( 1 ) ; java . lang . String expected = "{1}" ; java . lang . String actual = vector1DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } forma... | org . junit . Assert . assertEquals ( expected , actual ) |
testMissingParameter ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . dico . Create ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplic... | org . junit . Assert . assertNotNull ( theResult ) |
shouldAddObjectArrayInNestedObjectColumn ( ) { org . springframework . data . crate . core . mapping . schema . Column objectColOne = createColumn ( "strings" , java . util . Collection . class , java . lang . String . class , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectColTw... | org . junit . Assert . assertThat ( statement . createStatement ( ) , org . hamcrest . Matchers . is ( sql . toString ( ) ) ) |
tagsInMetricName ( ) { org . jmxtrans . agent . influxdb . InfluxMetric converted = org . jmxtrans . agent . influxdb . InfluxMetricConverter . convertToInfluxMetric ( "foo,tag1=tagValue1" , 1 , org . jmxtrans . agent . influxdb . InfluxMetricConverterTest . EMPTY_TAG_LIST , 2L ) ; org . jmxtrans . agent . influxdb . I... | org . junit . Assert . assertThat ( converted , equalTo ( expected ) ) |
testOfConfigurationParametersIncludingSearchTimeout ( ) { org . apache . jackrabbit . oak . security . authentication . ldap . impl . LdapProviderConfig config = org . apache . jackrabbit . oak . security . authentication . ldap . impl . LdapProviderConfig . of ( org . apache . jackrabbit . oak . spi . security . Confi... | org . junit . Assert . assertEquals ( 25 , config . getSearchTimeout ( ) ) |
testPrefixNotImply ( ) { org . uberfire . security . authz . Permission p1 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.r" , true ) ; org . uberfire . security . authz . Permission p2 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.r2" , true ... | org . junit . Assert . assertFalse ( p1 . implies ( p2 ) ) |
testCompareWithDifferentType ( ) { com . alicloud . openservices . tablestore . model . PutRowRequest pr = new com . alicloud . openservices . tablestore . model . PutRowRequest ( ) ; java . util . ArrayList < com . alicloud . openservices . tablestore . model . PrimaryKeyColumn > pks = new java . util . ArrayList < co... | org . junit . Assert . assertEquals ( resultRow , null ) |
fetchStopsAfterFirstSuccessAfterFailure ( ) { org . easymock . EasyMock . expect ( downloader . fetch ( fakeEventBus , fakeUri , fakePath ) ) . andThrow ( new java . io . IOException ( ) ) . andReturn ( true ) ; org . easymock . EasyMock . replay ( downloader ) ; "<AssertPlaceHolder>" ; } from ( com . facebook . buck .... | org . junit . Assert . assertTrue ( com . facebook . buck . file . downloader . impl . RetryingDownloader . from ( downloader , 3 ) . fetch ( fakeEventBus , fakeUri , fakePath ) ) |
testReadInputStreamToString ( ) { java . lang . String inputString = "The<sp>quick<sp>brown<sp>fox" ; java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( inputString . getBytes ( StandardCharsets . UTF_8 ) ) ; com . washingtonpost . wordpress . rest . api . JAXRSWordPressClient client = new com... | org . junit . Assert . assertEquals ( inputString , outputString ) |
testFloorDoubleInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>WHERE<sp>FLOOR(doub,<sp>2)<sp>=<sp>1.26" ) ) ; "<AssertPlaceHolder>" ; } ... | org . junit . Assert . assertTrue ( rs . next ( ) ) |
query_by_special_char2 ( ) { dao . update ( dao . fetch ( org . nutz . dao . test . meta . Pet . class ) . setName ( "a$b" ) ) ; java . util . List < org . nutz . dao . test . meta . Pet > pets = dao . query ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "name" , "=" , "a$b" ) , null ... | org . junit . Assert . assertEquals ( 1 , pets . size ( ) ) |
testCredentialProvider ( ) { org . nuxeo . elasticsearch . config . ElasticSearchClientConfig config = new org . nuxeo . elasticsearch . config . ElasticSearchClientConfig ( ) ; config . options . put ( "addressList" , "localhost:9200" ) ; config . options . put ( ESRestClientFactory . AUTH_USER_OPT , "bob" ) ; config ... | org . junit . Assert . assertNotNull ( esClient ) |
testCanAcceptVoterWhenEmpty ( ) { com . tc . l2 . state . ServerVoterManagerImpl manager = new com . tc . l2 . state . ServerVoterManagerImpl ( 1 , timeSource , false ) ; "<AssertPlaceHolder>" ; } canAcceptVoter ( ) { return ( ! ( votingInProgress ) ) && ( ( getRegisteredVoters ( ) ) < ( voterLimit ) ) ; } | org . junit . Assert . assertThat ( manager . canAcceptVoter ( ) , org . hamcrest . Matchers . is ( true ) ) |
testBRY9905FoutSitiuatieRefereertNaarEenReferentie ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht famBericht = ( ( nl . bzk . brp . model . bericht . ke... | org . junit . Assert . assertEquals ( 1 , berichtenDieDeRegelOvertreden . size ( ) ) |
priorityIs0 ( ) { final int priority = this . mocker . getComponentUnderTest ( ) . getPriority ( ) ; "<AssertPlaceHolder>" ; } getPriority ( ) { org . junit . Assert . assertEquals ( 500 , this . component . getPriority ( ) ) ; } | org . junit . Assert . assertEquals ( 0 , priority ) |
testGetFlags_Array ( ) { org . openscience . cdk . interfaces . IChemObject chemObject = newChemObject ( ) ; chemObject . setFlag ( CDKConstants . ISINRING , true ) ; boolean [ ] flags = chemObject . getFlags ( ) ; "<AssertPlaceHolder>" ; } getFlags ( ) { boolean [ ] flagArray = new boolean [ ( CDKConstants . MAX_FLAG_... | org . junit . Assert . assertTrue ( flags [ 1 ] ) |
testSerialization ( ) { org . jfree . chart . urls . StandardXYURLGenerator g1 = new org . jfree . chart . urls . StandardXYURLGenerator ( "index.html?" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer )... | org . junit . Assert . assertEquals ( g1 , g2 ) |
testJSONConsoleTraceFileNameStdout ( ) { com . ibm . ws . logging . json . fat . ConsoleFormatTest . setUpClass ( com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 ) ; com . ibm . websphere . simplicity . RemoteFile consoleLogFile = com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 .... | org . junit . Assert . assertFalse ( hasNoJSON ) |
remove ( ) { joptsimple . internal . SimpleOptionNameMap < java . lang . Integer > map = new joptsimple . internal . SimpleOptionNameMap ( ) ; map . put ( joptsimple . internal . SimpleOptionNameMapTest . KEY , 1 ) ; map . remove ( joptsimple . internal . SimpleOptionNameMapTest . KEY ) ; "<AssertPlaceHolder>" ; } cont... | org . junit . Assert . assertFalse ( map . contains ( joptsimple . internal . SimpleOptionNameMapTest . KEY ) ) |
testNullParameters ( ) { nom . tam . fits . compression . algorithm . api . ICompressorControl compressor = nom . tam . fits . compression . provider . CompressorProvider . findCompressorControl ( null , "GZIP_1" , byte . class ) ; nom . tam . fits . compression . algorithm . api . ICompressOption option = compressor .... | org . junit . Assert . assertSame ( parameters , parameters . copy ( option ) ) |
formula ( ) { java . lang . String input = "<in-line-formula>c=a+b</in-line-formula>" ; java . lang . String expect = "<span<sp>id=\"FOR-0001\"<sp>class=\"formula\">c=a+b</span>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertEquals ( expect , actual ) |
testHasAttributeWithPresentAttribute ( ) { org . candlepin . dto . manifest . v1 . PoolDTO dto = new org . candlepin . dto . manifest . v1 . PoolDTO ( ) ; java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap ( ) ; attributes . put ( "attribute-key-2" , "attribute-valu... | org . junit . Assert . assertTrue ( dto . hasAttribute ( "attribute-key-2" ) ) |
constructFromUriAndBack ( ) { org . apache . shindig . common . uri . Uri uri = org . apache . shindig . common . uri . Uri . parse ( "http://apache.org/foo/bar?foo=bar&a=b&c=d&y=z&foo=zoo#foo" ) ; org . apache . shindig . common . uri . UriBuilder builder = new org . apache . shindig . common . uri . UriBuilder ( uri ... | org . junit . Assert . assertEquals ( uri , builder . toUri ( ) ) |
testSafelyParallize ( ) { java . util . concurrent . ExecutorService pool = java . util . concurrent . Executors . newFixedThreadPool ( 10 ) ; int [ ] batch = new int [ ] { 0 , 0 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 4 , 5 , 5 , 1 } ; edu . jhu . prim . util . random . Prng . seed ( java . lang . System . currentTimeMillis ( )... | org . junit . Assert . assertArrayEquals ( batch , res ) |
testCancel ( ) { final int count = 100000 ; final java . util . List < com . taobao . gecko . core . nio . impl . TimerRef > list = new java . util . ArrayList < com . taobao . gecko . core . nio . impl . TimerRef > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final com . taobao . gecko . core . nio . impl . TimerRef t... | org . junit . Assert . assertTrue ( iterateThread . end ) |
testFlushInMiddleOfElementUsingByteArrays ( ) { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; org . apache . beam . sdk . util . BufferedElementCountingOutputStream os = new org . apache . beam . sdk . util . BufferedElementCountingOutputStream ( bos ) ; os . markElementStart ( ) ;... | org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 1 , 2 , 0 } , bos . toByteArray ( ) ) |
testDataStoreFinderFindsIt ( ) { java . util . Iterator < org . geotools . data . DataStoreFactorySpi > allFactories = org . geotools . data . DataStoreFinder . getAllDataStores ( ) ; org . geotools . arcsde . data . ArcSDEJNDIDataStoreFactory sdeFac = null ; while ( allFactories . hasNext ( ) ) { org . geotools . data... | org . junit . Assert . assertNotNull ( sdeFac ) |
testCreationViaNewInsertionOrdered ( ) { java . lang . String columnNames = "Letter" ; final java . lang . Class < ? > [ ] columnTypes = new java . lang . Class [ ] { net . casper . data . model . tests . Character . class } ; net . casper . data . model . CDataCacheContainer container = net . casper . data . model . C... | org . junit . Assert . assertEquals ( java . lang . Character . valueOf ( ( ( char ) ( 65 + ( i ++ ) ) ) ) , cdrs . getChar ( "Letter" ) ) |
testPrepareCheckpointPreBarrier ( ) { final java . util . concurrent . atomic . AtomicInteger intRef = new java . util . concurrent . atomic . AtomicInteger ( ) ; final org . apache . flink . streaming . api . operators . OneInputStreamOperator < java . lang . String , java . lang . String > one = new org . apache . fl... | org . junit . Assert . assertEquals ( 3 , intRef . get ( ) ) |
readsContentOfEntityStreamAsMultivaluedMapWhenFormFieldMissedValue ( ) { testContent = "foo&bar=hello%20world" . getBytes ( "UTF-8" ) ; javax . ws . rs . core . MultivaluedMap < java . lang . String , java . lang . String > multivaluedMap = multivaluedMapEntityProvider . readFrom ( ( ( java . lang . Class ) ( javax . w... | org . junit . Assert . assertEquals ( decodedMap , multivaluedMap ) |
testCopyPaste ( ) { new org . openqa . selenium . interactions . Actions ( driver ) . sendKeys ( "hello<sp>world" ) . sendKeys ( ( ( org . openqa . selenium . Keys . CONTROL ) + "a" ) ) . sendKeys ( ( ( org . openqa . selenium . Keys . CONTROL ) + "c" ) ) . sendKeys ( fieldTwo , ( ( org . openqa . selenium . Keys . CON... | org . junit . Assert . assertEquals ( "hello<sp>world" , fieldTwo . getAttribute ( "value" ) ) |
addWiresConnector ( ) { final org . kie . workbench . common . stunner . shapes . client . view . AbstractConnectorView connector = new org . kie . workbench . common . stunner . shapes . client . view . PolylineConnectorView ( 0.0 , 0.0 ) ; final java . lang . String uuid = connector . uuid ( ) ; connector . setUUID (... | org . junit . Assert . assertNull ( registeredConnector ) |
conversionString ( ) { int value = org . openhab . binding . dmx . internal . Util . toDmxValue ( "100" ) ; "<AssertPlaceHolder>" ; } is ( org . eclipse . smarthome . core . thing . ThingTypeUID ) { return thingTypeUID . equals ( otherThingTypeUID ) ; } | org . junit . Assert . assertThat ( value , org . hamcrest . CoreMatchers . is ( 100 ) ) |
shouldHaveTypeMemberWithValueName ( ) { com . frightanic . smn . api . geojson . Crs crs = new com . frightanic . smn . api . geojson . Crs ( CrsType . CH1903 ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertThat ( crs . getType ( ) , org . hamcrest . core . Is . is ( "name" ) ) |
testDoGetRootChildren ( ) { java . lang . String filter = "filter" ; java . lang . Boolean showHidden = Boolean . TRUE ; java . lang . Boolean includeAcls = Boolean . TRUE ; java . util . List < org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto > mockList = mock ( java . util . Li... | org . junit . Assert . assertEquals ( mockList , testList ) |
testDecorateRunnable ( ) { io . netty . util . internal . ThreadExecutorMap . apply ( new java . lang . Runnable ( ) { @ io . netty . util . internal . Override public void run ( ) { "<AssertPlaceHolder>" ; } } , ImmediateEventExecutor . INSTANCE ) . run ( ) ; } currentExecutor ( ) { return io . netty . util . internal... | org . junit . Assert . assertSame ( ImmediateEventExecutor . INSTANCE , io . netty . util . internal . ThreadExecutorMap . currentExecutor ( ) ) |
shouldParseFastOnJdk7u6 ( ) { org . apache . ibatis . parsing . GenericTokenParser parser = new org . apache . ibatis . parsing . GenericTokenParser ( "initial" 0 , "}" , new org . apache . ibatis . parsing . GenericTokenParserTest . VariableTokenHandler ( new java . util . HashMap < java . lang . String , java . lang ... | org . junit . Assert . assertEquals ( expected . toString ( ) , parser . parse ( input . toString ( ) ) ) |
multiDimensionalIntArraysAreEqual ( ) { int [ ] [ ] int1 = new int [ ] [ ] { new int [ ] { 1 , 2 , 3 } , new int [ ] { 4 , 5 , 6 } } ; int [ ] [ ] int2 = new int [ ] [ ] { new int [ ] { 1 , 2 , 3 } , new int [ ] { 4 , 5 , 6 } } ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertArrayEquals ( int1 , int2 ) |
test58updateXAuditMapVXResourceNull ( ) { org . apache . ranger . view . VXAuditMap vXAuditMap = null ; org . apache . ranger . view . VXAuditMap retvXAuditMap = xUserRest . updateXAuditMap ( vXAuditMap ) ; "<AssertPlaceHolder>" ; } updateXAuditMap ( org . apache . ranger . rest . VXAuditMap ) { org . apache . ranger .... | org . junit . Assert . assertNull ( retvXAuditMap ) |
testGetAsyncContext ( ) { javax . servlet . AsyncContext asyncContext = mockit . Deencapsulation . getField ( org . apache . servicecomb . foundation . vertx . http . VertxServerRequestToHttpServletRequest . class , "EMPTY_ASYNC_CONTEXT" ) ; "<AssertPlaceHolder>" ; } getAsyncContext ( ) { return org . apache . servicec... | org . junit . Assert . assertSame ( asyncContext , request . getAsyncContext ( ) ) |
noColumnActions ( ) { final java . lang . String response = given ( ) . contentType ( org . talend . dataprep . transformation . service . JSON ) . body ( "" ) . when ( ) . post ( "/actions/column" ) . asString ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( ( ( org . apache . commons . lang3 . StringUtils . i... | org . junit . Assert . assertFalse ( response . isEmpty ( ) ) |
shouldInitializeDefaultAttemptsOnInitialize ( ) { propertyManager . initializeConnection ( "url" ) ; final int attempts = propertyManager . getReConnectionAttempts ( "url" ) ; "<AssertPlaceHolder>" ; } getReConnectionAttempts ( java . lang . String ) { return java . lang . Integer . valueOf ( getProperty ( url , org . ... | org . junit . Assert . assertEquals ( 0 , attempts ) |
testMatrixDeterminant ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . rand ( 3 , 3 ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . n... | org . junit . Assert . assertNull ( err ) |
testA ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "parser<sp>grammar<sp>P;\n" + "a<sp>:<sp>A;" ) ) ; java . lang . String expecting = "(rule<sp>a<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp>A<sp><end-of-alt>)<sp><end-of-block>)<sp><end-of-rule>)" ; java . lang . String found = g . getRul... | org . junit . Assert . assertEquals ( expecting , found ) |
testGetResourcePropertyValue ( ) { System . out . println ( "getResourcePropertyValue" ) ; OpenRate . utils . PropertyUtils instance = OpenRate . utils . PropertyUtils . getPropertyUtils ( ) ; java . lang . String resource = "ECI" ; java . lang . String propertyName = "Port" ; java . lang . String expResult = "8086" ; ... | org . junit . Assert . assertEquals ( expResult , result ) |
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = ne... | org . junit . Assert . assertTrue ( repositoryEntries . isEmpty ( ) ) |
testIDInvalid ( ) { org . kie . workbench . common . stunner . bpmn . definition . BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram ( ) ; BPMNDiagramImpl . getDiagramSet ( ) . setId ( new org . kie . workbench . common . stunner . bpmn . definition . property . diagram . Id ( org . kie . workbench . common . st... | org . junit . Assert . assertEquals ( 1 , violations . size ( ) ) |
testGeneratingBaseConusmerScenario5 ( ) { haveProperty = false ; haveScpp = false ; java . io . File consumerProps = createPropertyFile ( destDir . getAbsolutePath ( ) , CONSUMER_PROPERTIES ) ; fillProperties ( consumerProper , consumerProps ) ; java . lang . String [ ] testArgs1 = new java . lang . String [ ] { "-serv... | org . junit . Assert . assertTrue ( baseConsumerClass . exists ( ) ) |
testDoubleUseOfCode ( ) { java . lang . String code = authClient . authorizeClient ( clientEntity , "test1<sp>test2" ) . getCode ( ) ; "<AssertPlaceHolder>" ; restClient . setFollowRedirects ( false ) ; com . github . hburgmeier . jerseyoauth2 . testsuite . base . client . ResourceClient client = new com . github . hbu... | org . junit . Assert . assertNotNull ( code ) |
testDontPlaceTwoQueensOnOneSquare ( ) { board . addQueenAt ( new aima . core . util . datastructure . XYLocation ( 0 , 0 ) ) ; board . addQueenAt ( new aima . core . util . datastructure . XYLocation ( 0 , 0 ) ) ; "<AssertPlaceHolder>" ; } getNumberOfQueensOnBoard ( ) { int count = 0 ; for ( int i = 0 ; i < ( getSize (... | org . junit . Assert . assertEquals ( 1 , board . getNumberOfQueensOnBoard ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.