input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
shouldHandleManyGroups ( ) { int size = 256 ; for ( int i = 0 ; i < size ; i ++ ) { groups . getOrCreate ( ( "" + i ) ) ; } org . neo4j . unsafe . impl . batchimport . cache . idmapping . IdMapper mapper = mapper ( new org . neo4j . unsafe . impl . batchimport . cache . idmapping . string . LongEncoder ( ) , Radix . LO... | org . junit . Assert . assertEquals ( i , mapper . get ( i , groups . get ( ( "" + i ) ) ) ) |
createBareRepository_theResultRepositoryDirectoryShouldEqualToTheInputDirectory ( ) { repo = com . beijunyi . parallelgit . utils . RepositoryUtils . createRepository ( repoDir , true ) ; "<AssertPlaceHolder>" ; } getDirectory ( ) { return directory ; } | org . junit . Assert . assertEquals ( repoDir , repo . getDirectory ( ) ) |
testGetReportManifest ( ) { System . out . println ( "getReportManifest" ) ; com . intel . mtwilson . as . business . Hostname hostName = null ; com . intel . mtwilson . as . business . ReportsBO instance = new com . intel . mtwilson . as . business . ReportsBO ( ) ; com . intel . mountwilson . as . hostmanifestreport ... | org . junit . Assert . assertEquals ( expResult , result ) |
testAbortedTransactionPutAndGet ( ) { transactionContext . start ( ) ; org . apache . hadoop . hbase . client . Put put = new org . apache . hadoop . hbase . client . Put ( co . cask . tephra . hbase96 . TransactionAwareHTableTest . TestBytes . row ) ; put . add ( co . cask . tephra . hbase96 . TransactionAwareHTableTe... | org . junit . Assert . assertArrayEquals ( value , null ) |
testExplicitProvider ( ) { javax . net . ssl . KeyManagerFactory factory = javax . net . ssl . KeyManagerFactory . getInstance ( javax . net . ssl . KeyManagerFactory . getDefaultAlgorithm ( ) ) ; factoryBean . setProvider ( factory . getProvider ( ) . getName ( ) ) ; "<AssertPlaceHolder>" ; } createKeyManagerFactory (... | org . junit . Assert . assertNotNull ( factoryBean . createKeyManagerFactory ( ) ) |
testMultiCoverage ( ) { java . io . File testDir = tempFolder . newFolder ( "multi-coverage" ) ; java . net . URL testUrl = org . geotools . util . URLs . fileToUrl ( testDir ) ; org . apache . commons . io . FileUtils . copyDirectory ( org . geotools . test . TestData . file ( this , "multi-coverage" ) , testDir ) ; o... | org . junit . Assert . assertNotNull ( reader ) |
contains_should_return_true_when_doc_exists ( ) { doReturn ( Boolean . TRUE ) . when ( db ) . contains ( "doc_id" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return db . contains ( docId ) ; } | org . junit . Assert . assertTrue ( repo . contains ( "doc_id" ) ) |
testMemCopy_fullblock ( ) { a = create ( 2 , 5 , 0 , null ) ; int [ ] data = new int [ ] { 1 , 2 , 3 , 4 , 5 } ; int [ ] out = new int [ 5 ] ; int p1 = a . malloc ( ) ; int p2 = a . malloc ( ) ; a . setInts ( p1 , 0 , data , 0 , a . blockSize ( ) ) ; a . memCopy ( p1 , 0 , p2 , 0 , a . blockSize ( ) ) ; a . getInts ( p... | org . junit . Assert . assertArrayEquals ( data , out ) |
testInnerSingleRelativeInheritance ( ) { java . lang . String MANIFEST_LOCATION = "testData/manifestTest/inheritance/04" ; java . lang . String manifestName = "prod-manifest.yml" ; java . net . URL entry = org . eclipse . orion . server . tests . ServerTestsActivator . getContext ( ) . getBundle ( ) . getEntry ( MANIFE... | org . junit . Assert . assertEquals ( 2 , applications . getChildren ( ) . size ( ) ) |
test ( ) { com . arjuna . orbportability . ORB myORB = null ; com . arjuna . orbportability . RootOA myOA = null ; myORB = com . arjuna . orbportability . ORB . getInstance ( "test" ) ; myOA = com . arjuna . orbportability . OA . getRootOA ( myORB ) ; myORB . initORB ( new java . lang . String [ ] { } , null ) ; myOA .... | org . junit . Assert . assertTrue ( DistributedHammerWorker1 . hammerObject_1 . get ( value , topLevelControl ) ) |
testObtainArtifactResolverService ( ) { io . fabric8 . maven . core . service . Fabric8ServiceHub hub = new io . fabric8 . maven . core . service . Fabric8ServiceHub . Builder ( ) . clusterAccess ( clusterAccess ) . log ( logger ) . platformMode ( RuntimeMode . kubernetes ) . mavenProject ( mavenProject ) . repositoryS... | org . junit . Assert . assertNotNull ( hub . getArtifactResolverService ( ) ) |
testName ( ) { org . kefirsf . bb . conf . Code code = new org . kefirsf . bb . conf . Code ( ) ; code . setName ( org . kefirsf . bb . conf . CodeTest . CODE_NAME ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( org . kefirsf . bb . conf . CodeTest . CODE_NAME , code . getName ( ) ) |
testNullParamListItem ( ) { final java . lang . Object result = simpleKeyIndexDefinition . createValue ( java . util . Arrays . asList ( "2" , null ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNull ( result ) |
exactUrlOnly ( ) { io . kubernetes . client . ApiClient client = new io . kubernetes . client . ApiClient ( ) ; client . setBasePath ( ( "http://localhost:" + ( io . kubernetes . client . examples . ExampleTest . PORT ) ) ) ; io . kubernetes . client . Configuration . setDefaultApiClient ( client ) ; io . kubernetes . ... | org . junit . Assert . assertEquals ( ns1 , ns2 ) |
testPackFloatDoubleEquivalent ( ) { for ( int i = 0 ; i <= 65536 ; i += com . jogamp . opengl . test . junit . jogl . math . TestBinary16NOUI . stepping ) { final float f_in = i ; final double d_in = i ; final char pf = com . jogamp . opengl . math . Binary16 . packFloat ( f_in ) ; final char pd = com . jogamp . opengl... | org . junit . Assert . assertEquals ( pf , pd ) |
testAdaptNull ( ) { "<AssertPlaceHolder>" ; } adapt ( org . apache . commons . functor . BinaryPredicate ) { return null == predicate ? null : new org . apache . commons . functor . adapter . BinaryPredicatePredicate < A > ( predicate ) ; } | org . junit . Assert . assertNull ( org . apache . commons . functor . adapter . BinaryPredicatePredicate . adapt ( null ) ) |
testValideerCorrectieInhoud ( ) { final nl . bzk . brp . bijhouding . bericht . model . CorrectieVervalGeboorteGerelateerde actie = maakBasisActie ( new nl . bzk . brp . bijhouding . bericht . model . ElementBuilder . PersoonParameters ( ) ) ; "<AssertPlaceHolder>" ; } valideerCorrectieInhoud ( ) { return VALIDATIE_OK ... | org . junit . Assert . assertEquals ( 0 , actie . valideerCorrectieInhoud ( ) . size ( ) ) |
applySerialSuffixWithPadding_SimpleSuffixProperty ( ) { final java . util . Properties props = new java . util . Properties ( ) ; final java . lang . String s = "foo" ; props . setProperty ( VersioningState . INCREMENT_SERIAL_SUFFIX_SYSPROP . getCurrent ( ) , s ) ; props . setProperty ( VersioningState . INCREMENT_SERI... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . equalTo ( calcdVersion ) ) |
canResolveAllImports ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
shouldExportWildcardQueryWithAllOptions ( ) { com . couchbase . client . java . search . queries . WildcardQuery fts = com . couchbase . client . java . search . SearchQuery . wildcard ( "some*term?" ) . boost ( 1.5 ) . field ( "field" ) ; com . couchbase . client . java . search . SearchQuery query = new com . couchba... | org . junit . Assert . assertEquals ( expected , query . export ( ) ) |
testAtomicBoolean ( ) { java . util . concurrent . atomic . AtomicBoolean a = new java . util . concurrent . atomic . AtomicBoolean ( ) ; com . github . davidmoten . rx . Actions . setAtomic ( a ) . call ( true ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( present ) return value ; else throw new com . github . davidmote... | org . junit . Assert . assertTrue ( a . get ( ) ) |
checkMeanVarianceEstimateCNNCompareModes ( ) { org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . deeplearning4j . nn . conf . MultiLayerConfiguration conf = new org . deeplearning4j . nn . conf . NeuralNetConfiguration . Builder ( ) . optimizationAlgo ( OptimizationAlgorithm . STOCHASTIC_... | org . junit . Assert . assertEquals ( globalVar , globalVar2 ) |
unwrapp ( ) { "<AssertPlaceHolder>" ; org . mariadb . jdbc . MariaDbConnection cc = sharedConnection . unwrap ( org . mariadb . jdbc . MariaDbConnection . class ) ; } isWrapperFor ( java . lang . Class ) { return interfaceOrWrapper . isInstance ( this ) ; } | org . junit . Assert . assertTrue ( sharedConnection . isWrapperFor ( org . mariadb . jdbc . MariaDbConnection . class ) ) |
testSerialization ( ) { org . jfree . chart . plot . PolarPlot p1 = new org . jfree . chart . plot . PolarPlot ( ) ; p1 . setAngleGridlinePaint ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . red , 3.0F , 4.0F , java . awt . Color . blue ) ) ; p1 . setAngleLabelPaint ( new java . awt . GradientPai... | org . junit . Assert . assertEquals ( p1 , p2 ) |
operationProjectAllWithAdminPermission ( ) { for ( org . apache . kylin . metadata . project . ProjectInstance project : org . apache . ranger . authorization . kylin . authorizer . RangerKylinAuthorizerTest . uuid2Projects . values ( ) ) { boolean result = aclEvaluate . hasProjectOperationPermission ( project ) ; "<As... | org . junit . Assert . assertTrue ( result ) |
testGetFacetsResponseIncludingTagWithNoAssociatedBdefsNewTagType ( ) { org . finra . herd . model . dto . ElasticsearchResponseDto elasticsearchResponseDto = new org . finra . herd . model . dto . ElasticsearchResponseDto ( ) ; java . util . List < org . finra . herd . model . dto . TagTypeIndexSearchResponseDto > nest... | org . junit . Assert . assertEquals ( expectedFacets , facets ) |
testBug1014 ( ) { java . util . List < com . graphhopper . routing . util . TestAlgoCollector . OneRun > list = new java . util . ArrayList ( ) ; com . graphhopper . routing . util . TestAlgoCollector . OneRun run = new com . graphhopper . routing . util . TestAlgoCollector . OneRun ( ) ; run . add ( 50.015861 , 11.510... | org . junit . Assert . assertEquals ( testCollector . toString ( ) , 0 , testCollector . errors . size ( ) ) |
add_subwordLast ( ) { dawgBuilder . add ( "JIM" ) ; org . junit . Assume . assumeThat ( dawgBuilder . wordCount ( ) , org . hamcrest . Matchers . is ( 1 ) ) ; dawgBuilder . add ( "JIMMY" ) ; "<AssertPlaceHolder>" ; } wordCount ( ) { return wordCount ; } | org . junit . Assert . assertThat ( dawgBuilder . wordCount ( ) , org . hamcrest . Matchers . is ( 2 ) ) |
testAnalyzeStringString ( ) { java . lang . String c1 = "" + ( ( ( ( "class<sp>X<sp>{" + "public<sp>void<sp>foo0()<sp>{" ) + "<sp>int<sp>x<sp>=<sp>0;" ) + "}" ) + "};" ) ; java . lang . String c2 = "" + ( ( ( ( "class<sp>X<sp>{" + "public<sp>void<sp>foo1()<sp>{" ) + "<sp>int<sp>x<sp>=<sp>0;" ) + "}" ) + "};" ) ; gumtre... | org . junit . Assert . assertTrue ( ( ( editScript . getRootOperations ( ) . size ( ) ) == 1 ) ) |
testListEvents ( ) { org . candlepin . resource . EventResource er = new org . candlepin . resource . EventResource ( ec , null , injector . getInstance ( org . candlepin . audit . EventAdapter . class ) , translator ) ; org . candlepin . model . CandlepinQuery cpQueryMock = mock ( org . candlepin . model . CandlepinQu... | org . junit . Assert . assertEquals ( eventDTOs , er . listEvents ( ) ) |
spaceMergesOntologies ( ) { "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( true ) |
validate_statusIsNotSet_returnsFalse ( ) { boolean result = request . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; } | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
testCompileWithNullDependencies ( ) { io . cloudslang . lang . compiler . SlangSource tempFile = createTempFile ( ) ; org . mockito . Mockito . when ( compiler . compile ( any ( io . cloudslang . lang . compiler . SlangSource . class ) , anySetOf ( io . cloudslang . lang . compiler . SlangSource . class ) , any ( io . ... | org . junit . Assert . assertNotNull ( compilationArtifact ) |
testLinkedMapPropertyLinkedClass ( ) { com . orientechnologies . orient . core . metadata . schema . OSchema schema = db . getMetadata ( ) . getSchema ( ) ; com . orientechnologies . orient . core . metadata . schema . OClass classA = schema . createClass ( "TestMapProperty" ) ; com . orientechnologies . orient . core ... | org . junit . Assert . assertNull ( prop ) |
createAttributeValueList ( ) { org . finra . herd . model . api . xml . AttributeValueListKey attributeValueListKey = new org . finra . herd . model . api . xml . AttributeValueListKey ( ATTRIBUTE_VALUE_LIST_NAMESPACE , ATTRIBUTE_VALUE_LIST_NAME ) ; org . finra . herd . model . api . xml . AttributeValueListCreateReque... | org . junit . Assert . assertEquals ( new org . finra . herd . model . api . xml . AttributeValueList ( ATTRIBUTE_VALUE_LIST_ID , attributeValueListKey ) , result ) |
testEmptyFolderCommitted ( ) { org . eclipse . jgit . revwalk . RevCommit commit = createEmptyFolderAndCommit ( ) ; org . eclipse . jgit . treewalk . TreeWalk treeWalk = createTreeWalk ( commit ) ; "<AssertPlaceHolder>" ; } next ( ) { org . eclipse . jgit . treewalk . CanonicalTreeParser p = this ; for ( ; ; ) { if ( (... | org . junit . Assert . assertFalse ( treeWalk . next ( ) ) |
testIntersectionOfTwoLists_NoDuplicates_NoDuplicates_Test2 ( ) { java . util . List < java . lang . Integer > listOne = new java . util . ArrayList < java . lang . Integer > ( ) ; listOne . add ( 1000 ) ; listOne . add ( 2000 ) ; listOne . add ( 3000 ) ; listOne . add ( 4000 ) ; listOne . add ( 5000 ) ; listOne . add (... | org . junit . Assert . assertTrue ( actual . contains ( expectedItem ) ) |
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . dynamic . data . mapping . model . DDMStructureLink missingDDMStructureLink = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { retu... | org . junit . Assert . assertNull ( missingDDMStructureLink ) |
testMatchHivePolicy_NoUserId ( ) { java . util . List < org . apache . ranger . entity . XXResource > xResourceList = new java . util . ArrayList < org . apache . ranger . entity . XXResource > ( ) ; org . apache . ranger . entity . XXResource xXResource = new org . apache . ranger . entity . XXResource ( ) ; xXResourc... | org . junit . Assert . assertFalse ( bnlChk ) |
testCreateEntityAndSpecifyType ( ) { org . springframework . data . neo4j . support . IndexingRelationshipTypeRepresentationStrategyTest . Link newLink = relationshipTypeRepresentationStrategy . createEntity ( org . springframework . data . neo4j . support . IndexingRelationshipTypeRepresentationStrategyTest . rel ( li... | org . junit . Assert . assertEquals ( link , newLink ) |
testSearchCity ( ) { customer . setCity ( "Montreal" ) ; data = manager . search ( ) ; "<AssertPlaceHolder>" ; } search ( ) { java . lang . String selectStatement = "select<sp>*<sp>from<sp>users<sp>where<sp>" ; int size = selectStatement . length ( ) ; values = new java . util . ArrayList < java . lang . Object > ( ) ;... | org . junit . Assert . assertTrue ( ( ( data . size ( ) ) > 0 ) ) |
testFindIsTurkishSetter ( ) { final boolean value = true ; org . supercsv . util . ReflectionUtils . findSetter ( bean , "isTurkish" , org . supercsv . util . Boolean . class ) . invoke ( bean , value ) ; "<AssertPlaceHolder>" ; } getIsTurkish ( ) { return isTurkish ; } | org . junit . Assert . assertEquals ( value , bean . getIsTurkish ( ) ) |
testValidate_7 ( ) { java . lang . String line = "rename<sp>/tomcat-vm/tomcat-server<sp>as<sp>tomcat-server-copy" ; net . roboconf . core . commands . RenameCommandInstruction instr = new net . roboconf . core . commands . RenameCommandInstruction ( this . context , line , 1 ) ; java . util . List < net . roboconf . co... | org . junit . Assert . assertEquals ( 0 , errors . size ( ) ) |
testUpdateThroughFromSubquery ( ) { setProjectionPruningProperty ( projectionPruningDisabled ) ; com . splicemachine . derby . test . framework . TestConnection conn = methodWatcher . getOrCreateConnection ( ) ; boolean oldAutoCommit = conn . getAutoCommit ( ) ; conn . setAutoCommit ( false ) ; try ( java . sql . State... | org . junit . Assert . assertEquals ( ( ( "update<sp>target<sp>set<sp>(b6)=(select<sp>\'WWW\'<sp>from<sp>(select<sp>*<sp>from<sp>t5<sp>--splice-properties<sp>index=idx_t5\n)<sp>dt<sp>where<sp>a6=a5+10<sp>and<sp>a5=1)" 0 + sqlText ) + "update<sp>target<sp>set<sp>(b6)=(select<sp>\'WWW\'<sp>from<sp>(select<sp>*<sp>from<sp... |
testBucketLockAfterVolumeLock ( ) { org . apache . hadoop . ozone . om . OzoneManagerLock lock = new org . apache . hadoop . ozone . om . OzoneManagerLock ( new org . apache . hadoop . hdds . conf . OzoneConfiguration ( ) ) ; lock . acquireVolumeLock ( "volOne" ) ; lock . acquireBucketLock ( "volOne" , "bucketOne" ) ; ... | org . junit . Assert . assertTrue ( true ) |
createResetRequest_withType_returnsValidResetRequest ( ) { eu . chargetime . ocpp . model . core . ResetType type = eu . chargetime . ocpp . model . core . ResetType . Hard ; eu . chargetime . ocpp . model . core . ResetRequest result = core . createResetRequest ( type ) ; "<AssertPlaceHolder>" ; } validate ( ) { retur... | org . junit . Assert . assertThat ( result . validate ( ) , org . hamcrest . CoreMatchers . is ( true ) ) |
useIndexOf ( ) { com . buschmais . xo . api . XOManager xoManager = getXOManager ( ) ; xoManager . currentTransaction ( ) . begin ( ) ; com . buschmais . xo . neo4j . test . mapping . composite . A a1 = xoManager . create ( com . buschmais . xo . neo4j . test . mapping . composite . D . class ) ; a1 . setIndex ( "1" ) ... | org . junit . Assert . assertThat ( xoManager . find ( com . buschmais . xo . neo4j . test . mapping . composite . D . class , "1" ) . iterator ( ) . next ( ) , org . hamcrest . Matchers . equalTo ( a1 ) ) |
testSetCalendarDate ( ) { int [ ] result = calendarDate1 . getCalendarDate ( ) ; int [ ] caldate = new int [ ] { 1995 , 5 , 5 } ; ( ( org . geotools . temporal . object . DefaultCalendarDate ) ( calendarDate1 ) ) . setCalendarDate ( caldate ) ; "<AssertPlaceHolder>" ; } getCalendarDate ( ) { return calendarDate ; } | org . junit . Assert . assertFalse ( calendarDate1 . getCalendarDate ( ) . equals ( result ) ) |
retainsOrderWhenChangingLocation ( ) { java . lang . String originalName = "secondParameter" ; parametersHolder . addProperty ( originalName ) ; parametersHolder . setParameterLocation ( parametersHolder . getProperty ( com . eviware . soapui . impl . rest . support . RestRequestParamsPropertyHolderTest . FIRST_PARAMET... | org . junit . Assert . assertThat ( parametersHolder . getPropertyIndex ( com . eviware . soapui . impl . rest . support . RestRequestParamsPropertyHolderTest . FIRST_PARAMETER_NAME ) , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testReadRandom ( ) { java . util . Random r = new java . util . Random ( 0 ) ; for ( int i = 0 ; i < 1000000 ; i ++ ) { int LEN = ( r . nextInt ( 4 ) ) + 2 ; long [ ] s = newBaPattern ( LEN , r ) ; int start = r . nextInt ( ( ( LEN - 1 ) * ( ch . ethz . globis . phtree . bits . TestBitsLongWrite . BITS ) ) ) ; int len ... | org . junit . Assert . assertEquals ( v2 , v1 ) |
testSetter ( ) { org . apache . james . mime4j . storage . StorageProvider instance = new org . apache . james . mime4j . storage . MemoryStorageProvider ( ) ; org . apache . james . mime4j . storage . DefaultStorageProvider . setInstance ( instance ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { return org . apache . ... | org . junit . Assert . assertSame ( instance , org . apache . james . mime4j . storage . DefaultStorageProvider . getInstance ( ) ) |
testFindByPrimaryKeyExisting ( ) { com . liferay . portal . kernel . model . Portlet newPortlet = addPortlet ( ) ; com . liferay . portal . kernel . model . Portlet existingPortlet = _persistence . findByPrimaryKey ( newPortlet . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId... | org . junit . Assert . assertEquals ( existingPortlet , newPortlet ) |
testPutSubprojectionToAttribute ( ) { org . xmlbeam . types . XBAutoMap < org . xmlbeam . tests . binding . TestBindAnnotation . Projection > map = org . xmlbeam . tests . binding . TestBindAnnotation . projector . autoMapEmptyDocument ( org . xmlbeam . tests . binding . TestBindAnnotation . Projection . class ) ; "<As... | org . junit . Assert . assertTrue ( map . isEmpty ( ) ) |
testHLLSparseMoreRegisterBits ( ) { com . github . prasanthj . hll . HyperLogLog hll = com . github . prasanthj . hll . HyperLogLog . builder ( ) . setEncoding ( EncodingType . SPARSE ) . setNumRegisterIndexBits ( 16 ) . build ( ) ; int size = 1000 ; for ( int i = 0 ; i < size ; i ++ ) { hll . addLong ( i ) ; } double ... | org . junit . Assert . assertEquals ( ( ( double ) ( size ) ) , ( ( double ) ( hll . count ( ) ) ) , delta ) |
testHasQueryEmptyQueryTest ( ) { java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; map . put ( "testKey" , "testVal" ) ; RequestParser < String > . ParsedRequest parsed = target . new org . o3project . odenos . remoteo... | org . junit . Assert . assertTrue ( parsed . hasQuery ( ) ) |
testGetInstanceRequest ( ) { try { com . fit2cloud . aliyun . ecs . model . request . GetInstanceRequest r = new com . fit2cloud . aliyun . ecs . model . request . GetInstanceRequest ( "i-25uh6z38k" ) ; com . fit2cloud . aliyun . ecs . model . response . GetInstanceResponse response = client . getInstance ( r ) ; Syste... | org . junit . Assert . assertTrue ( true ) |
testNewAttribute ( ) { org . rapla . facade . RaplaFacade facade = getServerFacade ( ) ; org . rapla . entities . dynamictype . DynamicType roomType = facade . edit ( facade . getDynamicType ( "room" ) ) ; org . rapla . entities . dynamictype . Attribute attribute = facade . newAttribute ( AttributeType . STRING ) ; at... | org . junit . Assert . assertEquals ( name , allocatable . getClassification ( ) . getValue ( "name" ) ) |
testGetDoublePropetry ( ) { javax . jms . JMSProducer producer = context . createProducer ( ) ; producer . setProperty ( DOUBLE_PROPERTY_NAME , DOUBLE_PROPERTY_VALUE ) ; "<AssertPlaceHolder>" ; } getDoubleProperty ( java . lang . String ) { try { return convertPropertyTo ( name , messageProperties . get ( name ) , org ... | org . junit . Assert . assertEquals ( DOUBLE_PROPERTY_VALUE , producer . getDoubleProperty ( DOUBLE_PROPERTY_NAME ) , 0.0 ) |
testDate ( ) { final java . util . Date d = new java . util . Date ( ) ; np . setCurrentDate ( d ) ; "<AssertPlaceHolder>" ; } getCurrentDate ( ) { return currentDate ; } | org . junit . Assert . assertEquals ( np . getCurrentDate ( ) , d ) |
testStreamOnEmptyOptional ( ) { long count = com . annimon . stream . OptionalInt . empty ( ) . stream ( ) . count ( ) ; "<AssertPlaceHolder>" ; } count ( ) { long count = 0 ; while ( iterator . hasNext ( ) ) { iterator . nextLong ( ) ; count ++ ; } return count ; } | org . junit . Assert . assertThat ( count , org . hamcrest . Matchers . is ( 0L ) ) |
testCancel ( ) { int numElementsBefore = org . peerbox . filerecovery . FileVersionSelectorTest . root . list ( ) . length ; org . peerbox . filerecovery . FileVersionSelectorTest . FileVersionSelectorListener versionSelectorListener = new org . peerbox . filerecovery . FileVersionSelectorTest . FileVersionSelectorList... | org . junit . Assert . assertEquals ( numElementsBefore , numElementsAfter ) |
testgetNumberEndpoints ( ) { int numEndpoints = d_wizard . getEndpointSelectModel ( ) . getSlots ( ) . size ( ) ; d_wizard . getEndpointSelectModel ( ) . addSlot ( ) ; d_wizard . getEndpointSelectModel ( ) . addSlot ( ) ; "<AssertPlaceHolder>" ; } getSlots ( ) { java . util . List < org . drugis . addis . presentation ... | org . junit . Assert . assertEquals ( ( numEndpoints + 2 ) , d_wizard . getEndpointSelectModel ( ) . getSlots ( ) . size ( ) ) |
testGetByModelNull ( ) { uk . ac . bbsrc . tgac . miso . core . data . InstrumentModel platform = dao . getByAlias ( null ) ; "<AssertPlaceHolder>" ; } getByAlias ( java . lang . String ) { org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . ArrayRun... | org . junit . Assert . assertNull ( platform ) |
testConnectToWrongBlock ( ) { try { byte [ ] blockID = org . apache . commons . codec . binary . Hex . decodeHex ( "00000000000030775c9b2103f61b2a0c429a34b41b628daae9774cb9b5ff1059" . toCharArray ( ) ) ; byte [ ] transactionID = org . apache . commons . codec . binary . Hex . decodeHex ( "b6b3ff7b4d004a788c751f3f8fc881... | org . junit . Assert . assertTrue ( ( serial == null ) ) |
mergeAlreadyStagedFileTest ( ) { org . opencb . opencga . storage . core . metadata . StudyConfiguration studyConfiguration = createStudyConfiguration ( ) ; org . opencb . opencga . storage . core . StoragePipelineResult storagePipelineResult = runDefaultETL ( smallInputUri , variantStorageEngine , studyConfiguration ,... | org . junit . Assert . assertTrue ( ( count > 0 ) ) |
testDetermineMatchShouldReturnMatchWhenResultsMatch ( ) { com . ticketmaster . exp . TrialResult < java . lang . String > controlTrialResult = new com . ticketmaster . exp . TrialResult ( TrialType . CONTROL , java . time . Duration . ofMillis ( 1 ) , null , "foo" ) ; com . ticketmaster . exp . TrialResult < java . lan... | org . junit . Assert . assertEquals ( MatchType . MATCH , matchType ) |
getStatisticsForPartitionReturnsNullIfEmptyStats ( ) { java . util . List < org . apache . hadoop . hive . metastore . api . FieldSchema > partitionKeys = com . google . common . collect . Lists . newArrayList ( newFieldSchema ( "a" ) ) ; org . apache . hadoop . hive . metastore . api . Table table = newTable ( "t1" , ... | org . junit . Assert . assertNull ( partitionsAndStatistics . getStatisticsForPartition ( partitions . get ( 0 ) ) ) |
oneIsOne ( ) { "<AssertPlaceHolder>" ; } vec ( T [ ] ) { if ( ( items == null ) || ( ( items . length ) < 1 ) ) { return org . organicdesign . fp . collections . PersistentVector . empty ( ) ; } return org . organicdesign . fp . StaticImports . mutableVec ( items ) . immutable ( ) ; } | org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , org . organicdesign . fp . StaticImports . vec ( 1 ) . get ( 0 ) ) |
testLo3 ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder builder = new nl . bzk . migratiebrp . conversie . model . lo3 . Lo3PersoonslijstBuilder ( ) ; builder . persoonStapel ( nl . bzk . migratiebrp . conversie . model . testutils . VerplichteStapel . createPersoonStapel ( ) ) ; ... | org . junit . Assert . assertTrue ( result ) |
shouldReturnNotEqualForBlobAndCommit ( ) { org . eclipse . egit . ui . internal . synchronize . model . GitModelObject left = createGitModelBlob ( ) ; org . eclipse . egit . ui . internal . synchronize . model . GitModelObject right = new org . eclipse . egit . ui . internal . synchronize . model . GitModelCommit ( cre... | org . junit . Assert . assertFalse ( actual ) |
testPut ( ) { com . liferay . portal . template . soy . internal . SoyTemplate soyTemplate = _soyTestHelper . getSoyTemplate ( "ijdata.soy" ) ; soyTemplate . put ( "key" , "value" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return com . liferay . journal . content . search . web . configuration . Journ... | org . junit . Assert . assertEquals ( "value" , soyTemplate . get ( "key" ) ) |
shouldNotHandleRequest_wrongCriteria ( ) { io . gravitee . gateway . api . Request request = mock ( io . gravitee . gateway . api . Request . class ) ; io . gravitee . common . http . HttpHeaders headers = new io . gravitee . common . http . HttpHeaders ( ) ; headers . set ( "X-Gravitee-Api-Key" , "xxxxx-xxxx-xxxxx" ) ... | org . junit . Assert . assertFalse ( handle ) |
testDumpColorSpace ( ) { final org . apache . commons . imaging . ImageDump imageDump = new org . apache . commons . imaging . ImageDump ( ) ; final java . awt . color . ColorSpace colorSpace = java . awt . color . ColorSpace . getInstance ( 1004 ) ; imageDump . dumpColorSpace ( "Ku&]N>!4'C#Jzn+" , colorSpace ) ; "<Ass... | org . junit . Assert . assertEquals ( 3 , colorSpace . getNumComponents ( ) ) |
testReleaseClosedConnectionShouldNotAddBackTheConnectionToThePool ( ) { io . reactiverse . pgclient . pool . ConnectionQueue queue = new io . reactiverse . pgclient . pool . ConnectionQueue ( ) ; io . reactiverse . pgclient . impl . ConnectionPool pool = new io . reactiverse . pgclient . impl . ConnectionPool ( queue ,... | org . junit . Assert . assertEquals ( pool . available ( ) , 0 ) |
currentDateTest ( ) { org . apache . cayenne . exp . Expression exp = org . apache . cayenne . exp . FunctionExpressionFactory . currentDate ( ) ; "<AssertPlaceHolder>" ; } currentDate ( ) { return new org . apache . cayenne . exp . parser . ASTCurrentDate ( ) ; } | org . junit . Assert . assertTrue ( ( exp instanceof org . apache . cayenne . exp . parser . ASTCurrentDate ) ) |
mergeWithInteger ( ) { puck . thrifty . datatype . LongElement elem = new puck . thrifty . datatype . LongElement ( "test" ) ; puck . thrifty . datatype . Element mergeElem = elem . merge ( new puck . thrifty . datatype . IntegerElement ( "test" ) ) ; "<AssertPlaceHolder>" ; } merge ( puck . thrifty . datatype . Elemen... | org . junit . Assert . assertSame ( elem , mergeElem ) |
shouldOptionallyExcludeFields ( ) { java . lang . String expectedResult = "<order>\n<sp><comments>pack<sp>it<sp>nicely,<sp>please</comments>\n</order>" ; br . com . caelum . vraptor . serialization . xstream . XStreamXMLSerializationTest . Order order = new br . com . caelum . vraptor . serialization . xstream . XStrea... | org . junit . Assert . assertThat ( result ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) ) |
testSerialization ( ) { org . jfree . chart . plot . dial . StandardDialRange r1 = new org . jfree . chart . plot . dial . StandardDialRange ( ) ; org . jfree . chart . plot . dial . StandardDialRange r2 = ( ( org . jfree . chart . plot . dial . StandardDialRange ) ( org . jfree . chart . TestUtilities . serialised ( r... | org . junit . Assert . assertEquals ( r1 , r2 ) |
shouldNotResolveSimpleTypes ( ) { this . model . put ( "k" , "v" ) ; org . springframework . core . MethodParameter parameter = mockMethodParameter ( java . lang . String . class ) ; "<AssertPlaceHolder>" ; } supportsParameter ( org . springframework . core . MethodParameter ) { try { for ( org . springframework . spri... | org . junit . Assert . assertThat ( this . resolver . supportsParameter ( parameter ) , org . hamcrest . Matchers . is ( false ) ) |
testTaskDone ( ) { org . apache . hadoop . hbase . master . TestSplitLogManager . LOG . info ( "TestTaskDone<sp>-<sp>cleanup<sp>task<sp>node<sp>once<sp>in<sp>DONE<sp>state" ) ; slm = new org . apache . hadoop . hbase . master . SplitLogManager ( zkw , conf , org . apache . hadoop . hbase . master . TestSplitLogManager ... | org . junit . Assert . assertTrue ( ( ( org . apache . hadoop . hbase . zookeeper . ZKUtil . checkExists ( zkw , tasknode ) ) == ( - 1 ) ) ) |
testPricesOthersGets ( ) { int id = 0 ; try { id = _setupTestPricesOthers ( false ) ; _checkPricesOthersIntoDb ( id ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkPricesOthersIntoDb ( int ) { org . isf . pricesothers . model . PricesOthers foundPricesOth... | org . junit . Assert . assertEquals ( true , false ) |
test_plusMinor_zero ( ) { org . joda . money . BigMoney test = org . joda . money . TestBigMoney . GBP_2_34 . plusMinor ( 0 ) ; "<AssertPlaceHolder>" ; } plusMinor ( long ) { return with ( money . plusMinor ( amountToAdd ) ) ; } | org . junit . Assert . assertSame ( org . joda . money . TestBigMoney . GBP_2_34 , test ) |
setRawValueForNull ( ) { optionalSubject . setRawValue ( null ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; } | org . junit . Assert . assertEquals ( null , optionalSubject . getValue ( ) ) |
testNonComplexNameScriptBased ( ) { final java . lang . String cfcSrc = "component<sp>{\r\n" + ( ( ( ( ( ( ( ( "function<sp>functionThree()<sp>{\r\n" + "if<sp>(a<sp>==<sp>1)<sp>{" ) + "b<sp>=<sp>1;\r\n" ) + "}\r\n" ) + "else<sp>{\r\n" ) + "b<sp>=<sp>2;\r\n" ) + "}\r\n" ) + "}\r\n" ) + "}" ) ; com . cflint . api . CFLin... | org . junit . Assert . assertEquals ( 0 , result . size ( ) ) |
serialyse_then_parse_with_severals_attributes ( ) { java . util . HashMap < java . lang . String , java . lang . Object > attributesObj1 = new java . util . HashMap ( ) ; attributesObj1 . put ( "number1" , 1 ) ; attributesObj1 . put ( "number2" , 1 ) ; attributesObj1 . put ( "string1" , "stringval1" ) ; org . eclipse .... | org . junit . Assert . assertArrayEquals ( input , output ) |
horizontalTest ( ) { org . eclipse . swt . graphics . Rectangle bounds = new org . eclipse . swt . graphics . Rectangle ( 0 , 0 , 1000 , 1000 ) ; int x0 = 10000 ; int y0 = 100 ; int x1 = - 100 ; int y1 = 100 ; org . eclipse . swt . graphics . Rectangle rect = org . eclipse . tracecompass . internal . tmf . ui . util . ... | org . junit . Assert . assertEquals ( new org . eclipse . swt . graphics . Rectangle ( 1000 , 100 , ( - 1000 ) , 0 ) , rect ) |
testInvalidPEMWithHeaderAndFooter ( ) { java . lang . String pem = "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 3 + ( ( ( ( ( ( ( ( ( ( ( "MIICOjCCAaOgAwIBAgIJANXi/oWxvJNzMA0GCSqGSIb3DQEBBQUAMF8xCzAJBgNVBAYTAlVTMQ0w" + "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUb... | org . junit . Assert . assertTrue ( se . getMessage ( ) . contains ( "jQAwgYkCgYEAwpfpLdi7dWTHNzETt+L7618/dWUQFb/C7o1jIxFgbKOVIB6d5YmvUbJck5PYxFkz" 1 ) ) |
shouldReturnMergedRecordsWithOneEventNoUsage ( ) { org . openstack . atlas . usagerefactor . List < org . openstack . atlas . service . domain . usage . entities . LoadBalancerMergedHostUsage > mergedUsages = usagePollerHelper . processExistingEvents ( lbHostMap ) ; "<AssertPlaceHolder>" ; org . openstack . atlas . usa... | org . junit . Assert . assertEquals ( 2 , mergedUsages . size ( ) ) |
testEmptyStringConstructor ( ) { java . io . Reader reader = new com . twelvemonkeys . io . StringArrayReader ( new java . lang . String [ ] { "" } ) ; "<AssertPlaceHolder>" ; } read ( ) { if ( ! ( ensureBuffer ( ) ) ) { return - 1 ; } return ( buffer . get ( ) ) & 255 ; } | org . junit . Assert . assertEquals ( ( - 1 ) , reader . read ( ) ) |
testTemporaryTrue ( ) { org . apache . activemq . artemis . api . core . client . ClientSession session = createSessionFactory ( locator ) . createSession ( false , true , true ) ; session . createTemporaryQueue ( address , queueName ) ; org . apache . activemq . artemis . core . postoffice . Binding binding = server .... | org . junit . Assert . assertTrue ( q . isTemporary ( ) ) |
test8With4 ( ) { final java . util . Random r = new java . util . Random ( 3434 ) ; for ( int i = 0 ; i < 8 ; i ++ ) { final org . opengis . feature . simple . SimpleFeature feature = createTestFeature ( ( "f" + i ) , new org . locationtech . jts . geom . Coordinate ( round ( ( 30.0 + ( ( r . nextGaussian ( ) ) * 1.0E-... | org . junit . Assert . assertEquals ( 1 , reduceResults . size ( ) ) |
testConcurrentEvaluationWithDifferingLocals ( ) { final com . mitchellbosecke . pebble . PebbleEngine engine = new com . mitchellbosecke . pebble . PebbleEngine . Builder ( ) . loader ( new com . mitchellbosecke . pebble . loader . StringLoader ( ) ) . strictVariables ( false ) . build ( ) ; java . lang . String templa... | org . junit . Assert . assertEquals ( 0 , totalFailed . intValue ( ) ) |
test_equals_incorrectType ( ) { org . threeten . extra . DayOfMonth test = org . threeten . extra . DayOfMonth . of ( 1 ) ; java . lang . Object obj = "Incorrect<sp>type" ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == otherAmount ) { return true ; } if ( otherAmount instanceof org . thre... | org . junit . Assert . assertEquals ( false , test . equals ( obj ) ) |
testStringQuery ( ) { com . liferay . portal . search . query . StringQuery stringQuery = com . liferay . portal . search . query . test . QueriesInstantiationTest . _queries . string ( "query" ) ; "<AssertPlaceHolder>" ; } string ( java . lang . String ) { return new com . liferay . portal . search . internal . query ... | org . junit . Assert . assertNotNull ( stringQuery ) |
compareInsertPerformance ( ) { System . out . println ( "compareInsertPerformance()" ) ; int repeats = 10 ; int dataSize = 100000 ; int minValue = 1 ; int maxValue = 8000000 ; final com . google . common . base . Stopwatch sw = new com . google . common . base . Stopwatch ( ) ; double [ ] [ ] times = new double [ uk . ... | org . junit . Assert . assertEquals ( sets [ i ] , sets [ ( i + 1 ) ] ) |
testSharingMetricAddSuccess ( ) { com . alibaba . craftsman . dto . SharingMetricAddCmd sharingMetricAddCmd = new com . alibaba . craftsman . dto . SharingMetricAddCmd ( ) ; com . alibaba . craftsman . dto . clientobject . SharingMetricCO sharingMetricCO = new com . alibaba . craftsman . dto . clientobject . SharingMet... | org . junit . Assert . assertTrue ( response . isSuccess ( ) ) |
testBadCertZip ( ) { boolean result = zipValidator . validateZipFile ( org . codice . ddf . catalog . transformer . zip . ZipValidatorTest . BAD_CERT_ZIP_PATH ) ; "<AssertPlaceHolder>" ; } validateZipFile ( java . lang . String ) { try ( java . util . jar . JarFile jarFile = new java . util . jar . JarFile ( filePath )... | org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) ) |
contentTypeCharset ( ) { final java . lang . String contentType = ( ( org . apache . olingo . server . core . deserializer . batch . BatchParserCommonTest . MULTIPART_MIXED ) + ";<sp>charset=UTF-8;boundary=" ) + ( BatchParserCommon . BOUNDARY ) ; final java . lang . String boundary = org . apache . olingo . server . co... | org . junit . Assert . assertEquals ( BatchParserCommon . BOUNDARY , boundary ) |
isCurrentUserAuthenticatedShouldNotBeAuthenticatedWhenUserIsAuthenticatedByAnonymousAuthentication ( ) { org . springframework . security . core . context . SecurityContextHolder . getContext ( ) . setAuthentication ( new org . springframework . security . authentication . AnonymousAuthenticationToken ( com . epam . rf... | org . junit . Assert . assertFalse ( result ) |
testDeleteBusinessObjectDefinitionSubjectMatterExpert ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey key = new org . finra . herd . model . api . xml . BusinessObjectDefinitionSubjectMatterExpertKey ( BDEF_NAMESPACE , BDEF_NAME , USER_ID ) ; org . finra . herd . model . ap... | org . junit . Assert . assertEquals ( businessObjectDefinitionSubjectMatterExpert , deletedBusinessObjectDefinitionSubjectMatterExpert ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.