input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
notHomonymSparseHigherOrderRanks ( ) { org . eol . globi . domain . TaxonImpl taxon = new org . eol . globi . domain . TaxonImpl ( ) ; taxon . setName ( "Medicago<sp>sativa" ) ; taxon . setPath ( "Biota<sp>|<sp>Plantae<sp>|<sp>Tracheophyta<sp>|<sp>Magnoliopsida<sp>|<sp>Fabales<sp>|<sp>Fabaceae<sp>|<sp>Medicago<sp>|<sp>Medicago<sp>sativa" ) ; taxon . setPathNames ( "Unranked|Kingdom|Phylum|Class|Order|Family|Genus|Species" ) ; org . eol . globi . domain . TaxonImpl otherTaxon = new org . eol . globi . domain . TaxonImpl ( ) ; otherTaxon . setName ( "Medicago<sp>sativa" ) ; otherTaxon . setPath ( "Eukaryota|Streptophyta|Medicago|Medicago<sp>sativa|Papilionoideae|Trifolieae||Fabaceae|Viridiplantae|Fabales" ) ; otherTaxon . setPathNames ( "superkingdom|phylum|genus|species|subfamily|tribe|subclass|family|kingdom|order" ) ; "<AssertPlaceHolder>" ; } likelyHomonym ( org . eol . globi . domain . Taxon , org . eol . globi . domain . Taxon ) { if ( ( org . eol . globi . service . TaxonUtil . isResolved ( taxonA ) ) && ( org . eol . globi . service . TaxonUtil . isResolved ( taxonB ) ) ) { java . util . Map < java . lang . String , java . lang . String > pathMapA = org . eol . globi . service . TaxonUtil . toPathNameMap ( taxonA ) ; java . util . Map < java . lang . String , java . lang . String > pathMapB = org . eol . globi . service . TaxonUtil . toPathNameMap ( taxonB ) ; return ( org . eol . globi . service . TaxonUtil . hasHigherOrderTaxaMismatch ( pathMapA , pathMapB ) ) || ( org . eol . globi . service . TaxonUtil . taxonPathLengthMismatch ( pathMapA , pathMapB ) ) ; } else { return false ; } }
org . junit . Assert . assertFalse ( org . eol . globi . service . TaxonUtil . likelyHomonym ( taxon , otherTaxon ) )
testDefaultSourceNoResources ( ) { org . eclipse . ceylon . common . FileUtil . delete ( new java . io . File ( "build/test-modules" ) ) ; org . eclipse . ceylon . compiler . js . ToolModel < org . eclipse . ceylon . compiler . js . CeylonCompileJsTool > tool = pluginLoader . loadToolModel ( "compile-js" ) ; "<AssertPlaceHolder>" ; org . eclipse . ceylon . compiler . js . CeylonCompileJsTool jsc = pluginFactory . bindArguments ( tool , getMainTool ( ) , args ( "--source=src/test/resources/doc" , "--resource=src/test/resources/res_test" , "src/test/resources/doc/calls.ceylon" ) ) ; jsc . run ( ) ; checkCompilerResult ( "build/test-modules/default" , "default" ) ; checkNoResources ( "build/test-modules/default" , "default" ) ; }
org . junit . Assert . assertNotNull ( tool )
testSupportForCustomPartitionType ( ) { org . picketlink . idm . config . IdentityConfigurationBuilder builder = new org . picketlink . idm . config . IdentityConfigurationBuilder ( ) ; builder . named ( "default" ) . stores ( ) . file ( ) . supportType ( org . picketlink . test . idm . config . CustomPartition . class ) . supportType ( org . picketlink . idm . model . IdentityType . class ) . supportType ( org . picketlink . idm . model . Relationship . class ) ; org . picketlink . idm . internal . DefaultPartitionManager partitionManager = new org . picketlink . idm . internal . DefaultPartitionManager ( builder . buildAll ( ) ) ; partitionManager . add ( new org . picketlink . test . idm . config . CustomPartition ( "Custom<sp>Partition" ) ) ; "<AssertPlaceHolder>" ; } getPartition ( java . lang . Class , java . lang . String ) { if ( partitionClass == null ) { throw org . picketlink . idm . IDMInternalMessages . MESSAGES . nullArgument ( "Partition<sp>class" ) ; } if ( isNullOrEmpty ( name ) ) { throw org . picketlink . idm . IDMInternalMessages . MESSAGES . nullArgument ( "Partition<sp>name" ) ; } if ( ! ( getConfiguration ( ) . supportsPartition ( ) ) ) { return ( ( T ) ( createDefaultPartition ( ) ) ) ; } try { org . picketlink . idm . spi . IdentityContext identityContext = getIdentityContext ( ) ; T partition = getStoreSelector ( ) . getStoreForPartitionOperation ( identityContext , partitionClass ) . < T > get ( identityContext , partitionClass , name ) ; if ( partition != null ) { loadAttributes ( identityContext , ( ( T ) ( partition ) ) ) ; } return partition ; } catch ( java . lang . Exception e ) { throw org . picketlink . idm . IDMInternalMessages . MESSAGES . partitionGetFailed ( partitionClass , name , e ) ; } }
org . junit . Assert . assertNotNull ( partitionManager . getPartition ( org . picketlink . test . idm . config . CustomPartition . class , "Custom<sp>Partition" ) )
testDeserialize ( ) { net . floodlightcontroller . packet . IPacket packet = new net . floodlightcontroller . packet . IPv4 ( ) ; packet . deserialize ( pktSerialized , 0 , pktSerialized . length ) ; byte [ ] pktSerialized1 = packet . serialize ( ) ; "<AssertPlaceHolder>" ; } serialize ( ) { int length = 4 ; byte [ ] payloadData = null ; if ( ( payload ) != null ) { payload . setParent ( this ) ; payloadData = payload . serialize ( ) ; length += payloadData . length ; } byte [ ] data = new byte [ length ] ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( data ) ; bb . put ( this . icmpType ) ; bb . put ( this . icmpCode ) ; bb . putShort ( this . checksum ) ; if ( payloadData != null ) bb . put ( payloadData ) ; if ( ( ( this . parent ) != null ) && ( ( this . parent ) instanceof net . floodlightcontroller . packet . IPv4 ) ) ( ( net . floodlightcontroller . packet . IPv4 ) ( this . parent ) ) . setProtocol ( IPv4 . PROTOCOL_ICMP ) ; if ( ( this . checksum ) == 0 ) { bb . rewind ( ) ; int accumulation = 0 ; for ( int i = 0 ; i < ( length / 2 ) ; ++ i ) { accumulation += 65535 & ( bb . getShort ( ) ) ; } if ( ( length % 2 ) > 0 ) { accumulation += ( ( bb . get ( ) ) & 255 ) << 8 ; } accumulation = ( ( accumulation > > 16 ) & 65535 ) + ( accumulation & 65535 ) ; this . checksum = ( ( short ) ( ( ~ accumulation ) & 65535 ) ) ; bb . putShort ( 2 , this . checksum ) ; } return data ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( pktSerialized , pktSerialized1 ) )
testDecorateNullText ( ) { "<AssertPlaceHolder>" ; } decorate ( java . lang . String , org . springframework . roo . support . util . AnsiEscapeCode [ ] ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( text ) ) { return text ; } final java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( org . springframework . roo . support . util . AnsiEscapeCode . ANSI_ENABLED ) { for ( final org . springframework . roo . support . util . AnsiEscapeCode code : codes ) { sb . append ( code . code ) ; } } sb . append ( text ) ; if ( ( ( codes != null ) && ( ( codes . length ) > 0 ) ) && ( org . springframework . roo . support . util . AnsiEscapeCode . ANSI_ENABLED ) ) { sb . append ( org . springframework . roo . support . util . AnsiEscapeCode . OFF . code ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertNull ( org . springframework . roo . support . util . AnsiEscapeCode . decorate ( null , org . springframework . roo . support . util . AnsiEscapeCode . values ( ) [ 0 ] ) )
getInvisibleProductKeysWithUsersFlag ( ) { container . login ( user . getKey ( ) , org . oscm . usergroupservice . dao . ROLE_TECHNOLOGY_MANAGER ) ; prepareInvisibleProducts ( ) ; java . util . List < org . oscm . usergroupservice . dao . UserGroupToInvisibleProduct > result = runTX ( new java . util . concurrent . Callable < java . util . List < org . oscm . usergroupservice . dao . UserGroupToInvisibleProduct > > ( ) { @ org . oscm . usergroupservice . dao . Override public java . util . List < org . oscm . usergroupservice . dao . UserGroupToInvisibleProduct > call ( ) throws org . oscm . usergroupservice . dao . Exception { return dao . getInvisibleProducts ( group1 . getKey ( ) ) ; } } ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , result . size ( ) )
testCreateLunBySize ( ) { com . iwave . ext . netapp . Lun lun = new com . iwave . ext . netapp . Lun ( com . iwave . ext . netapp . LunTest . server , com . iwave . ext . netapp . LunTest . LUN_PATH ) ; long actualSize = lun . createLunBySize ( LunOSType . windows , com . iwave . ext . netapp . LunTest . INIT_LUN_SIZE , true ) ; "<AssertPlaceHolder>" ; } createLunBySize ( com . iwave . ext . netapp . LunOSType , long , boolean ) { netapp . manage . NaElement elem = new netapp . manage . NaElement ( "lun-create-by-size" ) ; elem . addNewChild ( "ostype" , osType . apiName ( ) ) ; elem . addNewChild ( "path" , path ) ; elem . addNewChild ( "size" , java . lang . Long . toString ( size ) ) ; elem . addNewChild ( "space-reservation-enabled" , java . lang . Boolean . toString ( reserveSpace ) ) ; netapp . manage . NaElement result = null ; try { result = server . invokeElem ( elem ) ; return result . getChildLongValue ( "actual-size" , ( - 1 ) ) ; } catch ( java . lang . Exception e ) { java . lang . String msg = "Failed<sp>to<sp>create<sp>LUN<sp>path=" + ( path ) ; log . error ( msg , e ) ; throw new com . iwave . ext . netapp . NetAppException ( msg , e ) ; } }
org . junit . Assert . assertEquals ( com . iwave . ext . netapp . LunTest . INIT_LUN_SIZE , actualSize )
testGetMissingRomsFilesWithEmptyRomPath ( ) { org . tibennetwork . iarcade . mame . FakeMameRuntime mame = new org . tibennetwork . iarcade . mame . FakeMameRuntime ( ) ; java . util . List < java . io . InputStream > inputStreams = new java . util . ArrayList ( ) ; inputStreams . add ( new java . io . FileInputStream ( "src/test/resources/xml/neomrdo.xml" ) ) ; inputStreams . add ( new java . io . FileInputStream ( "src/test/resources/xml/neogeo.xml" ) ) ; mame . setInputStreamsToReturn ( inputStreams ) ; org . tibennetwork . iarcade . mame . MachineRepository mr = new org . tibennetwork . iarcade . mame . MachineRepository ( mame ) ; org . tibennetwork . iarcade . mame . Machine m = mr . findByName ( "neomrdo" ) ; java . util . Set < java . io . File > romPaths = new java . util . HashSet ( ) ; romPaths . add ( new java . io . File ( "src/test/resources/empty-rompath" ) ) ; java . util . Set < java . lang . String > missingFiles = m . getMissingRomFiles ( MachineRomSetFormat . SPLIT , romPaths ) ; java . util . Set < java . lang . String > expectedMissingFiles = new java . util . HashSet ( ) ; expectedMissingFiles . add ( "neogeo" ) ; expectedMissingFiles . add ( "neomrdo" ) ; "<AssertPlaceHolder>" ; } getMissingRomFiles ( org . tibennetwork . iarcade . internetarchive . MachineRomSet . MachineRomSetFormat , java . util . Set ) { java . util . Set < java . lang . String > missingRomFiles = new java . util . HashSet ( ) ; romfileloop : for ( java . lang . String romFile : this . getNeededRomFiles ( format ) ) { for ( java . io . File romPath : romPaths ) { java . lang . String romFileInRomPathWithoutExtension = ( ( romPath . getAbsolutePath ( ) ) + ( java . io . File . separator ) ) + romFile ; java . io . File zippedRomFileInRomPath = new java . io . File ( ( romFileInRomPathWithoutExtension + ".zip" ) ) ; java . io . File SevenZippedRomFileInRomPath = new java . io . File ( ( romFileInRomPathWithoutExtension + ".7z" ) ) ; if ( ( zippedRomFileInRomPath . exists ( ) ) || ( SevenZippedRomFileInRomPath . exists ( ) ) ) { continue romfileloop ; } } missingRomFiles . add ( romFile ) ; } return missingRomFiles ; }
org . junit . Assert . assertThat ( missingFiles , org . hamcrest . CoreMatchers . equalTo ( expectedMissingFiles ) )
testMusAssumptions ( ) { final org . prop4j . explain . solvers . MusExtractor solver = getInstance ( ) ; solver . addFormula ( new org . prop4j . And ( "A" , "B" ) ) ; solver . addAssumption ( "A" , false ) ; final java . util . Set < org . prop4j . Node > expected = new java . util . LinkedHashSet ( ) ; expected . add ( new org . prop4j . Or ( "A" ) ) ; final java . util . Set < org . prop4j . Node > actual = solver . getMinimalUnsatisfiableSubset ( ) ; "<AssertPlaceHolder>" ; } getMinimalUnsatisfiableSubset ( ) { return getClauseSetFromIndexSet ( getMinimalUnsatisfiableSubsetIndexes ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
resolvesCourseDidInCourseOfferingCorrectly ( ) { org . slc . sli . ingestion . NeutralRecordEntity courseOfferingEntity = loadEntity ( "didTestEntities/courseOffering.json" ) ; resolveInternalId ( courseOfferingEntity ) ; java . util . Map < java . lang . String , java . lang . Object > courseOfferingBody = courseOfferingEntity . getBody ( ) ; java . lang . Object courseOfferingResolvedRef = courseOfferingBody . get ( "CourseReference" ) ; java . util . Map < java . lang . String , java . lang . String > schoolNaturalKeys = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; schoolNaturalKeys . put ( "stateOrganizationId" , "testSchoolId" ) ; java . lang . String schoolId = generateExpectedDid ( schoolNaturalKeys , org . slc . sli . ingestion . transformation . normalization . did . DidReferenceResolutionTest . TENANT_ID , "educationOrganization" , null ) ; java . util . Map < java . lang . String , java . lang . String > naturalKeys = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; naturalKeys . put ( "schoolId" , schoolId ) ; naturalKeys . put ( "uniqueCourseId" , "testCourseId" ) ; java . lang . String courseReferenceDID = generateExpectedDid ( naturalKeys , org . slc . sli . ingestion . transformation . normalization . did . DidReferenceResolutionTest . TENANT_ID , "course" , null ) ; "<AssertPlaceHolder>" ; } generateExpectedDid ( java . util . Map , java . lang . String , java . lang . String , java . lang . String ) { org . slc . sli . common . domain . NaturalKeyDescriptor nkd = new org . slc . sli . common . domain . NaturalKeyDescriptor ( naturalKeys , tenantId , entityType , parentId ) ; return new org . slc . sli . common . util . uuid . DeterministicUUIDGeneratorStrategy ( ) . generateId ( nkd ) ; }
org . junit . Assert . assertEquals ( courseReferenceDID , courseOfferingResolvedRef )
testResolveTypeObjectToGeneric ( ) { java . lang . Class < java . lang . Object > type = java . lang . Object . class ; org . apache . avro . Schema schema = org . apache . avro . SchemaBuilder . record ( "User" ) . fields ( ) . requiredString ( "name" ) . requiredString ( "color" ) . endRecord ( ) ; java . lang . Class expResult = GenericData . Record . class ; java . lang . Class result = org . kitesdk . data . spi . DataModelUtil . resolveType ( type , schema ) ; "<AssertPlaceHolder>" ; } resolveType ( java . lang . Class , org . apache . avro . Schema ) { if ( type == ( java . lang . Object . class ) ) { type = org . apache . avro . reflect . ReflectData . get ( ) . getClass ( schema ) ; } if ( type == null ) { type = ( ( java . lang . Class < E > ) ( GenericData . Record . class ) ) ; } return type ; }
org . junit . Assert . assertEquals ( expResult , result )
equals_ignore_components ( ) { biweekly . util . ICalDate date1 = new biweekly . util . ICalDate ( biweekly . util . TestUtils . date ( "2014-10-01<sp>12:00:00" ) , new biweekly . util . DateTimeComponents ( 2014 , 10 , 1 , 12 , 0 , 0 , false ) , true ) ; biweekly . util . ICalDate date2 = new biweekly . util . ICalDate ( biweekly . util . TestUtils . date ( "2014-10-01<sp>12:00:00" ) , new biweekly . util . DateTimeComponents ( 1990 , 10 , 1 , 12 , 0 , 0 , false ) , true ) ; "<AssertPlaceHolder>" ; } date ( java . lang . String ) { return biweekly . util . TestUtils . date ( text , java . util . TimeZone . getDefault ( ) ) ; }
org . junit . Assert . assertEquals ( date1 , date2 )
testHeterolyticCleavagePBReaction ( ) { org . openscience . cdk . reaction . IReactionProcess type = new org . openscience . cdk . reaction . type . HeterolyticCleavagePBReaction ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( type )
testProcessTemplate4 ( ) { com . liferay . portal . kernel . template . Template template = new com . liferay . portal . template . velocity . internal . VelocityTemplate ( new com . liferay . portal . template . velocity . internal . VelocityTemplateTest . MockTemplateResource ( com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _TEMPLATE_FILE_NAME ) , new com . liferay . portal . template . velocity . internal . VelocityTemplateTest . MockTemplateResource ( com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _WRONG_ERROR_TEMPLATE_ID ) , null , _velocityEngine , _templateContextHelper , com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _templateResourceCache ) ; template . put ( com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _TEST_KEY , com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _TEST_VALUE ) ; com . liferay . portal . kernel . io . unsync . UnsyncStringWriter unsyncStringWriter = new com . liferay . portal . kernel . io . unsync . UnsyncStringWriter ( ) ; template . processTemplate ( unsyncStringWriter ) ; java . lang . String result = unsyncStringWriter . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . liferay . petra . string . StringBundler sb = new com . liferay . petra . string . StringBundler ( 23 ) ; sb . append ( ",<sp>width=" 1 ) ; sb . append ( uuid ) ; sb . append ( ",<sp>width=" 0 ) ; sb . append ( amImageEntryId ) ; sb . append ( ",<sp>groupId=" ) ; sb . append ( groupId ) ; sb . append ( ",<sp>companyId=" ) ; sb . append ( companyId ) ; sb . append ( ",<sp>createDate=" ) ; sb . append ( createDate ) ; sb . append ( ",<sp>configurationUuid=" ) ; sb . append ( configurationUuid ) ; sb . append ( ",<sp>fileVersionId=" ) ; sb . append ( fileVersionId ) ; sb . append ( ",<sp>mimeType=" ) ; sb . append ( mimeType ) ; sb . append ( ",<sp>height=" ) ; sb . append ( height ) ; sb . append ( ",<sp>width=" ) ; sb . append ( width ) ; sb . append ( ",<sp>size=" ) ; sb . append ( size ) ; sb . append ( "}" ) ; return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( com . liferay . portal . template . velocity . internal . VelocityTemplateTest . _TEST_VALUE , result )
testGetForeignKeyAttributeMap_NoNullChildAttributeName ( ) { wrap = new org . kuali . rice . krad . data . provider . DataObjectWrapperBaseTest . DataObjectWrapperImpl < org . kuali . rice . krad . data . provider . DataObjectWrapperBaseTest . DataObject > ( dataObject , dataObject5Metadata , dataObjectService , referenceLinker ) ; final java . util . Map < java . lang . String , java . lang . Object > result = wrap . getForeignKeyAttributeMap ( "dataObject2" ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return this . delegate . get ( key ) ; }
org . junit . Assert . assertTrue ( ( ( result . get ( ( ( java . lang . String ) ( null ) ) ) ) == null ) )
offsetDateTimeTest ( ) { com . salesforce . grpc . contrib . OffsetDateTime odt1 = com . salesforce . grpc . contrib . OffsetDateTime . now ( com . salesforce . grpc . contrib . Clock . systemUTC ( ) ) ; com . salesforce . grpc . contrib . OffsetDateTime odt2 = com . salesforce . grpc . contrib . MoreTimestamps . toOffsetDateTimeUtc ( com . salesforce . grpc . contrib . MoreTimestamps . fromOffsetDateTimeUtc ( odt1 ) ) ; "<AssertPlaceHolder>" ; } fromOffsetDateTimeUtc ( java . time . OffsetDateTime ) { checkNotNull ( offsetDateTime , "offsetDateTime" ) ; return com . salesforce . grpc . contrib . MoreTimestamps . fromInstantUtc ( offsetDateTime . toInstant ( ) ) ; }
org . junit . Assert . assertEquals ( odt1 , odt2 )
testProcessing ( ) { final java . io . File inputFile1 = org . esa . s1tbx . commons . test . TestData . inputASAR_IMM ; if ( ! ( inputFile1 . exists ( ) ) ) { org . esa . snap . engine_utilities . util . TestUtils . skipTest ( this , ( inputFile1 + "<sp>not<sp>found" ) ) ; return ; } final org . esa . snap . core . datamodel . Product sourceProduct1 = org . esa . snap . engine_utilities . util . TestUtils . readSourceProduct ( inputFile1 ) ; final java . io . File inputFile2 = org . esa . s1tbx . commons . test . TestData . inputASAR_IMMSub ; if ( ! ( inputFile2 . exists ( ) ) ) { org . esa . snap . engine_utilities . util . TestUtils . skipTest ( this , ( inputFile2 + "<sp>not<sp>found" ) ) ; return ; } final org . esa . snap . core . datamodel . Product sourceProduct2 = org . esa . snap . engine_utilities . util . TestUtils . readSourceProduct ( inputFile2 ) ; final org . esa . s1tbx . sar . gpf . geometric . MosaicOp op = ( ( org . esa . s1tbx . sar . gpf . geometric . MosaicOp ) ( org . esa . s1tbx . sar . gpf . geometric . TestMosaic . spi . createOperator ( ) ) ) ; "<AssertPlaceHolder>" ; op . setSourceProducts ( sourceProduct1 , sourceProduct2 ) ; final org . esa . snap . core . datamodel . Product targetProduct = op . getTargetProduct ( ) ; org . esa . snap . engine_utilities . util . TestUtils . verifyProduct ( targetProduct , false , true , true ) ; }
org . junit . Assert . assertNotNull ( op )
testGetParametersWithDefaultEntity ( ) { org . lnu . is . domain . specoffer . SpecOffer entity = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testValidateListOrderUnsignedInt ( ) { java . util . List < tigase . xml . Element > items = new java . util . ArrayList < tigase . xml . Element > ( ) ; tigase . xmpp . Authorization result = null ; items . add ( new tigase . xml . Element ( "item" , new java . lang . String [ ] { "type" , "value" , "action" , "order" } , new java . lang . String [ ] { "subscription" , "both" , "both" 0 , "-10" } ) ) ; items . add ( new tigase . xml . Element ( "item" , new java . lang . String [ ] { "action" , "order" } , new java . lang . String [ ] { "deny" , "15" } ) ) ; result = tigase . xmpp . impl . JabberIqPrivacy . validateList ( null , items ) ; "<AssertPlaceHolder>" ; } validateList ( tigase . xmpp . XMPPResourceConnection , java . util . List ) { tigase . xmpp . Authorization result = null ; try { java . util . HashSet < java . lang . Integer > orderSet = new java . util . HashSet < java . lang . Integer > ( ) ; java . util . HashSet < java . lang . String > groups = new java . util . HashSet < java . lang . String > ( ) ; if ( session != null ) { tigase . xmpp . JID [ ] jids = tigase . xmpp . impl . JabberIqPrivacy . roster_util . getBuddies ( session ) ; if ( jids != null ) { for ( tigase . xmpp . JID jid : jids ) { java . lang . String [ ] buddyGroups = tigase . xmpp . impl . JabberIqPrivacy . roster_util . getBuddyGroups ( session , jid ) ; if ( buddyGroups != null ) { for ( java . lang . String group : buddyGroups ) { groups . add ( group ) ; } } } } } for ( tigase . xml . Element item : items ) { tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE type = tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE . all ; if ( ( item . getAttributeStaticStr ( tigase . xmpp . impl . TYPE ) ) != null ) { type = tigase . xmpp . impl . JabberIqPrivacy . ITEM_TYPE . valueOf ( item . getAttributeStaticStr ( tigase . xmpp . impl . TYPE ) ) ; } java . lang . String value = item . getAttributeStaticStr ( tigase . xmpp . impl . VALUE ) ; switch ( type ) { case jid : tigase . xmpp . JID . jidInstance ( value ) ; break ; case group : boolean matched = groups . contains ( value ) ; if ( ! matched ) { result = tigase . xmpp . Authorization . ITEM_NOT_FOUND ; } break ; case subscription : tigase . xmpp . impl . JabberIqPrivacy . ITEM_SUBSCRIPTIONS . valueOf ( value ) ; break ; case all : default : break ; } if ( result != null ) { break ; } tigase . xmpp . impl . JabberIqPrivacy . ITEM_ACTION . valueOf ( item . getAttributeStaticStr ( tigase . xmpp . impl . ACTION ) ) ; java . lang . Integer order = java . lang . Integer . parseInt ( item . getAttributeStaticStr ( tigase . xmpp . impl . ORDER ) ) ; if ( ( ( order == null ) || ( order < 0 ) ) || ( ! ( orderSet . add ( order ) ) ) ) { result = tigase . xmpp . Authorization . BAD_REQUEST ; } if ( result != null ) { break ; } } } catch ( java . lang . Exception ex ) { result = tigase . xmpp . Authorization . BAD_REQUEST ; } return result ; }
org . junit . Assert . assertEquals ( Authorization . BAD_REQUEST , result )
shouldClearDataBaseUsingEmptyDataSet ( ) { org . jooq . DSLContext dsl = org . jooq . impl . DSL . using ( JooqDBUnitTest . connection ) ; int size = dsl . fetchCount ( Tables . AUTHOR ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , size )
testListByActiveOnInTheMiddle ( ) { java . util . Date activeOn = org . candlepin . test . TestUtil . createDate ( 2011 , 2 , 2 ) ; org . candlepin . model . Pool pool = org . candlepin . test . TestUtil . createPool ( owner , product ) ; pool . setStartDate ( org . candlepin . test . TestUtil . createDate ( 2011 , 1 , 2 ) ) ; pool . setEndDate ( org . candlepin . test . TestUtil . createDate ( 2011 , 3 , 2 ) ) ; poolCurator . create ( pool ) ; "<AssertPlaceHolder>" ; } listAvailableEntitlementPools ( org . candlepin . model . Consumer , java . lang . String , java . util . Collection , java . util . Date ) { return listAvailableEntitlementPools ( c , ownerId , productIds , null , activeOn , new org . candlepin . model . PoolFilterBuilder ( ) , null , false , false , false , null ) . getPageData ( ) ; }
org . junit . Assert . assertEquals ( 1 , poolCurator . listAvailableEntitlementPools ( null , owner , ( ( java . util . Collection < java . lang . String > ) ( null ) ) , activeOn ) . size ( ) )
testRemove ( ) { com . liferay . asset . category . property . model . AssetCategoryProperty newAssetCategoryProperty = addAssetCategoryProperty ( ) ; _persistence . remove ( newAssetCategoryProperty ) ; com . liferay . asset . category . property . model . AssetCategoryProperty existingAssetCategoryProperty = _persistence . fetchByPrimaryKey ( newAssetCategoryProperty . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingAssetCategoryProperty )
testFalseLegeIdentificatienummers ( ) { setup ( true , true ) ; org . mockito . Mockito . when ( persoon . getAdministratienummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . ANUMMER ) ; org . mockito . Mockito . when ( persoon . getBurgerservicenummer ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BSN ) ; org . mockito . Mockito . when ( persoon . getDatumGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . GEBOORTE_DATUM . intValue ( ) ) ; org . mockito . Mockito . when ( persoon . getBuitenlandsePlaatsGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BUITENLANDSE_GEBOORTE_PLAATS ) ; org . mockito . Mockito . when ( persoon . getLandOfGebiedGeboorte ( ) ) . thenReturn ( nl . bzk . migratiebrp . synchronisatie . runtime . service . toevalligegebeurtenis . controle . persoon . PersoonControleTest . BUITENLANDSE_GEBOORTE_LAND ) ; final nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht verzoek = new nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ( ) ; "<AssertPlaceHolder>" ; } controleer ( nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . Persoon , nl . bzk . migratiebrp . bericht . model . sync . impl . VerwerkToevalligeGebeurtenisVerzoekBericht ) { final nl . bzk . migratiebrp . bericht . model . sync . generated . PersoonType persoon = verzoek . getPersoon ( ) ; if ( persoon == null ) { return false ; } return rootPersoon . getPersoonOverlijdenHistorieSet ( ) . isEmpty ( ) ; }
org . junit . Assert . assertFalse ( subject . controleer ( persoon , verzoek ) )
nullQuery ( ) { java . util . List < org . jboss . hal . ballroom . autocomplete . ReadChildrenResult > results = resultProcessor . processToModel ( null , nodes ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( results . isEmpty ( ) )
namedQuery ( ) { javax . persistence . EntityManager em = entityManagerFactory . createEntityManager ( ) ; em . getTransaction ( ) . begin ( ) ; com . datastax . hectorjpa . bean . Store fifth = new com . datastax . hectorjpa . bean . Store ( ) ; fifth . setName ( "namedQuery-5" ) ; em . persist ( fifth ) ; com . datastax . hectorjpa . bean . Store fourth = new com . datastax . hectorjpa . bean . Store ( ) ; fourth . setName ( "namedQuery-4" ) ; em . persist ( fourth ) ; com . datastax . hectorjpa . bean . Store third = new com . datastax . hectorjpa . bean . Store ( ) ; third . setName ( "namedQuery-3" ) ; em . persist ( third ) ; System . out . println ( third . getName ( ) ) ; com . datastax . hectorjpa . bean . Store second = new com . datastax . hectorjpa . bean . Store ( ) ; second . setName ( "namedQuery-2" ) ; em . persist ( second ) ; com . datastax . hectorjpa . bean . Store first = new com . datastax . hectorjpa . bean . Store ( ) ; first . setName ( "namedQuery-1" ) ; em . persist ( first ) ; em . getTransaction ( ) . commit ( ) ; em . close ( ) ; javax . persistence . EntityManager em2 = entityManagerFactory . createEntityManager ( ) ; em2 . getTransaction ( ) . begin ( ) ; javax . persistence . Query query = em2 . createNamedQuery ( "byname" ) ; query . setParameter ( "n" , "namedQuery-3" ) ; com . datastax . hectorjpa . bean . Store found = ( ( com . datastax . hectorjpa . bean . Store ) ( query . getResultList ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; em2 . getTransaction ( ) . commit ( ) ; em2 . close ( ) ; } get ( me . prettyprint . cassandra . service . OperationType ) { return com . datastax . hectorjpa . consitency . JPAConsistency . get ( ) ; }
org . junit . Assert . assertEquals ( third , found )
testSmallImport ( ) { theory . intervals . EqualitySolver ba = new theory . intervals . EqualitySolver ( ) ; automata . svpa . SVPA < theory . characters . ICharPred , java . lang . Character > cfgAutomaton = getCFGAutomata ( ba ) ; try { automata . svpa . ImportCharSVPA . importSVPA ( cfgAutomaton . toString ( ) ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } } toString ( ) { java . lang . String s = "" ; s = ( ( ( ( "SFT<sp>product:<sp>" + ( getMoves ( ) . size ( ) ) ) + "<sp>transitions,<sp>" ) + ( getStates ( ) . size ( ) ) ) + "<sp>states" ) + "\n" ; s += "Transitions<sp>\n" ; for ( automata . Move < P , S > t : getMoves ( ) ) s = ( s + t ) + "\n" ; s += "Initial<sp>State<sp>\n" ; s = ( s + ( getInitialState ( ) ) ) + "\n" ; s += "Final<sp>States<sp>\n" ; for ( java . lang . Integer fs : getFinalStates ( ) ) if ( ( getFinalStatesAndTails ( ) . get ( fs ) ) == null ) s = ( s + fs ) + "\n" ; else s = ( ( ( s + fs ) + "<sp>" ) + ( getFinalStatesAndTails ( ) . get ( fs ) ) ) + "\n" ; return s ; }
org . junit . Assert . assertTrue ( false )
copyByteArrayValidWriterNullEncodingNegBufSz ( ) { java . lang . String probe = "A<sp>string<sp>⍅ï" ; java . io . StringWriter writer = new org . apache . maven . shared . utils . io . IOUtilTest . DontCloseStringWriter ( ) ; org . apache . maven . shared . utils . io . IOUtil . copy ( probe . getBytes ( ) , writer , null , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "ReportSet{id='" + ( getId ( ) ) ) + "',<sp>reports=" ) + ( reports ) ) + "}" ; }
org . junit . Assert . assertThat ( writer . toString ( ) . getBytes ( ) , org . hamcrest . CoreMatchers . is ( probe . getBytes ( ) ) )
testAvailable ( ) { final com . allanbank . mongodb . bson . Document seed = com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addBinary ( "juuid" , ( ( byte ) ( 3 ) ) , com . allanbank . mongodb . bson . io . BsonInputStreamTest . LEGACY_UUID_BYTES ) . addBinary ( "uuid" , ( ( byte ) ( 4 ) ) , com . allanbank . mongodb . bson . io . BsonInputStreamTest . STANDARD_UUID_BYTES ) . build ( ) ; final java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; final com . allanbank . mongodb . bson . io . BsonOutputStream bout = new com . allanbank . mongodb . bson . io . BsonOutputStream ( out ) ; bout . writeDocument ( seed ) ; final java . io . ByteArrayInputStream in = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; final com . allanbank . mongodb . bson . io . BsonInputStream reader = new com . allanbank . mongodb . bson . io . BsonInputStream ( in ) ; "<AssertPlaceHolder>" ; reader . close ( ) ; } available ( ) { return ( availableInBuffer ( ) ) + ( myInput . available ( ) ) ; }
org . junit . Assert . assertEquals ( out . toByteArray ( ) . length , reader . available ( ) )
testGetCheckable_onVirtual_resolvesItem ( ) { grid = new org . eclipse . nebula . widgets . grid . Grid ( shell , org . eclipse . swt . SWT . VIRTUAL ) ; grid . setItemCount ( 1 ) ; org . eclipse . nebula . widgets . grid . GridItem item = grid . getItem ( 0 ) ; item . getCheckable ( 0 ) ; "<AssertPlaceHolder>" ; } isResolved ( ) { return parent . isVirtual ( ) ? ( data ) != null : true ; }
org . junit . Assert . assertTrue ( item . isResolved ( ) )
testTextPrivateField ( ) { org . jivesoftware . smackx . FormField field = new org . jivesoftware . smackx . FormField ( "abc<sp>def" ) ; field . setType ( "text-private" ) ; field . addValue ( org . apache . vysper . console . HtmlFormBuilderTest . VALUE1 ) ; form . addField ( field ) ; java . lang . String actual = builder . build ( form ) ; java . lang . String expected = "<p><input<sp>id='abc-def'<sp>name='abc<sp>def'<sp>value='Value<sp>1'<sp>type='password'<sp>/></p>" ; "<AssertPlaceHolder>" ; } build ( java . util . Map ) { org . jivesoftware . smackx . packet . AdHocCommandData commandData = new org . jivesoftware . smackx . packet . AdHocCommandData ( ) ; commandData . setSessionID ( getSingleValue ( parameters , AdminConsoleController . SESSION_FIELD ) ) ; org . jivesoftware . smackx . packet . DataForm form = new org . jivesoftware . smackx . packet . DataForm ( "submit" ) ; for ( java . util . Map . Entry < java . lang . String , java . lang . String [ ] > entry : parameters . entrySet ( ) ) { if ( ! ( AdminConsoleController . SESSION_FIELD . equals ( entry . getKey ( ) ) ) ) { org . jivesoftware . smackx . FormField field = new org . jivesoftware . smackx . FormField ( entry . getKey ( ) ) ; for ( java . lang . String value : entry . getValue ( ) ) { java . lang . String [ ] splitValues = value . split ( "[\\r\\n]+" ) ; for ( java . lang . String splitValue : splitValues ) { field . addValue ( splitValue ) ; } } form . addField ( field ) ; } } commandData . setForm ( form ) ; return commandData ; }
org . junit . Assert . assertEquals ( expected , actual )
testAnalyzeBackDefaultPropPoint ( ) { org . orbisgis . legend . thematic . proportional . ProportionalPoint pp = new org . orbisgis . legend . thematic . proportional . ProportionalPoint ( ) ; org . orbisgis . coremap . renderer . se . PointSymbolizer ps = ( ( org . orbisgis . coremap . renderer . se . PointSymbolizer ) ( pp . getSymbolizer ( ) ) ) ; org . orbisgis . legend . Legend leg = ( ( org . orbisgis . legend . Legend ) ( new org . orbisgis . legend . analyzer . symbolizers . PointSymbolizerAnalyzer ( ps ) . getLegend ( ) ) ) ; "<AssertPlaceHolder>" ; } getLegend ( ) { return legend ; }
org . junit . Assert . assertTrue ( ( leg instanceof org . orbisgis . legend . thematic . proportional . ProportionalPoint ) )
testSimpleNoDecimals ( ) { org . apache . commons . math3 . geometry . euclidean . threed . Vector3D c = new org . apache . commons . math3 . geometry . euclidean . threed . Vector3D ( 1 , 1 , 1 ) ; java . lang . String expected = "{1;<sp>1;<sp>1}" ; java . lang . String actual = vector3DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldSaveAndLoadEntityMappedWithCpfUserType ( ) { org . hibernate . Session session = br . com . caelum . stella . usertype . CpfUserTypeTest . factory . openSession ( ) ; org . hibernate . Transaction transaction = session . beginTransaction ( ) ; br . com . caelum . stella . usertype . PessoaFisica pessoa = new br . com . caelum . stella . usertype . PessoaFisica ( ) ; br . com . caelum . stella . tinytype . CPF cpf = new br . com . caelum . stella . tinytype . CPF ( "555.555.555-55" ) ; pessoa . setCpf ( cpf ) ; session . save ( pessoa ) ; transaction . commit ( ) ; session . flush ( ) ; session . close ( ) ; session = br . com . caelum . stella . usertype . CpfUserTypeTest . factory . openSession ( ) ; java . lang . Long id = pessoa . getId ( ) ; br . com . caelum . stella . usertype . PessoaFisica load = ( ( br . com . caelum . stella . usertype . PessoaFisica ) ( session . load ( br . com . caelum . stella . usertype . PessoaFisica . class , id ) ) ) ; "<AssertPlaceHolder>" ; } getCpf ( ) { return cpf ; }
org . junit . Assert . assertEquals ( cpf , load . getCpf ( ) )
doFillAvailabilityZoneItemsGivenNoSupportForAZsThenGivesEmptyList ( ) { final jenkins . plugins . openstack . compute . internal . Openstack os = j . fakeOpenstackFactory ( ) ; final java . lang . String openstackAuth = j . dummyCredential ( ) ; doThrow ( new java . lang . RuntimeException ( "OpenStack<sp>said<sp>no" ) ) . when ( os ) . getAvailabilityZones ( ) ; final hudson . util . ComboBoxModel actual = d . doFillAvailabilityZoneItems ( "az2Name" , "OSurl" , false , openstackAuth , "OSzone" ) ; "<AssertPlaceHolder>" ; } doFillAvailabilityZoneItems ( java . lang . String , java . lang . String , boolean , java . lang . String , java . lang . String ) { jenkins . model . Jenkins . get ( ) . checkPermission ( Jenkins . ADMINISTER ) ; final hudson . util . ComboBoxModel m = new hudson . util . ComboBoxModel ( ) ; try { jenkins . plugins . openstack . compute . auth . OpenstackCredential openstackCredential = jenkins . plugins . openstack . compute . auth . OpenstackCredentials . getCredential ( credentialId ) ; if ( haveAuthDetails ( endPointUrl , openstackCredential , zone ) ) { final jenkins . plugins . openstack . compute . internal . Openstack openstack = Openstack . Factory . get ( endPointUrl , ignoreSsl , openstackCredential , zone ) ; for ( final org . openstack4j . model . compute . ext . AvailabilityZone az : openstack . getAvailabilityZones ( ) ) { final java . lang . String value = az . getZoneName ( ) ; m . add ( value ) ; } } } catch ( org . openstack4j . api . exceptions . AuthenticationException | hudson . util . FormValidation | org . openstack4j . api . exceptions . ConnectionException ex ) { jenkins . plugins . openstack . compute . SlaveOptionsDescriptor . LOGGER . log ( Level . FINEST , "Openstack<sp>call<sp>failed" , ex ) ; } catch ( java . lang . Exception ex ) { jenkins . plugins . openstack . compute . SlaveOptionsDescriptor . LOGGER . log ( Level . SEVERE , ex . getMessage ( ) , ex ) ; } return m ; }
org . junit . Assert . assertEquals ( 0 , actual . size ( ) )
testFairSchedulerContinuousSchedulingInitTime ( ) { scheduler . start ( ) ; int priorityValue ; org . apache . hadoop . yarn . api . records . Priority priority ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FSAppAttempt fsAppAttempt ; org . apache . hadoop . yarn . api . records . ResourceRequest request1 ; org . apache . hadoop . yarn . api . records . ResourceRequest request2 ; org . apache . hadoop . yarn . api . records . ApplicationAttemptId id11 ; priorityValue = 1 ; id11 = createAppAttemptId ( 1 , 1 ) ; createMockRMApp ( id11 ) ; priority = org . apache . hadoop . yarn . api . records . Priority . newInstance ( priorityValue ) ; org . apache . hadoop . yarn . server . resourcemanager . placement . ApplicationPlacementContext placementCtx = new org . apache . hadoop . yarn . server . resourcemanager . placement . ApplicationPlacementContext ( "root.queue1" ) ; scheduler . addApplication ( id11 . getApplicationId ( ) , "root.queue1" , "user1" , false , placementCtx ) ; scheduler . addApplicationAttempt ( id11 , false , false ) ; fsAppAttempt = scheduler . getApplicationAttempt ( id11 ) ; java . lang . String hostName = "127.0.0.1" ; org . apache . hadoop . yarn . server . resourcemanager . rmnode . RMNode node1 = org . apache . hadoop . yarn . server . resourcemanager . MockNodes . newNodeInfo ( 1 , org . apache . hadoop . yarn . util . resource . Resources . createResource ( ( 16 * 1024 ) , 16 ) , 1 , hostName ) ; java . util . List < org . apache . hadoop . yarn . api . records . ResourceRequest > ask1 = new java . util . ArrayList ( ) ; request1 = createResourceRequest ( 1024 , 8 , node1 . getRackName ( ) , priorityValue , 1 , true ) ; request2 = createResourceRequest ( 1024 , 8 , ResourceRequest . ANY , priorityValue , 1 , true ) ; ask1 . add ( request1 ) ; ask1 . add ( request2 ) ; scheduler . allocate ( id11 , ask1 , null , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) , null , null , org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . NULL_UPDATE_REQUESTS ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeAddedSchedulerEvent nodeEvent1 = new org . apache . hadoop . yarn . server . resourcemanager . scheduler . event . NodeAddedSchedulerEvent ( node1 ) ; scheduler . handle ( nodeEvent1 ) ; org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . FSSchedulerNode node = scheduler . getSchedulerNode ( node1 . getNodeID ( ) ) ; mockClock . tickSec ( ( ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . TestContinuousScheduling . delayThresholdTimeMs ) / 1000 ) ) ; scheduler . attemptScheduling ( node ) ; java . util . Map < org . apache . hadoop . yarn . server . scheduler . SchedulerRequestKey , java . lang . Long > lastScheduledContainer = fsAppAttempt . getLastScheduledContainer ( ) ; long initSchedulerTime = lastScheduledContainer . get ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . TestUtils . toSchedulerKey ( priority ) ) ; "<AssertPlaceHolder>" ; } toSchedulerKey ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . Priority ) { return org . apache . hadoop . yarn . server . scheduler . SchedulerRequestKey . create ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . capacity . ResourceRequest . newInstance ( pri , null , null , 0 ) ) ; }
org . junit . Assert . assertEquals ( org . apache . hadoop . yarn . server . resourcemanager . scheduler . fair . TestContinuousScheduling . delayThresholdTimeMs , initSchedulerTime )
testMetKindMetOuderschap ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = brby0178 . voerRegelUit ( bouwHuidigeSituatie ( true , true ) , null , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , berichtEntiteiten . size ( ) )
stuff ( ) { final org . zapodot . junit . db . EmbeddedDatabaseRule embeddedDatabaseRule = org . zapodot . junit . db . EmbeddedDatabaseRule . h2 ( ) . initializedByPlugin ( org . zapodot . junit . db . plugin . LiquibaseInitializer . builder ( ) . withChangelogResource ( "example-fails.xml" ) . build ( ) ) . build ( ) ; final org . junit . runner . Description testDescription = org . junit . runner . Description . createTestDescription ( getClass ( ) , "Test" ) ; final org . junit . runners . model . Statement appliedStatement = embeddedDatabaseRule . apply ( statement , testDescription ) ; "<AssertPlaceHolder>" ; appliedStatement . evaluate ( ) ; } apply ( org . junit . runners . model . Statement , org . junit . runner . Description ) { warnIfNameIsPredifinedAndTheRuleIsMethodBased ( description ) ; return statement ( base , ( ( predefinedName ) != null ? predefinedName : extractNameFromDescription ( description ) ) ) ; }
org . junit . Assert . assertNotNull ( appliedStatement )
testInvalidURIGetPath ( ) { final java . net . URI uri = java . net . URI . create ( "git:///master@new-get-repo-name/home" ) ; try { provider . getPath ( uri ) ; failBecauseExceptionWasNotThrown ( org . uberfire . java . nio . fs . jgit . IllegalArgumentException . class ) ; } catch ( final java . lang . IllegalArgumentException ex ) { "<AssertPlaceHolder>" . isEqualTo ( "Parameter<sp>named<sp>'uri'<sp>is<sp>invalid,<sp>missing<sp>host<sp>repository!" ) ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertThat ( ex . getMessage ( ) )
testConstructOut ( ) { com . ewcms . publication . freemarker . directive . out . article . RelationsDirectiveOut out = new com . ewcms . publication . freemarker . directive . out . article . RelationsDirectiveOut ( ) ; java . lang . String outValue = out . constructOut ( initRelateds ( ) , null , null ) ; java . lang . String expected = "<ul>" + ( ( "<li><a<sp>href=\"/index.html\"<sp>title=\"test\"<sp>target=\"_blank\">test</a></li>" + "<li><a<sp>href=\"/index1.html\"<sp>title=\"test1\"<sp>target=\"_blank\">test1</a></li>" ) + "</ul>" ) ; "<AssertPlaceHolder>" ; } initRelateds ( ) { java . util . List < com . ewcms . content . document . model . Relation > list = new java . util . ArrayList < com . ewcms . content . document . model . Relation > ( ) ; com . ewcms . content . document . model . Relation r = new com . ewcms . content . document . model . Relation ( ) ; com . ewcms . content . document . model . Article article = new com . ewcms . content . document . model . Article ( ) ; article . setUrl ( "/index.html" ) ; article . setTitle ( "test" ) ; r . setArticle ( article ) ; list . add ( r ) ; r = new com . ewcms . content . document . model . Relation ( ) ; article = new com . ewcms . content . document . model . Article ( ) ; article . setUrl ( "/index1.html" ) ; article . setTitle ( "test1" ) ; r . setArticle ( article ) ; list . add ( r ) ; return list ; }
org . junit . Assert . assertEquals ( expected , outValue )
testConstructorAndGetterWithProperDataAndProperDataReturned ( ) { org . dspace . app . rest . model . hateoas . FacetConfigurationResource facetConfigurationResource = new org . dspace . app . rest . model . hateoas . FacetConfigurationResource ( facetConfigurationRest ) ; "<AssertPlaceHolder>" ; } getContent ( ) { return super . getContent ( ) ; }
org . junit . Assert . assertEquals ( facetConfigurationRest , facetConfigurationResource . getContent ( ) )
testMessage ( ) { java . lang . String message = "Error!" ; java . lang . Exception e = new org . kocakosm . pitaya . util . CannotHappenException ( message ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( message , e . getMessage ( ) )
testModuleHandlersOrderingAfterConfigIsInitialized ( ) { org . axonframework . config . ModuleConfiguration module1 = mock ( org . axonframework . config . ModuleConfiguration . class ) ; org . axonframework . config . ModuleConfiguration module2 = mock ( org . axonframework . config . ModuleConfiguration . class ) ; org . axonframework . config . ModuleConfiguration module3 = mock ( org . axonframework . config . ModuleConfiguration . class ) ; when ( module1 . phase ( ) ) . thenReturn ( 2 ) ; when ( module2 . phase ( ) ) . thenReturn ( 3 ) ; when ( module3 . phase ( ) ) . thenReturn ( 1 ) ; org . axonframework . config . Configurer configurer = org . axonframework . config . DefaultConfigurer . defaultConfiguration ( ) ; org . axonframework . config . Configuration configuration = configurer . buildConfiguration ( ) ; configurer . registerModule ( module1 ) . registerModule ( module2 ) . registerModule ( module3 ) ; configuration . start ( ) ; "<AssertPlaceHolder>" ; configuration . shutdown ( ) ; org . axonframework . config . InOrder inOrder = inOrder ( module1 , module2 , module3 ) ; inOrder . verify ( module3 ) . start ( ) ; inOrder . verify ( module1 ) . start ( ) ; inOrder . verify ( module2 ) . start ( ) ; inOrder . verify ( module2 ) . shutdown ( ) ; inOrder . verify ( module1 ) . shutdown ( ) ; inOrder . verify ( module3 ) . shutdown ( ) ; } start ( ) { config . start ( ) ; this . running = true ; }
org . junit . Assert . assertNotNull ( configuration )
testCreateMerger ( ) { com . ctrip . platform . dal . dao . task . CombinedInsertTask < com . ctrip . platform . dal . dao . task . ClientTestModel > test = new com . ctrip . platform . dal . dao . task . CombinedInsertTask ( ) ; "<AssertPlaceHolder>" ; } createMerger ( ) { return new com . ctrip . platform . dal . dao . task . ShardedIntResultMerger ( ) ; }
org . junit . Assert . assertNotNull ( test . createMerger ( ) )
testIsUnionOnUnionWithOneElement ( ) { org . apache . avro . Schema schema = org . apache . avro . Schema . createUnion ( org . apache . avro . Schema . create ( Type . LONG ) ) ; "<AssertPlaceHolder>" ; } isUnion ( ) { return ( this ) instanceof org . apache . avro . Schema . UnionSchema ; }
org . junit . Assert . assertTrue ( schema . isUnion ( ) )
testSerialization ( ) { org . jfree . chart . annotations . XYDrawableAnnotation a1 = new org . jfree . chart . annotations . XYDrawableAnnotation ( 10.0 , 20.0 , 100.0 , 200.0 , new org . jfree . chart . annotations . XYDrawableAnnotationTest . TestDrawable ( ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( a1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . annotations . XYDrawableAnnotation a2 = ( ( org . jfree . chart . annotations . XYDrawableAnnotation ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( a1 , a2 )
getAllTranslatorsTest_ModelWithNoGenerators ( ) { java . util . Map < java . lang . String , cruise . umple . compiler . CodeTranslator > allTranslators = model . getAllTranslators ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( m_Count ) == 0 ; }
org . junit . Assert . assertTrue ( allTranslators . isEmpty ( ) )
testSizeOfWithNoSet ( ) { java . lang . String key = "test" ; long actualSize = this . state . sizeOf ( key ) ; "<AssertPlaceHolder>" ; } sizeOf ( K ) { return template . sizeOf ( id , key ) ; }
org . junit . Assert . assertEquals ( 0 , actualSize )
testGetWCsAnalysedForSpecificAppNull ( ) { stats . analyseWC ( null ) ; int expectedLoopCount = 0 ; int loopCount = 0 ; for ( java . util . Iterator < com . github . bordertech . wcomponents . WComponent > resultWcs = stats . getWCsAnalysed ( ) ; resultWcs . hasNext ( ) ; loopCount ++ ) { org . junit . Assert . fail ( "there<sp>should<sp>be<sp>no<sp>analysed<sp>components" ) ; } "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; }
org . junit . Assert . assertEquals ( "there<sp>should<sp>be<sp>no<sp>analysed<sp>components" , expectedLoopCount , loopCount )
getLocalHostName ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( java . net . InetAddress . class ) ; org . mockito . BDDMockito . given ( java . net . InetAddress . getLocalHost ( ) ) . willThrow ( java . net . UnknownHostException . class ) ; java . lang . String localHostName = com . aliyuncs . utils . LogUtils . getLocalHostName ( ) ; "<AssertPlaceHolder>" ; } getLocalHostName ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( java . net . InetAddress . class ) ; org . mockito . BDDMockito . given ( java . net . InetAddress . getLocalHost ( ) ) . willThrow ( java . net . UnknownHostException . class ) ; java . lang . String localHostName = com . aliyuncs . utils . LogUtils . getLocalHostName ( ) ; org . junit . Assert . assertEquals ( "unknown<sp>host<sp>name" , localHostName ) ; }
org . junit . Assert . assertEquals ( "unknown<sp>host<sp>name" , localHostName )
testSetValueToDataset ( ) { org . talend . dataprofiler . common . ui . editor . preview . CustomerDefaultCategoryDataset customerdataset = new org . talend . dataprofiler . common . ui . editor . preview . CustomerDefaultCategoryDataset ( ) ; org . talend . dq . indicators . ext . FrequencyExt fre = new org . talend . dq . indicators . ext . FrequencyExt ( ) ; fre . setKey ( 2 ) ; fre . setValue ( 3L ) ; fre . setFrequency ( 0.33 ) ; benState . setValueToDataset ( customerdataset , fre , "2" ) ; java . lang . Number n = org . talend . dataprofiler . core . ui . utils . TOPChartUtils . getInstance ( ) . getValue ( customerdataset . getDataset ( ) , 0 , 0 ) ; "<AssertPlaceHolder>" ; } getDataset ( ) { return dataset ; }
org . junit . Assert . assertEquals ( 0.33 , n )
testBuildPasswordHashNoSaltNoIterations ( ) { org . junit . Assume . assumeFalse ( org . apache . jackrabbit . oak . spi . security . user . util . PasswordUtil . DEFAULT_ALGORITHM . startsWith ( PasswordUtil . PBKDF2_PREFIX ) ) ; java . lang . String jr2Hash = ( ( "{" + ( org . apache . jackrabbit . oak . spi . security . user . util . PasswordUtil . DEFAULT_ALGORITHM ) ) + "}" ) + ( org . apache . jackrabbit . util . Text . digest ( org . apache . jackrabbit . oak . spi . security . user . util . PasswordUtil . DEFAULT_ALGORITHM , "pw" . getBytes ( "utf-8" ) ) ) ; "<AssertPlaceHolder>" ; } isSame ( java . lang . String , char [ ] ) { return org . apache . jackrabbit . oak . spi . security . user . util . PasswordUtil . isSame ( hashedPassword , java . lang . String . valueOf ( password ) ) ; }
org . junit . Assert . assertTrue ( org . apache . jackrabbit . oak . spi . security . user . util . PasswordUtil . isSame ( jr2Hash , "pw" ) )
testSayHelloNegative2 ( ) { java . lang . String result = null ; try { result = authServiceDirectCallTokenWrong . sayHello ( ) ; System . out . println ( result ) ; } catch ( com . baidu . beidou . navi . exception . rpc . AuthAccessDeniedException e ) { "<AssertPlaceHolder>" ; return ; } org . junit . Assert . fail ( "should<sp>not<sp>get<sp>here" ) ; } getName ( ) { return util . getName ( ) ; }
org . junit . Assert . assertThat ( e . getClass ( ) . getName ( ) , org . hamcrest . Matchers . is ( com . baidu . beidou . navi . exception . rpc . AuthAccessDeniedException . class . getName ( ) ) )
getAccessId ( ) { java . lang . String securityName = "securityName" ; java . lang . String accessId = "user:realm/uniqueId" ; com . ibm . ws . security . authentication . principals . WSPrincipal principal = new com . ibm . ws . security . authentication . principals . WSPrincipal ( securityName , accessId , WSPrincipal . AUTH_METHOD_PASSWORD ) ; "<AssertPlaceHolder>" ; } getAccessId ( ) { java . lang . String securityName = "securityName" ; java . lang . String accessId = "user:realm/uniqueId" ; com . ibm . ws . security . authentication . principals . WSPrincipal principal = new com . ibm . ws . security . authentication . principals . WSPrincipal ( securityName , accessId , WSPrincipal . AUTH_METHOD_PASSWORD ) ; org . junit . Assert . assertEquals ( "getAccessId()<sp>should<sp>be<sp>the<sp>accessId<sp>specified<sp>in<sp>the<sp>constructor" , accessId , principal . getAccessId ( ) ) ; }
org . junit . Assert . assertEquals ( "getAccessId()<sp>should<sp>be<sp>the<sp>accessId<sp>specified<sp>in<sp>the<sp>constructor" , accessId , principal . getAccessId ( ) )
testGetPasswordNoUserCredentialName ( ) { java . lang . String result = relationalTableRegistrationHelperServiceImpl . getPassword ( new org . finra . herd . model . dto . RelationalStorageAttributesDto ( JDBC_URL , USERNAME , NO_USER_CREDENTIAL_NAME ) ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertNull ( result )
skillViolationOnSolution_shouldWork ( ) { jsprit . core . analysis . SolutionAnalyser analyser = new jsprit . core . analysis . SolutionAnalyser ( vrp , solution , new jsprit . core . problem . cost . TransportDistance ( ) { @ jsprit . core . analysis . Override public double getDistance ( jsprit . core . problem . Location from , jsprit . core . problem . Location to ) { return vrp . getTransportCosts ( ) . getTransportCost ( from , to , 0.0 , null , null ) ; } } ) ; java . lang . Boolean violated = analyser . hasSkillConstraintViolation ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( violated )
testInlineRemoval ( ) { com . oculusinfo . geometry . geodesic . Position p0 = new com . oculusinfo . geometry . geodesic . Position ( 4 , 28 ) ; com . oculusinfo . geometry . geodesic . Position p1 = new com . oculusinfo . geometry . geodesic . Position ( ( - 17 ) , 42 ) ; double azimuth = p0 . getAzimuth ( p1 ) ; double distance = p0 . getAngularDistance ( p1 ) ; com . oculusinfo . geometry . geodesic . Position pa = p0 . offset ( azimuth , ( 0.25 * distance ) ) ; com . oculusinfo . geometry . geodesic . Position pb = p0 . offset ( azimuth , ( 0.5 * distance ) ) ; com . oculusinfo . geometry . geodesic . Position pc = p0 . offset ( azimuth , ( 0.75 * distance ) ) ; com . oculusinfo . geometry . geodesic . PositionCalculationParameters params = new com . oculusinfo . geometry . geodesic . PositionCalculationParameters ( PositionCalculationType . Geodetic , 1.0E-12 , 1.0E-12 , false ) ; com . oculusinfo . geometry . geodesic . Track track = new com . oculusinfo . geometry . geodesic . tracks . GeodeticTrack ( params , p0 , pa , pb , pc , p1 ) ; "<AssertPlaceHolder>" ; } getPoints ( ) { return _points ; }
org . junit . Assert . assertEquals ( 2 , track . getPoints ( ) . size ( ) )
shouldMutateASingleVariableSolutionReturnTheSameSolutionIfProbabilityIsZero ( ) { double mutationProbability = 0.0 ; double distributionIndex = 20.0 ; org . uma . jmetal . operator . impl . mutation . PolynomialMutation mutation = new org . uma . jmetal . operator . impl . mutation . PolynomialMutation ( mutationProbability , distributionIndex ) ; org . uma . jmetal . problem . DoubleProblem problem = new org . uma . jmetal . operator . impl . mutation . PolynomialMutationTest . MockDoubleProblem ( 1 ) ; org . uma . jmetal . solution . DoubleSolution solution = problem . createSolution ( ) ; org . uma . jmetal . solution . DoubleSolution oldSolution = ( ( org . uma . jmetal . solution . DoubleSolution ) ( solution . copy ( ) ) ) ; mutation . execute ( solution ) ; "<AssertPlaceHolder>" ; } execute ( org . uma . jmetal . solution . DoubleSolution ) { if ( null == solution ) { throw new org . uma . jmetal . util . JMetalException ( "Null<sp>parameter" ) ; } doMutation ( mutationProbability , solution ) ; return solution ; }
org . junit . Assert . assertEquals ( oldSolution , solution )
testShipmentWithRateError ( ) { java . util . Map < java . lang . String , java . lang . Object > parcelMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parcelMap . put ( "weight" , 10 ) ; parcelMap . put ( "predefined_package" , "Pak" ) ; java . util . Map < java . lang . String , java . lang . Object > shipmentMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; shipmentMap . put ( "to_address" , com . easypost . EasyPostTest . defaultToAddress ) ; shipmentMap . put ( "from_address" , com . easypost . EasyPostTest . defaultFromAddress ) ; shipmentMap . put ( "parcel" , parcelMap ) ; com . easypost . Shipment shipment = com . easypost . Shipment . create ( shipmentMap ) ; "<AssertPlaceHolder>" ; } getMessages ( ) { return messages ; }
org . junit . Assert . assertNotNull ( shipment . getMessages ( ) )
testZoekMatchendeOuderBetrokkenheidMeerderePartieleMatch ( ) { final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator decorator = maakBetrokkenheid ( 20150101 , null ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator partieleMatch = maakBetrokkenheid ( 20150101 , 20150301 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator partieleMatch2 = maakBetrokkenheid ( 20150101 , 20150601 ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator geenMatch = maakBetrokkenheid ( 20150301 , null ) ; final java . util . Set < nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator > mogelijkeMatches = new java . util . LinkedHashSet ( ) ; mogelijkeMatches . add ( partieleMatch ) ; mogelijkeMatches . add ( partieleMatch2 ) ; mogelijkeMatches . add ( geenMatch ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . delta . decorators . BetrokkenheidDecorator matchingDecorator = decorator . zoekMatchendeOuderBetrokkenheid ( mogelijkeMatches ) ; "<AssertPlaceHolder>" ; } add ( T extends nl . bzk . brp . model . basis . ModelIdentificeerbaar ) { mutaties . add ( mutatie ) ; }
org . junit . Assert . assertNull ( matchingDecorator )
testProducesHistoryServerUriForAppId ( ) { final java . lang . String historyAddress = "example.net:424242" ; org . apache . hadoop . yarn . conf . YarnConfiguration conf = new org . apache . hadoop . yarn . conf . YarnConfiguration ( ) ; conf . set ( JHAdminConfig . MR_HS_HTTP_POLICY , HttpConfig . Policy . HTTP_ONLY . name ( ) ) ; conf . set ( JHAdminConfig . MR_HISTORY_WEBAPP_ADDRESS , historyAddress ) ; org . apache . hadoop . mapreduce . v2 . hs . webapp . MapReduceTrackingUriPlugin plugin = new org . apache . hadoop . mapreduce . v2 . hs . webapp . MapReduceTrackingUriPlugin ( ) ; plugin . setConf ( conf ) ; org . apache . hadoop . yarn . api . records . ApplicationId id = org . apache . hadoop . yarn . api . records . ApplicationId . newInstance ( 6384623L , 5 ) ; java . lang . String jobSuffix = id . toString ( ) . replaceFirst ( "^application_" , "job_" ) ; java . net . URI expected = new java . net . URI ( ( ( ( "http://" + historyAddress ) + "/jobhistory/job/" ) + jobSuffix ) ) ; java . net . URI actual = plugin . getTrackingUri ( id ) ; "<AssertPlaceHolder>" ; } getTrackingUri ( org . apache . hadoop . yarn . api . records . ApplicationId ) { java . lang . String jobSuffix = id . toString ( ) . replaceFirst ( "^application_" , "job_" ) ; java . lang . String historyServerAddress = org . apache . hadoop . mapreduce . v2 . util . MRWebAppUtil . getJHSWebappURLWithScheme ( getConf ( ) ) ; return new java . net . URI ( ( ( historyServerAddress + "/jobhistory/job/" ) + jobSuffix ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
shouldFailWebSocketConnectionWhenServerSendCloseFrameWithRsv4 ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
testTimeoutEarlyRegister ( ) { java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; org . nustaq . kontraktor . IPromise p = new org . nustaq . kontraktor . Promise ( ) . timeoutIn ( 1000 ) ; p . then ( new kontraktor . Callback ( ) { @ kontraktor . Override public void complete ( java . lang . Object result , java . lang . Object error ) { System . out . println ( ( ( ( "res:" + result ) + "<sp>err:" ) + error ) ) ; count . incrementAndGet ( ) ; } } ) . onTimeout ( new java . util . function . Consumer ( ) { @ kontraktor . Override public void accept ( java . lang . Object o ) { count . addAndGet ( 8 ) ; System . out . println ( "the<sp>EXPECTED<sp>timout" ) ; } } ) ; java . lang . Thread . sleep ( 2000 ) ; "<AssertPlaceHolder>" ; } get ( ) { return ( ( T ) ( result ) ) ; }
org . junit . Assert . assertTrue ( ( ( count . get ( ) ) == 9 ) )
testExistingDataConstructor ( ) { try { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "import<sp>org.eclipse.xtend.lib.annotations.Data" ) ; _builder . newLine ( ) ; _builder . append ( "@Data<sp>class<sp>Foo<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "int<sp>foo" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "new<sp>(int<sp>foo)<sp>{" ) ; _builder . newLine ( ) ; _builder . append ( "\t\t" ) ; _builder . append ( "this.foo<sp>=<sp>foo<sp>*<sp>2" ) ; _builder . newLine ( ) ; _builder . append ( "\t" ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; _builder . append ( "}" ) ; _builder . newLine ( ) ; final org . eclipse . xtext . util . IAcceptor < org . eclipse . xtext . xbase . testing . CompilationTestHelper . Result > _function = ( org . eclipse . xtext . xbase . testing . CompilationTestHelper . Result it ) -> { try { final java . lang . Object instance = it . getCompiledClass ( ) . getDeclaredConstructor ( . class ) . newInstance ( java . lang . Integer . valueOf ( 2 ) ) ; final java . lang . reflect . Method getFoo = it . getCompiledClass ( ) . getDeclaredMethod ( "getFoo" ) ; "<AssertPlaceHolder>" ; } catch ( _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( org . eclipse . xtend . core . tests . compiler . _e ) ; } } ; this . compilationTestHelper . compile ( _builder , _function ) ; } catch ( java . lang . Throwable _e ) { throw org . eclipse . xtext . xbase . lib . Exceptions . sneakyThrow ( _e ) ; } } invoke ( org . eclipse . emf . mwe2 . runtime . workflow . IWorkflowContext ) { try { java . io . File directory = new java . io . File ( path ) ; if ( ! ( directory . exists ( ) ) ) throw new java . lang . RuntimeException ( path ) ; java . io . Writer writer = null ; try { java . io . File list = new java . io . File ( directory , fileName ) ; if ( ! ( list . exists ( ) ) ) list . createNewFile ( ) ; writer = new java . io . BufferedWriter ( new java . io . FileWriter ( list ) ) ; for ( java . io . File contained : directory . listFiles ( ) ) { if ( contained . isDirectory ( ) ) { appendFilesTo ( contained , writer , directory . toURI ( ) ) ; } } } finally { if ( writer != null ) writer . close ( ) ; } } catch ( java . io . IOException ioe ) { throw new java . lang . RuntimeException ( ioe ) ; } }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 4 ) , getFoo . invoke ( instance ) )
wrappedReadOnlyDirectBuffer ( ) { java . nio . ByteBuffer buffer = java . nio . ByteBuffer . allocateDirect ( 12 ) ; for ( int i = 0 ; i < 12 ; i ++ ) { buffer . put ( ( ( byte ) ( i ) ) ) ; } buffer . flip ( ) ; io . netty . buffer . ByteBuf wrapped = wrappedBuffer ( buffer . asReadOnlyBuffer ( ) ) ; for ( int i = 0 ; i < 12 ; i ++ ) { "<AssertPlaceHolder>" ; } wrapped . release ( ) ; } readByte ( ) { if ( ! ( buffer . isReadable ( ) ) ) { throw new java . io . EOFException ( ) ; } return buffer . readByte ( ) ; }
org . junit . Assert . assertEquals ( ( ( byte ) ( i ) ) , wrapped . readByte ( ) )
testInternalComparator ( ) { java . util . List < jenkins . security . apitoken . ApiTokenStats . SingleTokenStats > tokenStatsList = java . util . Arrays . asList ( createSingleTokenStatsByReflection ( "A" , null , 0 ) , createSingleTokenStatsByReflection ( "B" , "2018-05-01<sp>09:10:59.234" , 2 ) , createSingleTokenStatsByReflection ( "C" , "2018-05-01<sp>09:10:59.234" , 3 ) , createSingleTokenStatsByReflection ( "D" , "2018-05-01<sp>09:10:59.235" , 1 ) ) ; java . lang . reflect . Field field = ApiTokenStats . SingleTokenStats . class . getDeclaredField ( "COMP_BY_LAST_USE_THEN_COUNTER" ) ; field . setAccessible ( true ) ; java . util . Comparator < jenkins . security . apitoken . ApiTokenStats . SingleTokenStats > comparator = ( ( java . util . Comparator < jenkins . security . apitoken . ApiTokenStats . SingleTokenStats > ) ( field . get ( null ) ) ) ; java . util . Collections . shuffle ( tokenStatsList , new java . util . Random ( 42 ) ) ; tokenStatsList . sort ( comparator ) ; java . util . List < java . lang . String > idList = tokenStatsList . stream ( ) . map ( ApiTokenStats . SingleTokenStats :: getTokenUuid ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } toList ( ) { return data . getView ( ) ; }
org . junit . Assert . assertThat ( idList , contains ( "A" , "B" , "C" , "D" ) )
testEquals ( ) { java . util . Arrays . asList ( "f1" , "f2" , "f3" ) ; java . util . List < java . lang . String > results = java . util . Arrays . asList ( "r1" , "r2" , "r3" ) ; java . lang . Long offset = 10L ; java . lang . Long count = 100L ; java . lang . Integer limit = 40 ; org . gbif . api . model . common . search . SearchResponse < java . lang . String , ? > searchResponse1 = new org . gbif . api . model . common . search . SearchResponse < java . lang . String , org . gbif . api . model . checklistbank . search . NameUsageSearchParameter > ( offset , limit , count , results , null ) ; org . gbif . api . model . common . search . SearchResponse < java . lang . String , ? > searchResponse2 = new org . gbif . api . model . common . search . SearchResponse < java . lang . String , org . gbif . api . model . checklistbank . search . NameUsageSearchParameter > ( offset , limit , count , results , null ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( searchResponse1 , searchResponse2 )
shouldBeAbleToReferToCreatedResource ( ) { java . lang . String jsonString = new org . neo4j . server . rest . PrettyJSON ( ) . array ( ) . object ( ) . key ( "value" 0 ) . value ( "value" 8 ) . key ( "to" ) . value ( "/node" ) . key ( "value" 3 ) . value ( 0 ) . key ( "value" 4 ) . object ( ) . key ( "value" 5 ) . value ( "bob" ) . endObject ( ) . endObject ( ) . object ( ) . key ( "value" 0 ) . value ( "value" 8 ) . key ( "to" ) . value ( "/node" ) . key ( "value" 3 ) . value ( 1 ) . key ( "value" 4 ) . object ( ) . key ( "to" 1 ) . value ( 12 ) . endObject ( ) . endObject ( ) . object ( ) . key ( "value" 0 ) . value ( "value" 8 ) . key ( "to" ) . value ( "value" 9 ) . key ( "value" 3 ) . value ( 3 ) . key ( "value" 4 ) . object ( ) . key ( "to" ) . value ( "value" 6 ) . key ( "value" 2 ) . object ( ) . key ( "value" 1 ) . value ( "2010" ) . endObject ( ) . key ( "type" ) . value ( "value" 7 ) . endObject ( ) . endObject ( ) . object ( ) . key ( "value" 0 ) . value ( "value" 8 ) . key ( "to" ) . value ( "/index/relationship/my_rels" ) . key ( "value" 3 ) . value ( 4 ) . key ( "value" 4 ) . object ( ) . key ( "key" ) . value ( "value" 1 ) . key ( "value" ) . value ( "2010" ) . key ( "to" 0 ) . value ( "{3}" ) . endObject ( ) . endObject ( ) . endArray ( ) . toString ( ) ; java . lang . String entity = gen . get ( ) . expectedStatus ( 200 ) . payload ( jsonString ) . post ( batchUri ( ) ) . entity ( ) ; java . util . List < java . util . Map < java . lang . String , java . lang . Object > > results = org . neo4j . server . rest . domain . JsonHelper . jsonToList ( entity ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , results . size ( ) )
testStepOut ( ) { org . eclipse . che . api . debug . shared . dto . action . StepOutActionDto stepOutAction = mock ( org . eclipse . che . api . debug . shared . dto . action . StepOutActionDto . class ) ; doReturn ( promiseVoid ) . when ( service ) . stepOut ( org . eclipse . che . plugin . debugger . ide . debug . DebuggerTest . SESSION_ID , stepOutAction ) ; doReturn ( stepOutAction ) . when ( dtoFactory ) . createDto ( org . eclipse . che . api . debug . shared . dto . action . StepOutActionDto . class ) ; debugger . setSuspendEvent ( suspendEventDto ) ; debugger . stepOut ( ) ; verify ( observer ) . onPreStepOut ( ) ; "<AssertPlaceHolder>" ; verify ( promiseVoid ) . catchError ( operationPromiseErrorCaptor . capture ( ) ) ; operationPromiseErrorCaptor . getValue ( ) . apply ( promiseError ) ; verify ( promiseError ) . getCause ( ) ; } isConnected ( ) { return ( debugSessionDto ) != null ; }
org . junit . Assert . assertTrue ( debugger . isConnected ( ) )
testPurposeForDisabled ( ) { gov . hhs . fha . nhinc . callback . purposeuse . PurposeUseProxy testPurposeUseProxy = new gov . hhs . fha . nhinc . callback . purposeuse . PurposeUseProxyDefaultImpl ( mockPropertyAccessor ) ; setPropertyExpectation ( org . jmock . Expectations . returnValue ( "false" ) , NhincConstants . GATEWAY_PROPERTY_FILE , "purposeForUseEnabled" ) ; "<AssertPlaceHolder>" ; } isPurposeForUseEnabled ( gov . hhs . fha . nhinc . callback . opensaml . CallbackProperties ) { return isPurposeForUseEnabled ( ) ; }
org . junit . Assert . assertFalse ( testPurposeUseProxy . isPurposeForUseEnabled ( null ) )
delete_TechnicalServiceOperationException ( ) { doReturn ( Boolean . TRUE ) . when ( model ) . isTokenValid ( ) ; doThrow ( new org . oscm . internal . types . exception . TechnicalServiceOperationException ( ) ) . when ( us ) . deleteUser ( any ( org . oscm . internal . usermanagement . POUser . class ) , anyString ( ) , anyString ( ) ) ; java . lang . String result = ctrl . delete ( ) ; "<AssertPlaceHolder>" ; } delete ( ) { try { this . getTriggerDefinitionService ( ) . deleteTriggerDefinition ( this . selectedTriggerDefinition ) ; this . addMessage ( null , FacesMessage . SEVERITY_INFO , org . oscm . ui . beans . INFO_TRIGGER_DEFINITION_DELETED ) ; this . notifyProcessBean ( ) ; if ( ( ( this . triggerDefinitionList ) != null ) && ( ( this . triggerDefinitionList . size ( ) ) == 1 ) ) { this . resetMenuBean ( ) ; } } catch ( final org . oscm . internal . types . exception . ObjectNotFoundException exp ) { org . oscm . ui . beans . TriggerDefinitionBean . LOGGER . error ( "save(...),<sp>an<sp>ObjectNotFoundException<sp>error<sp>occurred" , exp ) ; if ( exp . getDomainObjectClassEnum ( ) . equals ( ClassEnum . TRIGGER_DEFINITION ) ) { org . oscm . ui . common . ExceptionHandler . execute ( new org . oscm . internal . types . exception . ConcurrentModificationException ( ) ) ; this . selectedTriggerDefinition = null ; } else { throw exp ; } } catch ( final org . oscm . internal . types . exception . ConcurrentModificationException exp ) { org . oscm . ui . beans . TriggerDefinitionBean . LOGGER . error ( "save(...),<sp>an<sp>ConcurrentModificationException<sp>error<sp>occurred" , exp ) ; org . oscm . ui . common . ExceptionHandler . execute ( exp ) ; this . selectedTriggerDefinition = null ; } finally { this . triggerDefinitionList = null ; } this . selectedTriggerDefinition = null ; return null ; }
org . junit . Assert . assertEquals ( "" , result )
whenAttributeGroupResolvedSuccessfully_thenPresentAttributesShouldBeRemovedOffThePendingList ( ) { java . lang . String [ ] presentAttributes = new java . lang . String [ ] { "group_attribute1" , "group_attribute2" } ; java . lang . String [ ] attributeGroup = org . apache . commons . lang3 . ArrayUtils . add ( presentAttributes , "group_attribute3" ) ; org . robobinding . PendingAttributesForView pendingAttributesForView = createWithPendingList ( presentAttributes ) ; pendingAttributesForView . resolveAttributeGroupIfExists ( attributeGroup , mock ( org . robobinding . PendingAttributesForView . AttributeGroupResolver . class ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return map . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( pendingAttributesForView . isEmpty ( ) )
testCommandGotPickedUpAndQueueIsEmptyWhenPollingContentReturns ( ) { queue . putContent ( org . openqa . selenium . server . SingleEntryAsyncQueueUnitTest . testCommand ) ; queue . pollToGetContentUntilTimeout ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return proxies . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( queue . isEmpty ( ) )
optional_int_of ( ) { java . util . OptionalInt optionalInt = java . util . OptionalInt . of ( 89 ) ; "<AssertPlaceHolder>" ; } getAsInt ( ) { return 10 ; }
org . junit . Assert . assertEquals ( 89 , optionalInt . getAsInt ( ) , 0 )
testCreateLinkToDotDotPrefix ( ) { org . apache . hadoop . fs . Path file = new org . apache . hadoop . fs . Path ( testBaseDir1 ( ) , "file" ) ; org . apache . hadoop . fs . Path dir = new org . apache . hadoop . fs . Path ( testBaseDir1 ( ) , "test" ) ; org . apache . hadoop . fs . Path link = new org . apache . hadoop . fs . Path ( testBaseDir1 ( ) , "test/link" ) ; org . apache . hadoop . fs . SymlinkBaseTest . createAndWriteFile ( file ) ; org . apache . hadoop . fs . SymlinkBaseTest . wrapper . mkdir ( dir , org . apache . hadoop . fs . permission . FsPermission . getDefault ( ) , false ) ; org . apache . hadoop . fs . SymlinkBaseTest . wrapper . setWorkingDirectory ( dir ) ; org . apache . hadoop . fs . SymlinkBaseTest . wrapper . createSymlink ( new org . apache . hadoop . fs . Path ( "../file" ) , link , false ) ; org . apache . hadoop . fs . SymlinkBaseTest . readFile ( link ) ; "<AssertPlaceHolder>" ; } getLinkTarget ( org . apache . hadoop . fs . Path ) { return new org . apache . hadoop . fs . Path ( dfs . getLinkTarget ( getUriPath ( p ) ) ) ; }
org . junit . Assert . assertEquals ( new org . apache . hadoop . fs . Path ( "../file" ) , org . apache . hadoop . fs . SymlinkBaseTest . wrapper . getLinkTarget ( link ) )
testNullVisitor ( ) { try { org . familysearch . platform . FamilySearchPlatform fsp = new org . familysearch . platform . FamilySearchPlatform ( ) ; fsp . accept ( null ) ; org . junit . Assert . fail ( "Expected:<sp>NullPointerException" ) ; } catch ( java . lang . NullPointerException ex ) { "<AssertPlaceHolder>" ; } } accept ( org . familysearch . platform . rt . FamilySearchPlatformModelVisitor ) { visitor . visitUser ( this ) ; }
org . junit . Assert . assertTrue ( true )
businessKeyJvm4 ( ) { java . lang . String result = testService . getValue ( new org . springframework . boot . autoconfigure . klock . test . User ( 3 , "kl" ) ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . String , int ) { java . lang . Thread . sleep ( ( 60 * 1000 ) ) ; return "success" ; }
org . junit . Assert . assertEquals ( result , "success" )
testCheckPreFlightRequestTypeEmptyACRM ( ) { org . apache . catalina . filters . TesterHttpServletRequest request = new org . apache . catalina . filters . TesterHttpServletRequest ( ) ; request . setHeader ( CorsFilter . REQUEST_HEADER_ORIGIN , TesterFilterConfigs . HTTP_TOMCAT_APACHE_ORG ) ; request . setHeader ( CorsFilter . REQUEST_HEADER_ACCESS_CONTROL_REQUEST_METHOD , "" ) ; request . setMethod ( "OPTIONS" ) ; org . apache . catalina . filters . CorsFilter corsFilter = new org . apache . catalina . filters . CorsFilter ( ) ; corsFilter . init ( org . apache . catalina . filters . TesterFilterConfigs . getDefaultFilterConfig ( ) ) ; org . apache . catalina . filters . CorsFilter . CORSRequestType requestType = corsFilter . checkRequestType ( request ) ; "<AssertPlaceHolder>" ; } checkRequestType ( javax . servlet . http . HttpServletRequest ) { org . apache . catalina . filters . CorsFilter . CORSRequestType requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; if ( request == null ) { throw new java . lang . IllegalArgumentException ( org . apache . catalina . filters . CorsFilter . sm . getString ( "corsFilter.nullRequest" ) ) ; } java . lang . String originHeader = request . getHeader ( org . apache . catalina . filters . CorsFilter . REQUEST_HEADER_ORIGIN ) ; if ( originHeader != null ) { if ( originHeader . isEmpty ( ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else if ( ! ( org . apache . catalina . filters . CorsFilter . isValidOrigin ( originHeader ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else if ( isLocalOrigin ( request , originHeader ) ) { return org . apache . catalina . filters . CorsFilter . CORSRequestType . NOT_CORS ; } else { java . lang . String method = request . getMethod ( ) ; if ( method != null ) { if ( "OPTIONS" . equals ( method ) ) { java . lang . String accessControlRequestMethodHeader = request . getHeader ( org . apache . catalina . filters . CorsFilter . REQUEST_HEADER_ACCESS_CONTROL_REQUEST_METHOD ) ; if ( ( accessControlRequestMethodHeader != null ) && ( ! ( accessControlRequestMethodHeader . isEmpty ( ) ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . PRE_FLIGHT ; } else if ( ( accessControlRequestMethodHeader != null ) && ( accessControlRequestMethodHeader . isEmpty ( ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } else if ( ( "GET" . equals ( method ) ) || ( "HEAD" . equals ( method ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . SIMPLE ; } else if ( "POST" . equals ( method ) ) { java . lang . String mediaType = getMediaType ( request . getContentType ( ) ) ; if ( mediaType != null ) { if ( org . apache . catalina . filters . CorsFilter . SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES . contains ( mediaType ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . SIMPLE ; } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } } } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . NOT_CORS ; } return requestType ; }
org . junit . Assert . assertEquals ( CorsFilter . CORSRequestType . INVALID_CORS , requestType )
test ( ) { try ( org . apache . accumulo . core . client . AccumuloClient c = org . apache . accumulo . core . client . Accumulo . newClient ( ) . from ( getClientProps ( ) ) . build ( ) ) { java . lang . String tableName = getUniqueNames ( 1 ) [ 0 ] ; c . tableOperations ( ) . create ( tableName ) ; org . apache . accumulo . core . client . IteratorSetting is = new org . apache . accumulo . core . client . IteratorSetting ( 30 , org . apache . accumulo . test . functional . BadIterator . class ) ; c . tableOperations ( ) . attachIterator ( tableName , is , java . util . EnumSet . of ( IteratorScope . minc ) ) ; try ( org . apache . accumulo . core . client . BatchWriter bw = c . createBatchWriter ( tableName ) ) { org . apache . accumulo . core . data . Mutation m = new org . apache . accumulo . core . data . Mutation ( new org . apache . hadoop . io . Text ( "r1" ) ) ; m . put ( new org . apache . hadoop . io . Text ( "acf" ) , new org . apache . hadoop . io . Text ( tableName ) , new org . apache . accumulo . core . data . Value ( "1" . getBytes ( org . apache . accumulo . test . functional . UTF_8 ) ) ) ; bw . addMutation ( m ) ; } c . tableOperations ( ) . flush ( tableName , null , null , false ) ; sleepUninterruptibly ( 1 , TimeUnit . SECONDS ) ; org . apache . accumulo . test . functional . FunctionalTestUtils . checkRFiles ( c , tableName , 1 , 1 , 0 , 0 ) ; try ( org . apache . accumulo . core . client . Scanner scanner = c . createScanner ( tableName , Authorizations . EMPTY ) ) { int count = com . google . common . collect . Iterators . size ( scanner . iterator ( ) ) ; "<AssertPlaceHolder>" ; c . tableOperations ( ) . removeIterator ( tableName , org . apache . accumulo . test . functional . BadIterator . class . getSimpleName ( ) , java . util . EnumSet . of ( IteratorScope . minc ) ) ; sleepUninterruptibly ( 5 , TimeUnit . SECONDS ) ; org . apache . accumulo . test . functional . FunctionalTestUtils . checkRFiles ( c , tableName , 1 , 1 , 1 , 1 ) ; count = com . google . common . collect . Iterators . size ( scanner . iterator ( ) ) ; if ( count != 1 ) throw new java . lang . Exception ( ( "Did<sp>not<sp>see<sp>expected<sp>#<sp>entries<sp>" + count ) ) ; c . tableOperations ( ) . attachIterator ( tableName , is , java . util . EnumSet . of ( IteratorScope . minc ) ) ; try ( org . apache . accumulo . core . client . BatchWriter bw = c . createBatchWriter ( tableName ) ) { org . apache . accumulo . core . data . Mutation m = new org . apache . accumulo . core . data . Mutation ( new org . apache . hadoop . io . Text ( "r2" ) ) ; m . put ( new org . apache . hadoop . io . Text ( "acf" ) , new org . apache . hadoop . io . Text ( tableName ) , new org . apache . accumulo . core . data . Value ( "1" . getBytes ( org . apache . accumulo . test . functional . UTF_8 ) ) ) ; bw . addMutation ( m ) ; } sleepUninterruptibly ( 500 , TimeUnit . MILLISECONDS ) ; c . tableOperations ( ) . flush ( tableName , null , null , false ) ; sleepUninterruptibly ( 1 , TimeUnit . SECONDS ) ; c . tableOperations ( ) . delete ( tableName ) ; } } } iterator ( ) { return java . util . stream . StreamSupport . stream ( acfg . spliterator ( ) , false ) . filter ( ( e ) -> ! ( org . apache . accumulo . core . conf . Property . isSensitive ( e . getKey ( ) ) ) ) . iterator ( ) ; }
org . junit . Assert . assertEquals ( ( "Did<sp>not<sp>see<sp>expected<sp>#<sp>entries<sp>" + count ) , 1 , count )
mailCase6 ( ) { org . openscience . cdk . interfaces . IAtomContainer mol = org . openscience . cdk . tools . ATASaturationCheckerTest . sp . parseSmiles ( "c1ccc2c(c1)cc-3c4c2cccc4-c5c3cccc5" ) ; atasc . decideBondOrder ( mol , true ) ; int doubleBondCount = 0 ; for ( org . openscience . cdk . interfaces . IBond bond : mol . bonds ( ) ) { if ( ( bond . getOrder ( ) ) == ( org . openscience . cdk . interfaces . IBond . Order . DOUBLE ) ) doubleBondCount ++ ; } "<AssertPlaceHolder>" ; } getOrder ( ) { return this . order ; }
org . junit . Assert . assertEquals ( 10 , doubleBondCount )
setClientTypeTest ( ) { com . aliyuncs . utils . AuthUtils . setClientType ( "test" ) ; "<AssertPlaceHolder>" ; com . aliyuncs . utils . AuthUtils . setClientType ( "default" ) ; } getClientType ( ) { if ( null == ( com . aliyuncs . utils . AuthUtils . clientType ) ) { com . aliyuncs . utils . AuthUtils . clientType = "default" ; return com . aliyuncs . utils . AuthUtils . clientType ; } else { return com . aliyuncs . utils . AuthUtils . clientType ; } }
org . junit . Assert . assertEquals ( "test" , com . aliyuncs . utils . AuthUtils . getClientType ( ) )
testTestFile ( ) { java . lang . String file = testFile . getCanonicalPath ( ) ; org . apache . flume . sink . hdfs . HDFSDataStream stream = new org . apache . flume . sink . hdfs . HDFSDataStream ( ) ; context . put ( "hdfs.useRawLocalFileSystem" , "true" ) ; stream . configure ( context ) ; stream . open ( file ) ; stream . append ( event ) ; stream . sync ( ) ; "<AssertPlaceHolder>" ; } length ( ) { return file . length ( ) ; }
org . junit . Assert . assertTrue ( ( ( testFile . length ( ) ) > 0 ) )
shouldReturnStringWithObjectSerialized ( ) { br . com . caelum . vraptor . util . test . MockSerializationResultTest . Car car = new br . com . caelum . vraptor . util . test . MockSerializationResultTest . Car ( "XXU-5569" , "Caelum" , "VW" , "Polo" ) ; java . lang . String expectedResult = "{\"car\":{\"licensePlate\":\"XXU-5569\",\"owner\":\"Caelum\",\"make\":\"VW\",\"model\":\"Polo\"}}" ; result . use ( json ( ) ) . from ( car ) . serialize ( ) ; "<AssertPlaceHolder>" ; } serializedResult ( ) { if ( "application/xml" . equals ( response . getContentType ( ) ) ) { return response . getContentAsString ( ) ; } if ( "application/json" . equals ( response . getContentType ( ) ) ) { return response . getContentAsString ( ) ; } return null ; }
org . junit . Assert . assertThat ( result . serializedResult ( ) , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expectedResult ) ) )
shouldReturnOriginalValueIfInputIsAnEntity ( ) { final uk . gov . gchq . gaffer . data . element . Entity input = new uk . gov . gchq . gaffer . data . element . Entity ( "group" , "item" ) ; final uk . gov . gchq . gaffer . operation . function . ToEntityId function = new uk . gov . gchq . gaffer . operation . function . ToEntityId ( ) ; final uk . gov . gchq . gaffer . data . element . id . EntityId output = function . apply ( input ) ; "<AssertPlaceHolder>" ; } apply ( java . lang . Object ) { if ( null == value ) { return null ; } if ( value instanceof java . lang . Number ) { return ( ( java . lang . Number ) ( value ) ) . intValue ( ) ; } if ( value instanceof java . lang . String ) { return java . lang . Integer . valueOf ( ( ( java . lang . String ) ( value ) ) ) ; } throw new java . lang . IllegalArgumentException ( ( "Could<sp>not<sp>convert<sp>value<sp>to<sp>Integer:<sp>" + value ) ) ; }
org . junit . Assert . assertSame ( input , output )
testMatchConditionAlongDimension1 ( ) { org . nd4j . linalg . api . ndarray . INDArray array = org . nd4j . linalg . factory . Nd4j . ones ( 3 , 10 ) ; array . getRow ( 2 ) . assign ( 0.0 ) ; boolean [ ] result = org . nd4j . linalg . indexing . BooleanIndexing . and ( array , org . nd4j . linalg . indexing . conditions . Conditions . equals ( 0.0 ) , 1 ) ; boolean [ ] comp = new boolean [ ] { false , false , true } ; System . out . println ( ( "Result:<sp>" + ( java . util . Arrays . toString ( result ) ) ) ) ; "<AssertPlaceHolder>" ; } toString ( java . lang . String ) { return toString ( name , "" ) ; }
org . junit . Assert . assertArrayEquals ( comp , result )
startsEnabled ( ) { "<AssertPlaceHolder>" ; } invoke ( java . lang . Runnable ) { final org . fishwife . jrugged . LatencyTracker latencyTracker = new org . fishwife . jrugged . LatencyTracker ( ) ; try { requestCounter . invoke ( new java . lang . Runnable ( ) { public void run ( ) { try { latencyTracker . invoke ( r ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( org . fishwife . jrugged . PerformanceMonitor . WRAP_MSG , e ) ; } } } ) ; recordSuccess ( latencyTracker ) ; } catch ( java . lang . RuntimeException re ) { recordFailure ( latencyTracker ) ; if ( org . fishwife . jrugged . PerformanceMonitor . WRAP_MSG . equals ( re . getMessage ( ) ) ) { throw ( ( java . lang . Exception ) ( re . getCause ( ) ) ) ; } else { throw re ; } } }
org . junit . Assert . assertSame ( out , impl . invoke ( call ) )
testOngeldigheidBijOntbrekenDatumAanvangLand ( ) { final nl . bzk . brp . model . algemeen . stamgegeven . kern . LandGebied land = bouwLand ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . geboorte . BRBY01037Test . GELDIGE_LAND_CODE_ZONDER_DATUM , null , null ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > meldingen = bedrijfsregel . voerRegelUit ( null , bouwFamilie ( land , new nl . bzk . brp . model . algemeen . attribuuttype . kern . DatumEvtDeelsOnbekendAttribuut ( 20120101 ) ) , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
doubleAddUniqueConstraint ( ) { org . apache . hadoop . hive . metastore . api . Table table = testTables [ 0 ] ; org . apache . hadoop . hive . metastore . api . CheckConstraintsRequest rqst = new org . apache . hadoop . hive . metastore . api . CheckConstraintsRequest ( table . getCatName ( ) , table . getDbName ( ) , table . getTableName ( ) ) ; java . util . List < org . apache . hadoop . hive . metastore . api . SQLCheckConstraint > fetched = client . getCheckConstraints ( rqst ) ; "<AssertPlaceHolder>" ; java . util . List < org . apache . hadoop . hive . metastore . api . SQLCheckConstraint > cc = new org . apache . hadoop . hive . metastore . client . builder . SQLCheckConstraintBuilder ( ) . onTable ( table ) . addColumn ( "col1" ) . setCheckExpression ( "><sp>0" ) . build ( metaStore . getConf ( ) ) ; client . addCheckConstraint ( cc ) ; try { cc = new org . apache . hadoop . hive . metastore . client . builder . SQLCheckConstraintBuilder ( ) . onTable ( table ) . addColumn ( "col2" ) . setCheckExpression ( "=<sp>'this<sp>string<sp>intentionally<sp>left<sp>empty'" ) . build ( metaStore . getConf ( ) ) ; client . addCheckConstraint ( cc ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . hadoop . hive . metastore . api . InvalidObjectException | org . apache . thrift . TApplicationException e ) { } } isEmpty ( ) { com . google . common . base . Preconditions . checkNotNull ( getPath ( ) ) ; try { org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( getPath ( ) . toUri ( ) , org . apache . hadoop . hive . ql . session . SessionState . getSessionConf ( ) ) ; return ( ! ( fs . exists ( getPath ( ) ) ) ) || ( ( fs . listStatus ( getPath ( ) , FileUtils . HIDDEN_FILES_PATH_FILTER ) . length ) == 0 ) ; } catch ( java . io . IOException e ) { throw new org . apache . hadoop . hive . ql . metadata . HiveException ( e ) ; } }
org . junit . Assert . assertTrue ( fetched . isEmpty ( ) )
onExitThePreviousValueIsRestores ( ) { turin . context . ContextTest . MyContext ctx = new turin . context . ContextTest . MyContext ( ) ; ctx . enterContext ( "a" ) ; ctx . enterContext ( "b" ) ; ctx . enterContext ( "c" ) ; ctx . exitContext ( ) ; ctx . exitContext ( ) ; "<AssertPlaceHolder>" ; } get ( ) { java . util . Stack < V > ctx = values . get ( ) ; if ( ctx . isEmpty ( ) ) { return java . util . Optional . empty ( ) ; } else { return java . util . Optional . of ( ctx . get ( ( ( ctx . size ( ) ) - 1 ) ) ) ; } }
org . junit . Assert . assertEquals ( java . util . Optional . of ( "a" ) , ctx . get ( ) )
delegateClassWithMultipleMethodsAndInexactButValidMatch ( mockit . DelegateInvocationTest$Collaborator ) { new mockit . Expectations ( ) { { mockit . DelegateInvocationTest . Collaborator . staticMethod ( 1 ) ; result = new mockit . Delegate ( ) { @ mockit . SuppressWarnings ( "unused" ) private void otherMethod ( int i ) { org . junit . Assert . fail ( ) ; } @ mockit . Mock boolean staticMethod ( mockit . Invocation invocation , java . lang . Number i ) { return ( i . intValue ( ) ) > 0 ; } } ; } } ; "<AssertPlaceHolder>" ; } staticMethod ( mockit . Invocation ) { org . junit . Assert . assertNull ( context . getInvokedInstance ( ) ) ; org . junit . Assert . assertEquals ( 0 , context . getInvokedArguments ( ) . length ) ; org . junit . Assert . assertEquals ( ( ( context . getInvocationCount ( ) ) - 1 ) , context . getInvocationIndex ( ) ) ; return ( context . getInvocationCount ( ) ) > 0 ; }
org . junit . Assert . assertTrue ( mockit . DelegateInvocationTest . Collaborator . staticMethod ( 1 ) )
testQuoteEscape ( ) { java . lang . String input = "ζ—₯ζœ¬η΅ŒζΈˆζ–°θž,1292,1292,4980,名詞,ε›Ίζœ‰εθ©ž,η΅„ηΉ”,*,*,\"1,0\",ζ—₯ζœ¬η΅ŒζΈˆζ–°θž,ニホンケむアむシンブン,ニホンケむアむシンブン" ; java . lang . String expected = "\"ζ—₯ζœ¬η΅ŒζΈˆζ–°θž,1292,1292,4980,名詞,ε›Ίζœ‰εθ©ž,η΅„ηΉ”,*,*,\"\"1,0\"\",ζ—₯ζœ¬η΅ŒζΈˆζ–°θž,ニホンケむアむシンブン,ニホンケむアむシンブン\"" ; "<AssertPlaceHolder>" ; } escape ( java . lang . String ) { if ( string . contains ( "," ) ) { return ( "\"" + string ) + "\"" ; } return string ; }
org . junit . Assert . assertEquals ( expected , parser . escape ( input ) )
getEnvVarsPreviousStepsWithEnvInjectActionMatrixRun ( ) { build = mock ( hudson . matrix . MatrixRun . class ) ; org . jenkinsci . plugins . envinject . EnvInjectPluginAction envInjectPluginAction = new org . jenkinsci . plugins . envinject . EnvInjectPluginAction ( build , org . jenkinsci . plugins . envinject . sevice . EnvInjectVariableGetterTest . envVarsSample1 ) ; when ( build . getAction ( org . jenkinsci . plugins . envinject . EnvInjectPluginAction . class ) ) . thenReturn ( envInjectPluginAction ) ; when ( build . getBuildVariables ( ) ) . thenReturn ( org . jenkinsci . plugins . envinject . sevice . EnvInjectVariableGetterTest . buildEnvVarsSample1 ) ; java . util . Map < java . lang . String , java . lang . String > resultEnvVars = org . jenkinsci . plugins . envinject . util . RunHelper . getEnvVarsPreviousSteps ( build , mock ( org . jenkinsci . lib . envinject . EnvInjectLogger . class ) ) ; java . util . Map < java . lang . String , java . lang . String > expectedEnvVars = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expectedEnvVars . putAll ( org . jenkinsci . plugins . envinject . sevice . EnvInjectVariableGetterTest . envVarsSample1 ) ; expectedEnvVars . putAll ( org . jenkinsci . plugins . envinject . sevice . EnvInjectVariableGetterTest . buildEnvVarsSample1 ) ; "<AssertPlaceHolder>" ; } sameMap ( java . util . Map , java . util . Map ) { if ( ( expectedMap == null ) && ( actualMap == null ) ) { return true ; } if ( expectedMap == null ) { return false ; } if ( actualMap == null ) { return false ; } if ( ( expectedMap . size ( ) ) != ( actualMap . size ( ) ) ) { return false ; } for ( Map . Entry < java . lang . String , java . lang . String > entry : actualMap . entrySet ( ) ) { java . lang . String expectedValue = expectedMap . get ( entry . getKey ( ) ) ; java . lang . String actualValue = actualMap . get ( entry . getKey ( ) ) ; if ( ( expectedValue == null ) && ( actualValue == null ) ) { return true ; } if ( expectedValue == null ) { return false ; } if ( ! ( expectedValue . equals ( actualValue ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertTrue ( sameMap ( expectedEnvVars , resultEnvVars ) )
should_not_reduce_forks ( ) { au . edu . wehi . idsv . graph . BasePathGraph pg = PG ( G ( 4 ) . add ( "TCCGAAT" ) . add ( "TCCGAAC" ) . add ( "TCCGAAG" ) ) ; java . util . List < au . edu . wehi . idsv . debruijn . DeBruijnPathNode < au . edu . wehi . idsv . debruijn . DeBruijnNodeBase > > nodes = com . google . common . collect . Lists . newArrayList ( pg . getPaths ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return kmers . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , nodes . size ( ) )
testIndentation ( ) { buffer . write ( "Line1" ) ; buffer . newline ( ) ; buffer . indent ( ) ; buffer . write ( "Indent1" ) ; buffer . newline ( ) ; buffer . write ( "Indent2" ) ; buffer . write ( "<sp>more" ) ; buffer . newline ( ) ; buffer . deindent ( ) ; buffer . write ( "Line2" ) ; buffer . newline ( ) ; java . lang . String expected = "" + ( ( ( "Line1\n" + "\tIndent1\n" ) + "\tIndent2<sp>more\n" ) + "Line2\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "++" + ( getValue ( ) . toString ( ) ) ; }
org . junit . Assert . assertEquals ( expected , buffer . toString ( ) )
testReaderEmptyString ( ) { new org . prop4j . NodeReader ( ) . stringToNode ( "" ) ; "<AssertPlaceHolder>" ; } stringToNode ( java . lang . String ) { return stringToNode ( constraint , null ) ; }
org . junit . Assert . assertTrue ( true )
testAddAndRemove ( ) { java . lang . String id = ( this . getClass ( ) . getName ( ) ) + ".testAddAndRemove" ; org . apache . jackrabbit . oak . plugins . document . NodeDocument nd = super . ds . find ( Collection . NODES , id ) ; if ( nd != null ) { super . ds . remove ( Collection . NODES , id ) ; } org . apache . jackrabbit . oak . plugins . document . UpdateOp up = new org . apache . jackrabbit . oak . plugins . document . UpdateOp ( id , true ) ; up . set ( "_id" , id ) ; "<AssertPlaceHolder>" ; removeMe . add ( id ) ; } create ( T [ ] , T [ ] ) { return new org . apache . jackrabbit . oak . query . plan . Permutations < T > ( in , out , in . length ) ; }
org . junit . Assert . assertTrue ( super . ds . create ( Collection . NODES , java . util . Collections . singletonList ( up ) ) )
addAsContactPersonsToCampaign_NullDefaultAddressType_NonExistingBill_MandatoryLocation ( ) { final de . metas . interfaces . I_C_BPartner partner1 = createBPartner ( "Partner1" ) ; createBPartnerLocation ( partner1 ) ; final de . metas . bpartner . BPartnerId bpartnerId = de . metas . bpartner . BPartnerId . ofRepoId ( partner1 . getC_BPartner_ID ( ) ) ; final java . util . stream . Stream < org . adempiere . user . User > users = java . util . Collections . singletonList ( createUserForPartner ( "User1" , "testmail@testmail.testmail" , bpartnerId ) ) . stream ( ) ; final de . metas . marketing . base . model . I_MKTG_Platform platform = createPlatform ( ) ; platform . setIsRequiredLocation ( true ) ; save ( platform ) ; final de . metas . marketing . base . model . I_MKTG_Campaign campaignRecord = createCampaign ( platform ) ; final de . metas . marketing . base . model . CampaignId campaignId = de . metas . marketing . base . model . CampaignId . ofRepoId ( campaignRecord . getMKTG_Campaign_ID ( ) ) ; final de . metas . marketing . base . bpartner . DefaultAddressType defaultAddressType = null ; campaignService . addAsContactPersonsToCampaign ( users , campaignId , defaultAddressType ) ; final java . util . List < de . metas . marketing . base . model . I_MKTG_ContactPerson > existingContactPersons = retrieveExistingContactPersons ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return getMap ( ) . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( existingContactPersons . isEmpty ( ) )
testPathIsDirectoryWhenPathIsDirectory ( ) { mFileSystem . createDirectory ( new alluxio . AlluxioURI ( "/testDir" ) ) ; int ret = mFsShell . run ( "test" , "-d" , "/testDir" ) ; "<AssertPlaceHolder>" ; } run ( alluxio . job . JobConfig , int , alluxio . conf . AlluxioConfiguration ) { alluxio . retry . CountingRetry retryPolicy = new alluxio . retry . CountingRetry ( attempts ) ; while ( retryPolicy . attempt ( ) ) { long jobId ; try ( alluxio . client . job . JobMasterClient client = JobMasterClient . Factory . create ( alluxio . worker . job . JobMasterClientContext . newBuilder ( alluxio . ClientContext . create ( alluxioConf ) ) . build ( ) ) ) { jobId = client . run ( config ) ; } catch ( java . lang . Exception e ) { alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Exception<sp>encountered<sp>when<sp>starting<sp>a<sp>job." , e ) ; continue ; } alluxio . job . wire . JobInfo jobInfo = alluxio . client . job . JobGrpcClientUtils . waitFor ( jobId , alluxioConf ) ; if ( jobInfo == null ) { break ; } if ( ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . COMPLETED ) ) || ( ( jobInfo . getStatus ( ) ) == ( alluxio . job . wire . Status . CANCELED ) ) ) { return ; } alluxio . client . job . JobGrpcClientUtils . LOG . warn ( "Job<sp>{}<sp>failed<sp>to<sp>complete:<sp>{}" , jobId , jobInfo . getErrorMessage ( ) ) ; } throw new java . lang . RuntimeException ( "Failed<sp>to<sp>successfully<sp>complete<sp>the<sp>job." ) ; }
org . junit . Assert . assertEquals ( 0 , ret )
getLocalNodeNameMaster ( ) { CommonUtils . PROCESS_TYPE . set ( ProcessType . MASTER ) ; try ( java . io . Closeable c = new alluxio . ConfigurationRule ( alluxio . conf . PropertyKey . MASTER_HOSTNAME , "master" , mConfiguration ) . toResource ( ) ) { "<AssertPlaceHolder>" ; } } getLocalNodeName ( alluxio . conf . AlluxioConfiguration ) { switch ( CommonUtils . PROCESS_TYPE . get ( ) ) { case JOB_MASTER : if ( conf . isSet ( PropertyKey . JOB_MASTER_HOSTNAME ) ) { return conf . get ( PropertyKey . JOB_MASTER_HOSTNAME ) ; } break ; case JOB_WORKER : if ( conf . isSet ( PropertyKey . JOB_WORKER_HOSTNAME ) ) { return conf . get ( PropertyKey . JOB_WORKER_HOSTNAME ) ; } break ; case CLIENT : if ( conf . isSet ( PropertyKey . USER_HOSTNAME ) ) { return conf . get ( PropertyKey . USER_HOSTNAME ) ; } break ; case MASTER : if ( conf . isSet ( PropertyKey . MASTER_HOSTNAME ) ) { return conf . get ( PropertyKey . MASTER_HOSTNAME ) ; } break ; case WORKER : if ( conf . isSet ( PropertyKey . WORKER_HOSTNAME ) ) { return conf . get ( PropertyKey . WORKER_HOSTNAME ) ; } break ; default : break ; } return alluxio . util . network . NetworkAddressUtils . getLocalHostName ( ( ( int ) ( conf . getMs ( PropertyKey . NETWORK_HOST_RESOLUTION_TIMEOUT_MS ) ) ) ) ; }
org . junit . Assert . assertEquals ( "master" , alluxio . util . network . NetworkAddressUtils . getLocalNodeName ( mConfiguration ) )
testGryo ( ) { processJCas ( DocumentGraph . PARAM_OUTPUT_DIRECTORY , tempDirectory . toString ( ) , DocumentGraph . PARAM_GRAPH_FORMAT , GraphFormat . GRYO . toString ( ) , DocumentGraph . PARAM_OUTPUT_RELATIONS_AS_LINKS , true ) ; java . nio . file . Path path = tempDirectory . resolve ( tempDirectory . toFile ( ) . list ( ) [ 0 ] ) ; java . nio . file . Path expectedPath = createAndFailIfMissing ( path , uk . gov . dstl . baleen . consumers . file . DocumentGraphFileTest . EXPECTED_GRYO_FILE , uk . gov . dstl . baleen . consumers . file . DocumentGraphFileTest . GRYO_NAME ) ; "<AssertPlaceHolder>" ; java . nio . file . Files . delete ( path ) ; } createAndFailIfMissing ( java . nio . file . Path , java . net . URL , java . lang . String ) { if ( url != null ) { return java . nio . file . Paths . get ( url . toURI ( ) ) ; } java . nio . file . Files . copy ( path , java . nio . file . Paths . get ( "src/test/resources/uk/gov/dstl/baleen/consumers/file/" , name ) ) ; org . junit . Assert . fail ( ) ; return null ; }
org . junit . Assert . assertTrue ( com . google . common . io . Files . equal ( expectedPath . toFile ( ) , path . toFile ( ) ) )
simple_join ( ) { final java . lang . String rulebase = "rules/reloaded/process_join.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaWorkflowsTest . kAgent , test . ws . prova . test2 . ProvaWorkflowsTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 1000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
org . junit . Assert . assertEquals ( 2 , count . get ( ) )