input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
isDiskImageIdValid_ValidDiskImageID ( ) { paramHandler . setDiskImageId ( "diskimgid" ) ; doReturn ( givenDiskImages ( ) ) . when ( vServerProcessor . vsysComm ) . getDiskImages ( any ( org . oscm . app . iaas . PropertyHandler . class ) ) ; org . oscm . app . iaas . data . DiskImage validDiskImage = vServerProcessor . isDiskImageIdValid ( null , paramHandler ) ; "<AssertPlaceHolder>" ; } isDiskImageIdValid ( java . lang . String , org . oscm . app . iaas . PropertyHandler ) { org . oscm . app . iaas . data . DiskImage diskImageForName = null ; boolean diskImageIdUnique = false ; java . lang . String imageIdOrName = ( diskImageId != null ) ? diskImageId : paramHandler . getDiskImageId ( ) ; java . util . List < org . oscm . app . iaas . data . DiskImage > diskImages = vsysComm . getDiskImages ( paramHandler ) ; for ( org . oscm . app . iaas . data . DiskImage image : diskImages ) { java . lang . String imageId = image . getDiskImageId ( ) ; java . lang . String imageName = image . getDiskImageName ( ) ; if ( imageId . equalsIgnoreCase ( imageIdOrName ) ) { return image ; } else { if ( imageName . equalsIgnoreCase ( imageIdOrName ) ) { if ( diskImageForName == null ) { diskImageForName = image ; diskImageIdUnique = true ; } else { diskImageIdUnique = false ; } } } } if ( diskImageIdUnique ) { org . oscm . app . iaas . VServerProcessorBean . logger . info ( "No<sp>disk<sp>image<sp>with<sp>referenced<sp>ID<sp>{}<sp>defined.<sp>Using<sp>disk<sp>image<sp>with<sp>same<sp>name<sp>and<sp>ID<sp>{}" , new java . lang . Object [ ] { imageIdOrName , diskImageForName . getDiskImageId ( ) } ) ; return diskImageForName ; } return null ; }
org . junit . Assert . assertNotNull ( validDiskImage )
getCurrentPermutationTest ( ) { int size = 4 ; org . openscience . cdk . graph . Permutor permutor = new org . openscience . cdk . graph . Permutor ( size ) ; boolean allOk = true ; while ( permutor . hasNext ( ) ) { permutor . getNextPermutation ( ) ; int [ ] current = permutor . getCurrentPermutation ( ) ; if ( arrayElementsDistinct ( current ) ) { continue ; } else { allOk = false ; break ; } } "<AssertPlaceHolder>" ; } arrayElementsDistinct ( int [ ] ) { java . util . BitSet bitSet = new java . util . BitSet ( array . length ) ; for ( int index = 0 ; index < ( array . length ) ; index ++ ) { if ( bitSet . get ( index ) ) { return false ; } else { bitSet . set ( index ) ; } } return true ; }
org . junit . Assert . assertTrue ( allOk )
testWithInterfaces4 ( ) { java . lang . reflect . Type selectedType = new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Interface4 < java . util . Set < java . lang . Integer > > > ( ) { } . getType ( ) ; java . lang . reflect . Type type = org . jboss . weld . tests . unit . hierarchy . discovery . event . EventTypeResolutionTest . resolveType ( selectedType , org . jboss . weld . tests . unit . hierarchy . discovery . event . Charlie . class ) ; "<AssertPlaceHolder>" ; } getType ( ) { return type ; }
org . junit . Assert . assertEquals ( new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Charlie < java . lang . Integer > > ( ) { } . getType ( ) , type )
Attribute07Test ( ) { java . lang . String code = "class<sp>A{isA<sp>T1;isA<sp>T2;}trait<sp>T1{name;}trait<sp>T2{name;}" ; cruise . umple . compiler . UmpleModel model = getModel ( code ) ; boolean result = false ; try { model . run ( ) ; } catch ( java . lang . Exception e ) { result = e . getMessage ( ) . contains ( "218" ) ; } finally { "<AssertPlaceHolder>" ; cruise . umple . util . SampleFileWriter . destroy ( "traitTest.ump" ) ; } } contains ( java . lang . Object ) { if ( ( parent ) != null ) { return ( super . contains ( obj ) ) || ( parent . contains ( obj ) ) ; } else { return super . contains ( obj ) ; } }
org . junit . Assert . assertTrue ( result )
testCascadeDeleteOrganization ( ) { final java . math . BigDecimal value = new java . math . BigDecimal ( "5.01" ) ; final org . oscm . domobjects . Organization organization = runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . Organization > ( ) { public org . oscm . domobjects . Organization call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Organization organization = createCustomerAndSupplier ( ) ; return organization ; } } ) ; final java . lang . Long discountKey = runTX ( new java . util . concurrent . Callable < java . lang . Long > ( ) { public org . oscm . domobjects . Long call ( ) throws org . oscm . domobjects . Exception { long key = createDiscount ( organization , value , null , null ) ; return java . lang . Long . valueOf ( key ) ; } } ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Organization orgTmp = mgr . find ( org . oscm . domobjects . Organization . class , organization . getKey ( ) ) ; mgr . remove ( orgTmp ) ; return null ; } } ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { org . oscm . domobjects . Discount discount = mgr . find ( org . oscm . domobjects . Discount . class , discountKey ) ; "<AssertPlaceHolder>" ; return null ; } } ) ; } find ( java . lang . Class , long ) { if ( ( objclazz == ( org . oscm . domobjects . PlatformUser . class ) ) && ( key != ( org . oscm . reportingservice . bean . ReportingServiceBeanTest . INVALID_USER_ID ) ) ) { return objclazz . cast ( dm . getCurrentUser ( ) ) ; } return null ; }
org . junit . Assert . assertEquals ( null , discount )
testGetFragmentSortColumnCreatedOn ( ) { org . sagebionetworks . repo . model . entity . SortBy sortBy = org . sagebionetworks . repo . model . entity . SortBy . CREATED_ON ; java . lang . String result = org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . getFragmentSortColumn ( sortBy ) ; "<AssertPlaceHolder>" ; } getFragmentSortColumn ( org . sagebionetworks . repo . model . entity . SortBy ) { org . sagebionetworks . util . ValidateArgument . required ( sortBy , "sortBy" ) ; switch ( sortBy ) { case NAME : return org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . N_NAME ; case CREATED_ON : return org . sagebionetworks . repo . model . dbo . dao . NodeDAOImpl . N_CREATED_ON ; default : throw new java . lang . IllegalArgumentException ( ( "Unknown<sp>SortBy:<sp>" + sortBy ) ) ; } }
org . junit . Assert . assertEquals ( NodeDAOImpl . N_CREATED_ON , result )
deserializeTest ( ) { createBufer ( buffer ) ; action = learnCodec . deserialize ( buffer ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflowjava . nx . action . rev140421 . action . container . action . choice . ActionLearn result = ( ( org . opendaylight . yang . gen . v1 . urn . opendaylight . openflowjava . nx . action . rev140421 . action . container . action . choice . ActionLearn ) ( action . getActionChoice ( ) ) ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . Action act = createAction ( ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflowjava . nx . action . rev140421 . action . container . action . choice . ActionLearn expResult = ( ( org . opendaylight . yang . gen . v1 . urn . opendaylight . openflowjava . nx . action . rev140421 . action . container . action . choice . ActionLearn ) ( act . getActionChoice ( ) ) ) ; "<AssertPlaceHolder>" ; } createAction ( ) { final java . util . List < org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . Action > actions = new java . util . ArrayList ( ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder actionBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder ( ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PushVlanCaseBuilder pushVlanCaseBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PushVlanCaseBuilder ( ) ; org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . push . vlan . _case . PushVlanActionBuilder pushVlanBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . push . vlan . _case . PushVlanActionBuilder ( ) ; pushVlanBuilder . setEthertype ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . types . rev130731 . EtherType ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . types . rev130731 . EtherType ( 25 ) ) ) ; pushVlanCaseBuilder . setPushVlanAction ( pushVlanBuilder . build ( ) ) ; actionBuilder . setActionChoice ( pushVlanCaseBuilder . build ( ) ) ; actions . add ( actionBuilder . build ( ) ) ; actionBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder ( ) ; actionBuilder . setActionChoice ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PopVlanCaseBuilder ( ) . build ( ) ) ; actions . add ( actionBuilder . build ( ) ) ; actionBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder ( ) ; actionBuilder . setActionChoice ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PopVlanCaseBuilder ( ) . build ( ) ) ; actions . add ( actionBuilder . build ( ) ) ; actionBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder ( ) ; actionBuilder . setActionChoice ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PopVlanCaseBuilder ( ) . build ( ) ) ; actions . add ( actionBuilder . build ( ) ) ; actionBuilder = new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . actions . grouping . ActionBuilder ( ) ; actionBuilder . setActionChoice ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . openflow . common . action . rev150203 . action . grouping . action . choice . PopVlanCaseBuilder ( ) . build ( ) ) ; actions . add ( actionBuilder . build ( ) ) ; return actions ; }
org . junit . Assert . assertEquals ( expResult , result )
testGetUsageDetailsForRole ( ) { details . putUsageDetails ( org . oscm . billingservice . business . calculation . revenue . model . L1 , new org . oscm . billingservice . business . calculation . revenue . model . UsageDetails ( ) ) ; org . oscm . billingservice . business . calculation . revenue . model . UsageDetails usageDetails = details . getUsageDetails ( org . oscm . billingservice . business . calculation . revenue . model . L1 ) ; "<AssertPlaceHolder>" ; } getUsageDetails ( java . lang . Long ) { return roleAssignmentDetails . get ( roleKey ) ; }
org . junit . Assert . assertNotNull ( usageDetails )
testNoExpiryByDefault ( ) { org . springframework . data . couchbase . core . mapping . CouchbasePersistentEntity < org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntityTests . DefaultExpiry > entity = new org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntity < org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntityTests . DefaultExpiry > ( org . springframework . data . util . ClassTypeInformation . from ( org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntityTests . DefaultExpiry . class ) ) ; "<AssertPlaceHolder>" ; } getExpiry ( ) { org . springframework . data . couchbase . core . mapping . Document annotation = org . springframework . data . couchbase . core . mapping . BasicCouchbasePersistentEntity . getType ( ) . getAnnotation ( org . springframework . data . couchbase . core . mapping . Document . class ) ; if ( annotation == null ) return 0 ; int expiryValue = getExpiryValue ( annotation ) ; long secondsShift = annotation . expiryUnit ( ) . toSeconds ( expiryValue ) ; if ( secondsShift > ( TTL_IN_SECONDS_INCLUSIVE_END ) ) { java . util . Calendar cal = java . util . Calendar . getInstance ( java . util . TimeZone . getTimeZone ( "UTC" ) ) ; if ( ( annotation . expiryUnit ( ) ) == ( java . util . concurrent . TimeUnit . DAYS ) ) { cal . add ( Calendar . DAY_OF_MONTH , expiryValue ) ; } else { cal . add ( Calendar . SECOND , ( ( int ) ( secondsShift ) ) ) ; } return ( ( int ) ( ( cal . getTimeInMillis ( ) ) / 1000 ) ) ; } else { return ( ( int ) ( secondsShift ) ) ; } }
org . junit . Assert . assertEquals ( 0 , entity . getExpiry ( ) )
defaultPatternNotToMatchMavenRelease ( ) { hudson . model . FreeStyleBuild build = mock ( hudson . model . FreeStyleBuild . class ) ; hudson . scm . ChangeLogSet changeLogSet = mock ( hudson . scm . ChangeLogSet . class ) ; when ( build . getChangeSet ( ) ) . thenReturn ( changeLogSet ) ; java . util . Set < ? extends hudson . scm . ChangeLogSet . Entry > entries = com . google . common . collect . Sets . newHashSet ( new hudson . plugins . jira . selector . DefaultIssueSelectorTest . MockEntry ( "prepare<sp>release<sp>project-4.7.1" ) ) ; when ( changeLogSet . iterator ( ) ) . thenReturn ( entries . iterator ( ) ) ; java . util . Set < java . lang . String > ids = new java . util . LinkedHashSet ( ) ; hudson . plugins . jira . selector . DefaultIssueSelector . findIssues ( build , ids , JiraSite . DEFAULT_ISSUE_PATTERN , null ) ; "<AssertPlaceHolder>" ; } findIssues ( hudson . model . Run , java . util . Set , java . util . regex . Pattern , hudson . model . TaskListener ) { for ( hudson . scm . ChangeLogSet < ? extends hudson . scm . ChangeLogSet . Entry > set : hudson . plugins . jira . RunScmChangeExtractor . getChanges ( build ) ) { for ( hudson . scm . ChangeLogSet . Entry change : set ) { hudson . plugins . jira . selector . DefaultIssueSelector . LOGGER . fine ( ( "Looking<sp>for<sp>JIRA<sp>ID<sp>in<sp>" + ( change . getMsg ( ) ) ) ) ; java . util . regex . Matcher m = pattern . matcher ( change . getMsg ( ) ) ; while ( m . find ( ) ) { if ( ( m . groupCount ( ) ) >= 1 ) { java . lang . String content = org . apache . commons . lang . StringUtils . upperCase ( m . group ( 1 ) ) ; issueIds . add ( content ) ; } else { listener . getLogger ( ) . println ( ( ( "Warning:<sp>The<sp>JIRA<sp>pattern<sp>" + pattern ) + "<sp>doesn't<sp>define<sp>a<sp>capturing<sp>group!" ) ) ; } } } } }
org . junit . Assert . assertEquals ( 0 , ids . size ( ) )
shouldGetTimeOutWhenStatusRunningAndTimerMetricValueIsLifeTimeAndStatusDescriptorIsNew1 ( ) { when ( descriptor . getRunStats ( ) ) . thenReturn ( metricList ) ; when ( descriptor . getStatus ( ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . models . NEW ) ; when ( stat . getName ( ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . models . LIFETIME ) ; when ( stat . getValue ( ) ) . thenReturn ( org . eclipse . che . ide . ext . runner . client . models . ALWAYS_ON ) ; runner . setProcessDescriptor ( descriptor ) ; runner . setStatus ( Runner . Status . RUNNING ) ; "<AssertPlaceHolder>" ; verify ( descriptor , times ( 2 ) ) . getRunStats ( ) ; verify ( descriptor ) . getStatus ( ) ; verify ( stat , times ( 2 ) ) . getName ( ) ; verify ( stat ) . getValue ( ) ; } getTimeout ( ) { if ( appContext . getWorkspace ( ) . getAttributes ( ) . containsKey ( Constants . RUNNER_LIFETIME ) ) { java . lang . String value = appContext . getWorkspace ( ) . getAttributes ( ) . get ( Constants . RUNNER_LIFETIME ) ; org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Shutdown shutdown = org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Shutdown . detect ( java . lang . Integer . parseInt ( value ) ) ; return shutdown != null ? shutdown : org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Shutdown . BY_TIMEOUT_4 ; } else { return org . eclipse . che . ide . ext . runner . client . tabs . properties . panel . common . Shutdown . BY_TIMEOUT_4 ; } }
org . junit . Assert . assertThat ( runner . getTimeout ( ) , org . hamcrest . core . Is . is ( org . eclipse . che . ide . ext . runner . client . models . ALWAYS_ON ) )
testListQuery ( ) { com . spikeify . SpikeifyService . register ( com . spikeify . entity . EntityOne . class ) ; com . spikeify . Map < java . lang . Long , com . spikeify . entity . EntityOne > entities = com . spikeify . TestUtils . randomEntityOne ( 1000 , setName ) ; int count = 0 ; for ( com . spikeify . entity . EntityOne entity : entities . values ( ) ) { entity . nine = new com . spikeify . ArrayList ( ) ; if ( ( count % 20 ) == 0 ) { entity . nine . add ( "content" ) ; } entity . nine . add ( com . spikeify . TestUtils . randomWord ( ) ) ; entity . nine . add ( com . spikeify . TestUtils . randomWord ( ) ) ; if ( ( count % 3 ) == 0 ) { sfy . create ( entity ) . now ( ) ; } else { sfy . create ( entity . userId , entity ) . setName ( setName ) . now ( ) ; } count ++ ; } com . spikeify . ResultSet < com . spikeify . entity . EntityOne > results = sfy . query ( com . spikeify . entity . EntityOne . class ) . filter ( "nine" , "content" ) . now ( ) ; com . spikeify . List < com . spikeify . entity . EntityOne > list = results . toList ( ) ; "<AssertPlaceHolder>" ; } toList ( ) { java . util . List < T > output = new java . util . ArrayList ( ) ; java . util . Iterator < T > iterator = iterator ( ) ; while ( iterator . hasNext ( ) ) { output . add ( iterator . next ( ) ) ; } close ( ) ; return output ; }
org . junit . Assert . assertEquals ( 50 , list . size ( ) )
orderBestOrders ( ) { vn . com . vndirect . exchangesimulator . matching . BestOrderQueue q = new vn . com . vndirect . exchangesimulator . matching . BestOrderQueue ( vn . com . vndirect . exchangesimulator . model . NewOrderSingle . BUY , new vn . com . vndirect . exchangesimulator . matching . PriceRange ( 16000 , 16500 , 100 ) , "VND" ) ; q . add ( vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( 1000 , 16200 ) ) ; q . add ( vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( 1000 , 16500 ) ) ; q . add ( vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( 1000 , 16400 ) ) ; vn . com . vndirect . exchangesimulator . model . NewOrderSingle target = vn . com . vndirect . exchangesimulator . matching . OrderFactory . createLOBuy ( 1000 , 16400 ) ; q . add ( target ) ; "<AssertPlaceHolder>" ; } getBestOrderList ( ) { vn . com . vndirect . exchangesimulator . matching . OrderList result = new vn . com . vndirect . exchangesimulator . matching . OrderList ( ) ; for ( vn . com . vndirect . exchangesimulator . matching . OrderList orders : orderList ) { result . addAll ( orders ) ; } return result ; }
org . junit . Assert . assertEquals ( target , q . getBestOrderList ( ) . get ( 2 ) )
shouldInstrumentSwitchWithIfParent ( ) { java . lang . String source = "if<sp>(<sp>i<sp>><sp>0<sp>)\n" + ( ( "<sp>case<sp>1:\n" 0 + "<sp>case<sp>1:<sp>break;\n" ) + "}\n" ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[1]++;\n" + ( ( ( ( ( ( ( "if<sp>(i<sp>><sp>0)<sp>{\n" + "<sp>_$jscoverage[\'test.js\'].lineData[2]++;\n" ) + "<sp>case<sp>1:\n" 0 ) + "<sp>case<sp>1:\n" ) + "<sp>_$jscoverage[\'test.js\'].lineData[3]++;\n" ) + "<sp>break;\n" ) + "<sp>}\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } instrumentSource ( java . lang . String ) { return instrumentSource ( uri , source ) ; }
org . junit . Assert . assertEquals ( expectedSource , instrumentedSource )
testTableSink ( ) { io . cdap . cdap . api . data . schema . Schema outputSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "purchase" , Schema . Field . of ( "rowkey" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "user" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "count" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) ) ; io . cdap . cdap . api . data . schema . Schema inputSchema = io . cdap . cdap . api . data . schema . Schema . recordOf ( "purchase" , Schema . Field . of ( "rowkey" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "user" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . STRING ) ) , Schema . Field . of ( "count" , io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . INT ) ) ) ; io . cdap . plugin . sink . HBaseSink . HBaseSinkConfig tableSinkConfig = new io . cdap . plugin . sink . HBaseSink . HBaseSinkConfig ( "hbaseSink" , "rowkey" , outputSchema . toString ( ) ) ; io . cdap . plugin . sink . HBaseSink tableSink = new io . cdap . plugin . sink . HBaseSink ( tableSinkConfig ) ; io . cdap . cdap . etl . mock . common . MockPipelineConfigurer mockPipelineConfigurer = new io . cdap . cdap . etl . mock . common . MockPipelineConfigurer ( inputSchema ) ; tableSink . configurePipeline ( mockPipelineConfigurer ) ; "<AssertPlaceHolder>" ; } getOutputSchema ( ) { java . util . List < io . cdap . cdap . api . data . schema . Schema . Field > fields = new java . util . ArrayList ( ) ; java . lang . String [ ] mappings = fieldTypeMapping . split ( "," ) ; for ( java . lang . String mapping : mappings ) { java . lang . String [ ] params = mapping . split ( ":" ) ; java . lang . String fieldName = params [ 0 ] . trim ( ) ; if ( com . google . common . base . Strings . isNullOrEmpty ( fieldName ) ) { throw new java . lang . IllegalArgumentException ( "Field<sp>name<sp>cannot<sp>be<sp>null<sp>or<sp>empty." ) ; } else if ( ( ( params . length ) < 2 ) || ( com . google . common . base . Strings . isNullOrEmpty ( params [ 1 ] ) ) ) { throw new java . lang . IllegalArgumentException ( ( "Type<sp>cannot<sp>be<sp>null.<sp>Please<sp>specify<sp>type<sp>for<sp>" + fieldName ) ) ; } io . cdap . cdap . api . data . schema . Schema . Field field = Schema . Field . of ( fieldName , io . cdap . cdap . api . data . schema . Schema . nullableOf ( io . cdap . cdap . api . data . schema . Schema . of ( Schema . Type . valueOf ( params [ 1 ] . trim ( ) . toUpperCase ( ) ) ) ) ) ; if ( fields . contains ( field ) ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "Field<sp>%s<sp>already<sp>has<sp>type<sp>specified.<sp>Duplicate<sp>field<sp>%s" , fieldName , fieldName ) ) ; } else { fields . add ( field ) ; } } return io . cdap . cdap . api . data . schema . Schema . recordOf ( "record" , fields ) ; }
org . junit . Assert . assertEquals ( outputSchema , mockPipelineConfigurer . getOutputSchema ( ) )
testUpdateTag ( ) { org . finra . herd . model . api . xml . TagKey parentTagKey = new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) ; org . finra . herd . model . api . xml . TagUpdateRequest request = new org . finra . herd . model . api . xml . TagUpdateRequest ( TAG_DISPLAY_NAME_3 , TAG_SEARCH_SCORE_MULTIPLIER_3 , TAG_DESCRIPTION_3 , parentTagKey ) ; org . finra . herd . model . api . xml . TagKey tagKey = new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE_2 ) ; org . finra . herd . model . api . xml . Tag tag = getNewTag ( tagKey ) ; when ( tagService . updateTag ( tagKey , request ) ) . thenReturn ( tag ) ; org . finra . herd . model . api . xml . Tag updatedTag = tagRestController . updateTag ( org . finra . herd . rest . TAG_TYPE , org . finra . herd . rest . TAG_CODE_2 , request ) ; verify ( tagService ) . updateTag ( tagKey , request ) ; verifyNoMoreInteractions ( tagService ) ; "<AssertPlaceHolder>" ; } updateTag ( org . finra . herd . model . api . xml . TagKey , org . finra . herd . model . api . xml . TagUpdateRequest ) { tagHelper . validateTagKey ( tagKey ) ; validateTagUpdateRequest ( tagKey , tagUpdateRequest ) ; org . finra . herd . model . jpa . TagEntity tagEntity = tagDaoHelper . getTagEntity ( tagKey ) ; if ( ! ( org . apache . commons . lang3 . StringUtils . equalsIgnoreCase ( tagEntity . getDisplayName ( ) , tagUpdateRequest . getDisplayName ( ) ) ) ) { tagDaoHelper . assertDisplayNameDoesNotExistForTag ( tagKey . getTagTypeCode ( ) , tagUpdateRequest . getDisplayName ( ) ) ; } java . util . List < org . finra . herd . model . jpa . TagEntity > tagEntities = new java . util . ArrayList ( ) ; tagEntities . add ( tagEntity ) ; if ( ( tagEntity . getParentTagEntity ( ) ) != null ) { tagEntities . add ( tagEntity . getParentTagEntity ( ) ) ; } org . finra . herd . model . jpa . TagEntity parentTagEntity = null ; if ( ( tagUpdateRequest . getParentTagKey ( ) ) != null ) { parentTagEntity = tagDaoHelper . getTagEntity ( tagUpdateRequest . getParentTagKey ( ) ) ; tagDaoHelper . validateParentTagEntity ( tagEntity , parentTagEntity ) ; tagEntities . add ( parentTagEntity ) ; } updateTagEntity ( tagEntity , tagUpdateRequest , parentTagEntity ) ; java . util . List < org . finra . herd . model . jpa . BusinessObjectDefinitionEntity > businessObjectDefinitionEntities = businessObjectDefinitionDao . getBusinessObjectDefinitions ( tagEntities ) ; org . finra . herd . service . impl . TagServiceImpl . LOGGER . info ( ( "Modify<sp>the<sp>business<sp>object<sp>definitions<sp>in<sp>the<sp>search<sp>index<sp>associated<sp>with<sp>the<sp>tag<sp>being<sp>updated." + "<sp>tagTypeCode=\"{}\",<sp>tagCode=\"{}\",<sp>businessObjectDefinitionIds=[{}],<sp>searchIndexUpdateType=\"{}\"" ) , tagKey . getTagTypeCode ( ) , tagKey . getTagCode ( ) , businessObjectDefinitionEntities . stream ( ) . map ( ( businessObjectDefinitionEntity ) -> java . lang . String . valueOf ( businessObjectDefinitionEntity . getId ( ) ) ) . collect ( java . util . stream . Collectors . joining ( ",<sp>" ) ) , org . finra . herd . service . impl . SEARCH_INDEX_UPDATE_TYPE_UPDATE ) ; searchIndexUpdateHelper . modifyBusinessObjectDefinitionsInSearchIndex ( businessObjectDefinitionEntities , org . finra . herd . service . impl . SEARCH_INDEX_UPDATE_TYPE_UPDATE ) ; org . finra . herd . service . impl . TagServiceImpl . LOGGER . info ( ( "Modify<sp>the<sp>tags<sp>in<sp>the<sp>search<sp>index<sp>associated<sp>with<sp>the<sp>tag<sp>being<sp>updated." + "<sp>tagTypeCode=\"{}\",<sp>tagCode=\"{}\",<sp>tagIds=[{}],<sp>searchIndexUpdateType=\"{}\"" ) , tagKey . getTagTypeCode ( ) , tagKey . getTagCode ( ) , tagEntities . stream ( ) . map ( ( tag ) -> java . lang . String . format ( "{tagTypeCode=\"%s\",<sp>tagCode=\"%s\"}" , tag . getTagType ( ) . getCode ( ) , tag . getTagCode ( ) ) ) . collect ( java . util . stream . Collectors . joining ( ",<sp>" ) ) , org . finra . herd . service . impl . SEARCH_INDEX_UPDATE_TYPE_UPDATE ) ; searchIndexUpdateHelper . modifyTagsInSearchIndex ( tagEntities , org . finra . herd . service . impl . SEARCH_INDEX_UPDATE_TYPE_UPDATE ) ; return createTagFromEntity ( tagEntity ) ; }
org . junit . Assert . assertEquals ( tag , updatedTag )
testTableExists ( ) { final com . amazonaws . services . dynamodbv2 . model . DescribeTableResult result = new com . amazonaws . services . dynamodbv2 . model . DescribeTableResult ( ) ; dynamoDB . describeTable ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) ; org . powermock . api . easymock . PowerMock . expectLastCall ( ) . andReturn ( result ) ; org . powermock . api . easymock . PowerMock . replayAll ( ) ; "<AssertPlaceHolder>" ; org . powermock . api . easymock . PowerMock . verifyAll ( ) ; } doesTableExist ( com . amazonaws . services . dynamodbv2 . AmazonDynamoDB , java . lang . String ) { try { dynamoDB . describeTable ( tableName ) ; return true ; } catch ( final com . amazonaws . services . dynamodbv2 . model . ResourceNotFoundException e ) { return false ; } catch ( final com . amazonaws . AmazonClientException e ) { com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManager . LOGGER . severe ( e . getMessage ( ) ) ; return false ; } }
org . junit . Assert . assertTrue ( com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManager . doesTableExist ( dynamoDB , com . amazonaws . services . dynamodbv2 . json . demo . mars . util . DynamoDBManagerTest . tableName ) )
testGetMolecularFormula_int ( ) { org . openscience . cdk . interfaces . IAdductFormula mfS = getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IAdductFormula . class ) ; mfS . addMolecularFormula ( getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ) ; mfS . addMolecularFormula ( getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ) ; mfS . addMolecularFormula ( getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ) ; "<AssertPlaceHolder>" ; } getMolecularFormula ( org . openscience . cdk . interfaces . IAtomContainer ) { org . openscience . cdk . interfaces . IMolecularFormula formula = atomContainer . getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ; return org . openscience . cdk . tools . manipulator . MolecularFormulaManipulator . getMolecularFormula ( atomContainer , formula ) ; }
org . junit . Assert . assertNotNull ( mfS . getMolecularFormula ( 2 ) )
testGetRelaties ( ) { nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijst pl = nl . bzk . migratiebrp . conversie . model . brp . BrpPersoonslijstTest . createPL ( ) ; java . util . List < nl . bzk . migratiebrp . conversie . model . brp . BrpRelatie > lijst = pl . getRelaties ( BrpSoortRelatieCode . FAMILIERECHTELIJKE_BETREKKING ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , lijst . size ( ) )
rdfMappingThreeColTester ( ) { org . aksw . limes . core . io . mapping . AMapping testMap = org . aksw . limes . core . io . mapping . MappingFactory . createDefaultMapping ( ) ; testMap . add ( "http://linkedgeodata.org/triplify/node2806760713" , "http://linkedgeodata.org/triplify/node2478449224" , 1.0 ) ; testMap . add ( "http://linkedgeodata.org/triplify/node2806760713" , "http://linkedgeodata.org/triplify/node1387111642" , 1.0 ) ; testMap . add ( "http://linkedgeodata.org/triplify/node2806760713" , "http://linkedgeodata.org/triplify/node2406512815" , 1.0 ) ; testMap . setPredicate ( "http://linkedgeodata.org/ontology/near" ) ; java . lang . String file = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "mapping-test.nt" ) . getPath ( ) ; org . aksw . limes . core . io . mapping . reader . RDFMappingReader r = new org . aksw . limes . core . io . mapping . reader . RDFMappingReader ( file ) ; org . aksw . limes . core . io . mapping . AMapping readMap = r . read ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( org . aksw . limes . core . datastrutures . PairDissimilar . getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . aksw . limes . core . datastrutures . PairSimilar < ? > other = ( ( org . aksw . limes . core . datastrutures . PairSimilar < ? > ) ( obj ) ) ; if ( ( a ) == null ) { if ( ( other . a ) != null ) return false ; } else if ( ! ( a . equals ( other . a ) ) ) return false ; if ( ( b ) == null ) { if ( ( other . b ) != null ) return false ; } else if ( ! ( b . equals ( other . b ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( readMap . equals ( testMap ) )
testXMLSerialisation ( ) { org . apache . ivy . osgi . repo . FSManifestIterable it = new org . apache . ivy . osgi . repo . FSManifestIterable ( bundlerepo ) ; org . apache . ivy . osgi . repo . BundleRepoDescriptor repo = new org . apache . ivy . osgi . repo . BundleRepoDescriptor ( bundlerepo . toURI ( ) , org . apache . ivy . osgi . core . ExecutionEnvironmentProfileProvider . getInstance ( ) ) ; repo . populate ( it . iterator ( ) ) ; javax . xml . transform . sax . SAXTransformerFactory tf = ( ( javax . xml . transform . sax . SAXTransformerFactory ) ( javax . xml . transform . sax . SAXTransformerFactory . newInstance ( ) ) ) ; javax . xml . transform . sax . TransformerHandler hd ; try { hd = tf . newTransformerHandler ( ) ; } catch ( javax . xml . transform . TransformerConfigurationException e ) { throw new org . apache . tools . ant . BuildException ( ( "Sax<sp>configuration<sp>error:<sp>" + ( e . getMessage ( ) ) ) , e ) ; } java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; javax . xml . transform . stream . StreamResult stream = new javax . xml . transform . stream . StreamResult ( out ) ; hd . setResult ( stream ) ; org . apache . ivy . osgi . obr . xml . OBRXMLWriter . writeManifests ( it , hd , false ) ; java . io . ByteArrayInputStream in = new java . io . ByteArrayInputStream ( out . toByteArray ( ) ) ; org . apache . ivy . osgi . repo . BundleRepoDescriptor repo2 = org . apache . ivy . osgi . obr . xml . OBRXMLParser . parse ( bundlerepo . toURI ( ) , in ) ; "<AssertPlaceHolder>" ; } parse ( java . net . URI , java . io . InputStream ) { org . apache . ivy . osgi . obr . xml . OBRXMLParser . RepositoryHandler handler = new org . apache . ivy . osgi . obr . xml . OBRXMLParser . RepositoryHandler ( baseUri ) ; try { org . apache . ivy . util . XMLHelper . parse ( in , null , handler , null ) ; } catch ( javax . xml . parsers . ParserConfigurationException e ) { throw new org . xml . sax . SAXException ( e ) ; } return handler . repo ; }
org . junit . Assert . assertEquals ( repo , repo2 )
testEmptyEchoBytes ( ) { java . nio . ByteBuffer data = java . nio . ByteBuffer . allocate ( 0 ) ; java . nio . ByteBuffer echoed = org . apache . avro . TestProtocolSpecific . proxy . echoBytes ( data ) ; data . flip ( ) ; "<AssertPlaceHolder>" ; } echoBytes ( java . nio . ByteBuffer ) { return data ; }
org . junit . Assert . assertEquals ( data , echoed )
isAmong_null_returnsFalse ( ) { java . lang . String [ ] haystack = new java . lang . String [ ] { "something" , "some<sp>other<sp>thing" } ; boolean found = eu . chargetime . ocpp . utilities . ModelUtil . isAmong ( null , haystack ) ; "<AssertPlaceHolder>" ; } isAmong ( java . lang . String , java . lang . String [ ] ) { boolean found = false ; if ( hayStack != null ) { for ( java . lang . String straw : hayStack ) { if ( found = eu . chargetime . ocpp . utilities . ModelUtil . isNullOrEqual ( straw , needle ) ) { break ; } } } return found ; }
org . junit . Assert . assertThat ( found , org . hamcrest . CoreMatchers . is ( false ) )
createHashSet_noArgs ( ) { java . util . Set < java . lang . Integer > set = createHashSet ( ) ; "<AssertPlaceHolder>" ; } createHashSet ( ) { return new java . util . HashSet < T > ( ) ; }
org . junit . Assert . assertTrue ( ( set instanceof java . util . HashSet < ? > ) )
decapitalizeForEmptyString ( ) { "<AssertPlaceHolder>" ; } decapitalize ( java . lang . String ) { if ( org . slim3 . util . StringUtil . isEmpty ( text ) ) { return text ; } char [ ] chars = text . toCharArray ( ) ; if ( ( ( ( chars . length ) >= 2 ) && ( java . lang . Character . isUpperCase ( chars [ 0 ] ) ) ) && ( java . lang . Character . isUpperCase ( chars [ 1 ] ) ) ) { return text ; } chars [ 0 ] = java . lang . Character . toLowerCase ( chars [ 0 ] ) ; return new java . lang . String ( chars ) ; }
org . junit . Assert . assertThat ( org . slim3 . util . StringUtil . decapitalize ( "" ) , org . hamcrest . CoreMatchers . is ( "" ) )
testContainerCompleteMsgNotLostAfterAMFailedAndRMRestart ( ) { rm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockRM ( conf ) ; rm1 . start ( ) ; org . apache . hadoop . yarn . server . resourcemanager . MockNM nm1 = new org . apache . hadoop . yarn . server . resourcemanager . MockNM ( "127.0.0.1:1234" , 8192 , rm1 . getResourceTrackerService ( ) ) ; nm1 . registerNode ( ) ; org . apache . hadoop . yarn . api . records . Resource resource = org . apache . hadoop . yarn . util . Records . newRecord ( org . apache . hadoop . yarn . api . records . Resource . class ) ; resource . setMemorySize ( 200 ) ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp app0 = rm1 . submitApp ( resource , "" , org . apache . hadoop . security . UserGroupInformation . getCurrentUser ( ) . getShortUserName ( ) , null , false , null , YarnConfiguration . DEFAULT_RM_AM_MAX_ATTEMPTS , null , null , true , true , false , null , 0 , null , true , null ) ; org . apache . hadoop . yarn . server . resourcemanager . MockAM am0 = org . apache . hadoop . yarn . server . resourcemanager . MockRM . launchAndRegisterAM ( app0 , rm1 , nm1 ) ; am0 . allocate ( "127.0.0.1" , 1000 , 2 , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) ; nm1 . nodeHeartbeat ( true ) ; java . util . List < org . apache . hadoop . yarn . api . records . Container > conts = am0 . allocate ( new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ResourceRequest > ( ) , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) . getAllocatedContainers ( ) ; while ( ( conts . size ( ) ) < 2 ) { nm1 . nodeHeartbeat ( true ) ; conts . addAll ( am0 . allocate ( new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ResourceRequest > ( ) , new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ContainerId > ( ) ) . getAllocatedContainers ( ) ) ; java . lang . Thread . sleep ( 100 ) ; } nm1 . nodeHeartbeat ( am0 . getApplicationAttemptId ( ) , 1 , ContainerState . COMPLETE ) ; rm1 . waitForState ( app0 . getApplicationId ( ) , RMAppState . ACCEPTED ) ; org . apache . hadoop . yarn . server . resourcemanager . MockAM am1 = org . apache . hadoop . yarn . server . resourcemanager . MockRM . launchAndRegisterAM ( app0 , rm1 , nm1 ) ; rm2 = new org . apache . hadoop . yarn . server . resourcemanager . MockRM ( conf , rm1 . getRMStateStore ( ) ) ; rm2 . start ( ) ; nm1 . setResourceTrackerService ( rm2 . getResourceTrackerService ( ) ) ; org . apache . hadoop . yarn . server . api . protocolrecords . NMContainerStatus amContainer = org . apache . hadoop . yarn . server . resourcemanager . TestRMRestart . createNMContainerStatus ( am0 . getApplicationAttemptId ( ) , 1 , ContainerState . RUNNING ) ; org . apache . hadoop . yarn . server . api . protocolrecords . NMContainerStatus completedContainer = org . apache . hadoop . yarn . server . resourcemanager . TestRMRestart . createNMContainerStatus ( am0 . getApplicationAttemptId ( ) , 2 , ContainerState . COMPLETE ) ; org . apache . hadoop . yarn . server . api . protocolrecords . NMContainerStatus runningContainer = org . apache . hadoop . yarn . server . resourcemanager . TestRMRestart . createNMContainerStatus ( am0 . getApplicationAttemptId ( ) , 3 , ContainerState . RUNNING ) ; nm1 . registerNode ( java . util . Arrays . asList ( amContainer , runningContainer , completedContainer ) , null ) ; java . lang . Thread . sleep ( 200 ) ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . RMApp recoveredApp0 = rm2 . getRMContext ( ) . getRMApps ( ) . get ( app0 . getApplicationId ( ) ) ; org . apache . hadoop . yarn . server . resourcemanager . rmapp . attempt . RMAppAttempt loadedAttempt1 = recoveredApp0 . getCurrentAppAttempt ( ) ; "<AssertPlaceHolder>" ; } getJustFinishedContainers ( ) { this . readLock . lock ( ) ; try { java . util . List < org . apache . hadoop . yarn . api . records . ContainerStatus > returnList = new java . util . ArrayList ( ) ; for ( java . util . Collection < org . apache . hadoop . yarn . api . records . ContainerStatus > containerStatusList : justFinishedContainers . values ( ) ) { returnList . addAll ( containerStatusList ) ; } return returnList ; } finally { this . readLock . unlock ( ) ; } }
org . junit . Assert . assertEquals ( 1 , loadedAttempt1 . getJustFinishedContainers ( ) . size ( ) )
carIsValid ( ) { com . example . Car car = new com . example . Car ( "Morris" , "DD-AB-123" , 2 ) ; java . util . Set < javax . validation . ConstraintViolation < com . example . Car > > constraintViolations = com . example . CarTest . validator . validate ( car ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , constraintViolations . size ( ) )
shouldReturnFalseWhenComparingContainerAndContainer ( ) { org . eclipse . egit . core . synchronize . GitResourceVariantComparator grvc = new org . eclipse . egit . core . synchronize . GitResourceVariantComparator ( null ) ; org . eclipse . core . runtime . IPath localPath = mock ( org . eclipse . core . runtime . IPath . class ) ; org . eclipse . core . resources . IContainer local = mock ( org . eclipse . core . resources . IContainer . class ) ; when ( local . exists ( ) ) . thenReturn ( true ) ; when ( local . getLocation ( ) ) . thenReturn ( localPath ) ; java . io . File file = testRepo . createFile ( iProject , ( ( "test" + ( java . io . File . separator ) ) + "keep" ) ) ; org . eclipse . jgit . revwalk . RevCommit commit = testRepo . addAndCommit ( iProject , file , "initial<sp>commit" ) ; java . lang . String path = org . eclipse . jgit . lib . Repository . stripWorkDir ( repo . getWorkTree ( ) , file ) ; org . eclipse . egit . core . synchronize . GitRemoteFolder remote = new org . eclipse . egit . core . synchronize . GitRemoteFolder ( repo , null , commit , commit . getTree ( ) , path ) ; "<AssertPlaceHolder>" ; } compare ( org . eclipse . jgit . lib . Repository , org . eclipse . jgit . lib . Repository ) { java . lang . String name1 = o1 . getWorkTree ( ) . getName ( ) ; java . lang . String name2 = o2 . getWorkTree ( ) . getName ( ) ; return name1 . compareToIgnoreCase ( name2 ) ; }
org . junit . Assert . assertFalse ( grvc . compare ( local , remote ) )
testOnBucketEmptyAllowed ( ) { org . bukkit . block . Block block = mock ( org . bukkit . block . Block . class ) ; when ( block . getLocation ( ) ) . thenReturn ( location ) ; when ( block . getRelative ( org . mockito . Mockito . any ( ) ) ) . thenReturn ( block ) ; org . bukkit . inventory . ItemStack item = mock ( org . bukkit . inventory . ItemStack . class ) ; org . bukkit . event . player . PlayerBucketEmptyEvent e = new org . bukkit . event . player . PlayerBucketEmptyEvent ( player , block , org . bukkit . block . BlockFace . UP , org . bukkit . Material . WATER_BUCKET , item ) ; l . onBucketEmpty ( e ) ; "<AssertPlaceHolder>" ; } isCancelled ( ) { return cancelled ; }
org . junit . Assert . assertFalse ( e . isCancelled ( ) )
whenPopValueWeGetItAndRemoveValueFromList ( ) { ru . szhernovoy . linkedlist . QueueLinkedList < java . lang . Integer > dlink = new ru . szhernovoy . linkedlist . QueueLinkedList ( ) ; dlink . push ( 4 ) ; dlink . push ( 12 ) ; dlink . push ( ( - 7 ) ) ; System . out . println ( dlink . getCapacility ( ) ) ; int control = dlink . pop ( ) ; System . out . println ( dlink . getCapacility ( ) ) ; "<AssertPlaceHolder>" ; } getCapacility ( ) { return this . size ; }
org . junit . Assert . assertThat ( control , org . hamcrest . core . Is . is ( ( - 7 ) ) )
testGetSetCurrentPlayer ( ) { it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatus bs = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . BoardStatus ( 1 ) ; it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player p = new it . polimi . deib . provaFinale2014 . andrea . celli_stefano1 . cereda . gameModel . players . Player ( ) ; p . setID ( ) ; bs . addPlayerToBoardStatus ( p ) ; bs . setCurrentPlayer ( p ) ; "<AssertPlaceHolder>" ; } getCurrentPlayer ( ) { return currentPlayer ; }
org . junit . Assert . assertEquals ( p , bs . getCurrentPlayer ( ) )
testCharacterNoMatchReservedCharacter ( ) { char reserved = 'f' ; org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher underTest = new org . dataconservancy . packaging . tool . impl . support . validation . GenericCharacterMatcher ( reserved ) ; char toTest = 'b' ; "<AssertPlaceHolder>" ; } matches ( java . lang . Object ) { if ( o == null ) { throw new java . lang . IllegalArgumentException ( "Supplied<sp>Character<sp>must<sp>not<sp>be<sp>null." ) ; } if ( ! ( o instanceof java . lang . Character ) ) { throw new java . lang . IllegalArgumentException ( "Supplied<sp>object<sp>must<sp>be<sp>an<sp>instanceof<sp>Character" ) ; } java . lang . Character ch = ( ( java . lang . Character ) ( o ) ) ; return org . dataconservancy . packaging . tool . impl . support . validation . ValidationUtils . isInvalidUf8Char ( ch ) ; }
org . junit . Assert . assertFalse ( underTest . matches ( toTest ) )
runBenchFlowTestValid ( ) { java . io . InputStream testBundle = cloud . benchflow . testmanager . helpers . constants . TestBundle . getLoadTestBundleInputStream ( temporaryFolder ) ; java . lang . String expectedTestID = ( ( ( ( cloud . benchflow . testmanager . helpers . constants . TestConstants . TEST_USER_NAME ) + ( MODEL_ID_DELIMITER ) ) + ( cloud . benchflow . testmanager . helpers . constants . TestConstants . LOAD_TEST_NAME ) ) + ( MODEL_ID_DELIMITER ) ) + 1 ; org . mockito . Mockito . doReturn ( expectedTestID ) . when ( testModelDAOMock ) . addTestModel ( org . mockito . Mockito . matches ( TestConstants . LOAD_TEST_NAME ) , org . mockito . Mockito . any ( cloud . benchflow . testmanager . models . User . class ) ) ; cloud . benchflow . testmanager . api . response . RunBenchFlowTestResponse response = resource . runBenchFlowTest ( TestConstants . TEST_USER_NAME , testBundle , cloud . benchflow . testmanager . resources . BenchFlowTestResourceTest . httpServletRequestMock ) ; "<AssertPlaceHolder>" ; } getTestID ( ) { return testID ; }
org . junit . Assert . assertTrue ( response . getTestID ( ) . contains ( TestConstants . LOAD_TEST_NAME ) )
testBaseUriResolutionWithoutSlash ( ) { java . lang . String base = "https://test.com" ; java . lang . String relative = "/api/push/" ; java . lang . String expected = "https://test.com/api/push/" ; java . net . URI uriBase = new java . net . URI ( base ) ; java . net . URI uriNuResolved = com . urbanairship . api . client . RequestUtils . resolveURI ( uriBase , relative ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( ( "SinglePushInfoResponse{" + "pushId=" ) + ( pushId ) ) + ",<sp>directResponses=" ) + ( directResponses ) ) + ",<sp>sends=" ) + ( sends ) ) + ",<sp>pushType=" ) + ( pushType ) ) + ",<sp>pushTime=" ) + ( pushTime ) ) + ",<sp>groupID=" ) + ( groupID ) ) + '}' ; }
org . junit . Assert . assertEquals ( expected , uriNuResolved . toString ( ) )
checkNBTOutput ( ) { com . voxelwind . server . game . item . VoxelwindItemStack itemStack = new com . voxelwind . server . game . item . VoxelwindItemStack ( com . voxelwind . api . game . item . ItemTypes . COAL , 1 , com . voxelwind . api . game . item . data . Coal . CHARCOAL ) ; short data = com . voxelwind . server . game . serializer . MetadataSerializer . serializeMetadata ( itemStack ) ; "<AssertPlaceHolder>" ; } serializeMetadata ( com . voxelwind . api . game . level . block . BlockState ) { return com . voxelwind . server . game . serializer . MetadataSerializer . INSTANCE . readMetadata ( block ) ; }
org . junit . Assert . assertEquals ( data , 1 )
testIn2 ( ) { org . infinispan . query . dsl . QueryFactory qf = org . infinispan . all . embeddedquery . QueryDslConditionsTest . getQueryFactory ( ) ; org . infinispan . query . dsl . Query q = qf . from ( org . infinispan . all . embeddedquery . QueryDslConditionsTest . getModelFactory ( ) . getUserImplClass ( ) ) . having ( "id" ) . in ( 4 ) . build ( ) ; java . util . List < org . infinispan . all . embeddedquery . testdomain . User > list = q . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return cache . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , list . size ( ) )
testAddEntryFromString ( ) { java . io . File tempZipFile = new java . io . File ( _tempZipFilePath ) ; com . liferay . portal . kernel . zip . ZipWriter zipWriter = new com . liferay . portal . zip . ZipWriterImpl ( tempZipFile ) ; zipWriter . addEntry ( "string.txt" , "This<sp>is<sp>a<sp>string." ) ; java . io . File file = zipWriter . getFile ( ) ; com . liferay . portal . kernel . zip . ZipReader zipReader = new com . liferay . portal . zip . ZipReaderImpl ( file ) ; "<AssertPlaceHolder>" ; zipReader . close ( ) ; file . delete ( ) ; } getEntryAsString ( java . lang . String ) { return _entries . get ( name ) ; }
org . junit . Assert . assertEquals ( "This<sp>is<sp>a<sp>string." , zipReader . getEntryAsString ( "string.txt" ) )
testMemoryOffsetAfterClearIsSameAsNewTypedProperties ( ) { org . apache . activemq . artemis . utils . collections . TypedProperties props = new org . apache . activemq . artemis . utils . collections . TypedProperties ( ) ; props . putSimpleStringProperty ( org . apache . activemq . artemis . api . core . SimpleString . toSimpleString ( "helllllloooooo" ) , org . apache . activemq . artemis . api . core . SimpleString . toSimpleString ( "raaaaaaaaaaaaaaaaaaaaaaaa" ) ) ; props . clear ( ) ; "<AssertPlaceHolder>" ; } getMemoryOffset ( ) { return ( properties ) == null ? 0 : ( size ) + ( ( 2 * ( org . apache . activemq . artemis . utils . DataConstants . SIZE_INT ) ) * ( properties . size ( ) ) ) ; }
org . junit . Assert . assertEquals ( new org . apache . activemq . artemis . utils . collections . TypedProperties ( ) . getMemoryOffset ( ) , props . getMemoryOffset ( ) )
testST_RemoveHoles ( ) { com . vividsolutions . jts . geom . Polygon polygon = ( ( com . vividsolutions . jts . geom . Polygon ) ( wKTReader . read ( ( "POLYGON<sp>((<sp>112<sp>68,<sp>112<sp>307,<sp>318<sp>307,<sp>318<sp>68,<sp>112<sp>68<sp>),<sp>" + "(<sp>184<sp>169,<sp>247<sp>197,<sp>242<sp>247,<sp>167<sp>258,<sp>184<sp>169<sp>))" ) ) ) ) ; com . vividsolutions . jts . geom . Polygon expected = ( ( com . vividsolutions . jts . geom . Polygon ) ( wKTReader . read ( "POLYGON<sp>((<sp>112<sp>68,<sp>112<sp>307,<sp>318<sp>307,<sp>318<sp>68,<sp>112<sp>68<sp>))" ) ) ) ; com . vividsolutions . jts . geom . Geometry result = org . orbisgis . mapeditor . map . geometryUtils . GeometryEdit . removeHole ( polygon ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof org . orbisgis . sif . common . ContainerItem ) { org . orbisgis . sif . common . ContainerItem other = ( ( org . orbisgis . sif . common . ContainerItem ) ( obj ) ) ; return ! ( ( this . key ) == null ? ( other . key ) != null : ! ( this . key . equals ( other . key ) ) ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( result . equals ( expected ) )
testDeliveryResultTypeSets ( ) { java . lang . String code = "" ; try { code = _setupTestDeliveryResultType ( true ) ; _checkDeliveryResultTypeIntoDb ( code ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; "<AssertPlaceHolder>" ; } return ; } _checkDeliveryResultTypeIntoDb ( java . lang . String ) { org . isf . dlvrrestype . model . DeliveryResultType foundDeliveryResultType ; foundDeliveryResultType = ( ( org . isf . dlvrrestype . model . DeliveryResultType ) ( org . isf . dlvrrestype . test . Tests . jpa . find ( org . isf . dlvrrestype . model . DeliveryResultType . class , code ) ) ) ; org . isf . dlvrrestype . test . Tests . testDeliveryResultType . check ( foundDeliveryResultType ) ; return ; }
org . junit . Assert . assertEquals ( true , false )
testNDArrayToWritablesScalars ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . arange ( 5 ) ; java . util . List < org . datavec . api . writable . Writable > expected = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) expected . add ( new org . datavec . api . writable . DoubleWritable ( i ) ) ; java . util . List < org . datavec . api . writable . Writable > actual = new org . datavec . local . transforms . misc . NDArrayToWritablesFunction ( ) . apply ( arr ) ; "<AssertPlaceHolder>" ; } apply ( org . nd4j . linalg . api . ndarray . INDArray ) { if ( ( arr . rows ( ) ) != 1 ) throw new java . lang . UnsupportedOperationException ( ( ( ( "Only<sp>NDArray<sp>row<sp>vectors<sp>can<sp>be<sp>converted<sp>to<sp>list" + "<sp>of<sp>Writables<sp>(found<sp>" ) + ( arr . rows ( ) ) ) + "<sp>rows)" ) ) ; java . util . List < org . datavec . api . writable . Writable > record = new java . util . ArrayList ( ) ; if ( useNdarrayWritable ) { record . add ( new org . datavec . api . writable . NDArrayWritable ( arr ) ) ; } else { for ( int i = 0 ; i < ( arr . columns ( ) ) ; i ++ ) record . add ( new org . datavec . api . writable . DoubleWritable ( arr . getDouble ( i ) ) ) ; } return record ; }
org . junit . Assert . assertEquals ( expected , actual )
testIsSelected ( ) { classUnderTest . setSelected ( true ) ; "<AssertPlaceHolder>" ; } isSelected ( ) { return _selected ; }
org . junit . Assert . assertEquals ( true , classUnderTest . isSelected ( ) )
test ( ) { io . ebean . EbeanServer server = io . ebean . Ebean . getServer ( "mysql" ) ; org . tests . model . basic . EBasic basic = new org . tests . model . basic . EBasic ( ) ; basic . setName ( "calling" ) ; server . save ( basic ) ; io . ebean . CallableSql cs = server . createCallableSql ( "{call<sp>my_stored_procedure(?,?)}" ) ; cs . setParameter ( 1 , basic . getId ( ) ) ; cs . setParameter ( 2 , "modBySP" ) ; server . execute ( cs ) ; org . tests . model . basic . EBasic basic1 = server . find ( org . tests . model . basic . EBasic . class , basic . getId ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "modBySP" , basic1 . getName ( ) )
testPfam ( ) { final java . lang . String name = SignatureLibrary . PFAM . getName ( ) ; final uk . ac . ebi . interpro . scan . web . model . MatchDataSource m = uk . ac . ebi . interpro . scan . web . model . MatchDataSource . parseName ( name ) ; "<AssertPlaceHolder>" ; } parseName ( java . lang . String ) { if ( name != null ) { name = name . toLowerCase ( ) . replaceAll ( "\\s+" , "" ) ; if ( name . contains ( "_" ) ) { name = name . replaceAll ( "_" , "" ) ; if ( name . contains ( "gram" ) ) { name = name . replaceAll ( "TIGRFAMS" 1 , "+prok" ) ; name = name . replaceAll ( "TIGRFAMS" 2 , "-prok" ) ; } } if ( name . equals ( "TIGRFAMS" 3 ) ) { return uk . ac . ebi . interpro . scan . web . model . MatchDataSource . TIGRFAMS ; } for ( uk . ac . ebi . interpro . scan . web . model . MatchDataSource m : uk . ac . ebi . interpro . scan . web . model . MatchDataSource . values ( ) ) { java . lang . String mName = m . toString ( ) . toLowerCase ( ) ; if ( name . equals ( mName ) ) { return m ; } else { mName = mName . replaceAll ( "\\s+" , "" ) ; if ( name . equals ( mName ) ) { return m ; } } } } return uk . ac . ebi . interpro . scan . web . model . MatchDataSource . UNKNOWN ; }
org . junit . Assert . assertEquals ( MatchDataSource . PFAM , m )
testAutocastLong ( ) { org . openl . meta . BigDecimalValue expectedResult = new org . openl . meta . BigDecimalValue ( "2000000000" ) ; java . lang . Long value = java . lang . Long . valueOf ( "2000000000" ) ; org . openl . meta . BigDecimalValue result = org . openl . meta . BigDecimalValue . autocast ( value . longValue ( ) , null ) ; "<AssertPlaceHolder>" ; } longValue ( ) { return value ; }
org . junit . Assert . assertEquals ( expectedResult , result )
searchSubscriptions ( ) { org . oscm . dataservice . bean . DataServiceBean bean = spy ( new org . oscm . dataservice . bean . DataServiceBean ( ) ) ; org . oscm . subscriptionservice . bean . SubscriptionSearchServiceBean ssb = spy ( new org . oscm . subscriptionservice . bean . SubscriptionSearchServiceBean ( ) ) ; doReturn ( bean ) . when ( ssb ) . getDm ( ) ; org . hibernate . search . jpa . FullTextEntityManager ftem = mock ( org . hibernate . search . jpa . FullTextEntityManager . class , Mockito . RETURNS_DEEP_STUBS ) ; doReturn ( ftem ) . when ( ssb ) . getFtem ( ) ; org . oscm . domobjects . Subscription sub = new org . oscm . domobjects . Subscription ( ) ; sub . setKey ( 1L ) ; org . hibernate . search . jpa . FullTextQuery fullTextQuery = mock ( org . hibernate . search . jpa . FullTextQuery . class ) ; when ( ftem . createFullTextQuery ( any ( org . apache . lucene . search . BooleanQuery . class ) , any ( java . lang . Class . class ) ) ) . thenReturn ( fullTextQuery ) ; doReturn ( java . util . Arrays . asList ( sub ) ) . when ( fullTextQuery ) . getResultList ( ) ; java . util . Collection < java . lang . Long > result = ssb . searchSubscriptions ( "searchphrase" ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { java . util . Set < java . lang . String > enumKeys = new java . util . HashSet < java . lang . String > ( ) ; for ( org . oscm . types . enumtypes . SettingType type : org . oscm . types . enumtypes . SettingType . values ( ) ) { enumKeys . add ( type . name ( ) ) ; } return enumKeys . contains ( enumKey ) ; }
org . junit . Assert . assertTrue ( result . contains ( new java . lang . Long ( 1L ) ) )
testAssociationExists ( ) { com . sap . core . odata . api . edm . EdmAssociationSet associationSet = com . sap . core . odata . core . edm . provider . EdmAssociationSetImplProvTest . edmAssociationSet ; "<AssertPlaceHolder>" ; } getAssociation ( ) { return association ; }
org . junit . Assert . assertNotNull ( associationSet . getAssociation ( ) )
getUnsignedInt ( ) { org . threadly . litesockets . buffers . MergedByteBuffers mbb = new org . threadly . litesockets . buffers . ReuseableMergedByteBuffers ( ) ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . allocate ( 4 ) ; bb . putInt ( ( ( Integer . MAX_VALUE ) + 500 ) ) ; bb . flip ( ) ; mbb . add ( bb ) ; long value = ( ( Integer . MAX_VALUE ) + 500 ) & 4294967295L ; System . out . println ( value ) ; "<AssertPlaceHolder>" ; } getUnsignedInt ( ) { java . nio . ByteBuffer bb = java . nio . ByteBuffer . allocate ( 4 ) ; bb . putInt ( ( ( Integer . MAX_VALUE ) + 500 ) ) ; bb . flip ( ) ; org . threadly . litesockets . buffers . MergedByteBuffers mbb = new org . threadly . litesockets . buffers . SimpleMergedByteBuffers ( false , bb ) ; long value = ( ( Integer . MAX_VALUE ) + 500 ) & 4294967295L ; System . out . println ( value ) ; org . junit . Assert . assertEquals ( value , mbb . getUnsignedInt ( ) ) ; }
org . junit . Assert . assertEquals ( value , mbb . getUnsignedInt ( ) )
getOrCreateIdPutsReverseMappingFirst ( ) { uid = new net . opentsdb . uid . UniqueId ( client , net . opentsdb . uid . TestUniqueId . table , net . opentsdb . uid . TestUniqueId . kind , 3 ) ; when ( client . get ( net . opentsdb . uid . TestUniqueId . anyGet ( ) ) ) . thenReturn ( com . stumbleupon . async . Deferred . < java . util . ArrayList < net . opentsdb . uid . KeyValue > > fromResult ( null ) ) ; when ( client . atomicIncrement ( net . opentsdb . uid . TestUniqueId . incrementForRow ( net . opentsdb . uid . TestUniqueId . MAXID ) ) ) . thenReturn ( com . stumbleupon . async . Deferred . fromResult ( 6L ) ) ; when ( client . compareAndSet ( net . opentsdb . uid . TestUniqueId . anyPut ( ) , net . opentsdb . uid . TestUniqueId . emptyArray ( ) ) ) . thenReturn ( com . stumbleupon . async . Deferred . fromResult ( true ) ) ; final byte [ ] id = new byte [ ] { 0 , 0 , 6 } ; final byte [ ] row = new byte [ ] { 'f' , 'o' , 'o' } ; "<AssertPlaceHolder>" ; final org . mockito . InOrder order = inOrder ( client ) ; order . verify ( client ) . get ( net . opentsdb . uid . TestUniqueId . anyGet ( ) ) ; order . verify ( client ) . atomicIncrement ( net . opentsdb . uid . TestUniqueId . incrementForRow ( net . opentsdb . uid . TestUniqueId . MAXID ) ) ; order . verify ( client ) . compareAndSet ( net . opentsdb . uid . TestUniqueId . putForRow ( id ) , net . opentsdb . uid . TestUniqueId . emptyArray ( ) ) ; order . verify ( client ) . compareAndSet ( net . opentsdb . uid . TestUniqueId . putForRow ( row ) , net . opentsdb . uid . TestUniqueId . emptyArray ( ) ) ; } getOrCreateId ( java . lang . String ) { short attempt = net . opentsdb . uid . UniqueId . MAX_ATTEMPTS_ASSIGN_ID ; net . opentsdb . uid . HBaseException hbe = null ; while ( ( attempt -- ) > 0 ) { try { return getId ( name ) ; } catch ( net . opentsdb . uid . NoSuchUniqueName e ) { net . opentsdb . uid . UniqueId . LOG . info ( ( ( ( ( "WTF!<sp>Failed<sp>to<sp>CAS<sp>reverse<sp>mapping:<sp>" 8 + ( kind ( ) ) ) + "Failed<sp>to<sp>assign<sp>an<sp>ID<sp>for<sp>kind='" 1 ) + name ) + '\'' ) ) ; } final long id ; byte [ ] row ; try { id = client . atomicIncrement ( new net . opentsdb . uid . AtomicIncrementRequest ( table , net . opentsdb . uid . UniqueId . MAXID_ROW , net . opentsdb . uid . UniqueId . ID_FAMILY , kind ) ) . joinUninterruptibly ( ) ; row = net . opentsdb . uid . Bytes . fromLong ( id ) ; net . opentsdb . uid . UniqueId . LOG . info ( ( ( ( ( ( ( "Got<sp>ID=" + id ) + ",<sp>but<sp>CAS<sp>failed<sp>on<sp>" 2 ) + ( kind ( ) ) ) + "Failed<sp>to<sp>assign<sp>an<sp>ID<sp>for<sp>kind='" 1 ) + name ) + ",<sp>but<sp>CAS<sp>failed<sp>on<sp>" 0 ) ) ; if ( ( row . length ) < ( idWidth ) ) { throw new java . lang . IllegalStateException ( ( ( ( ( ( ( ( "Failed<sp>to<sp>assign<sp>an<sp>ID<sp>for<sp>kind='" 2 + ( row . length ) ) + ",<sp>but<sp>CAS<sp>failed<sp>on<sp>" 5 ) + ( idWidth ) ) + "Failed<sp>to<sp>assign<sp>an<sp>ID<sp>for<sp>kind='" 3 ) + id ) + "WTF!<sp>Failed<sp>to<sp>CAS<sp>reverse<sp>mapping:<sp>" 6 ) + ( java . util . Arrays . toString ( row ) ) ) ) ; } for ( int i = 0 ; i < ( ( row . length ) - ( idWidth ) ) ; i ++ ) { if ( ( row [ i ] ) != 0 ) { final java . lang . String message = ( ( ( "WTF!<sp>Failed<sp>to<sp>CAS<sp>reverse<sp>mapping:<sp>" 2 + ( kind ( ) ) ) + ",<sp>but<sp>CAS<sp>failed<sp>on<sp>" 9 ) + ( idWidth ) ) + "WTF!<sp>Failed<sp>to<sp>CAS<sp>reverse<sp>mapping:<sp>" 9 ; net . opentsdb . uid . UniqueId . LOG . error ( ( "OMG<sp>" + message ) ) ; throw new java . lang . IllegalStateException ( message ) ; } } row = java . util . Arrays . copyOfRange ( row , ( ( row . length ) - ( idWidth ) ) , row . length ) ; } catch ( net . opentsdb . uid . HBaseException e ) { net . opentsdb . uid . UniqueId . LOG . error ( ( ( ( ( ( ( "WTF!<sp>Failed<sp>to<sp>CAS<sp>reverse<sp>mapping:<sp>" 0 + ( java . util . Arrays . toString ( net . opentsdb . uid . UniqueId . MAXID_ROW ) ) ) + "<sp>column='" ) + ( net . opentsdb . uid . UniqueId . fromBytes ( net . opentsdb . uid . UniqueId . ID_FAMILY ) ) ) + ':' ) + ( kind ( ) ) ) + '\'' ) , e ) ; hbe = e ; continue ; } catch ( java . lang . IllegalStateException e ) { throw e ; } catch ( java . lang . Exception e ) { net . opentsdb . uid . UniqueId . LOG . error ( ( ( ( ( ( ( ( "WTF?<sp>Unexpected<sp>exception<sp>type<sp>when<sp>assigning<sp>an<sp>ID," + "Failed<sp>to<sp>assign<sp>an<sp>ID<sp>for<sp>kind='" 0 ) + ( java . util . Arrays . toString ( net . opentsdb . uid . UniqueId . MAXID_ROW ) ) ) + "<sp>column='" ) + ( net . opentsdb . uid . UniqueId . fromBytes ( net . opentsdb . uid . UniqueId . ID_FAMILY ) ) ) + ':' ) + ( kind ( ) ) ) + '\'' )
org . junit . Assert . assertArrayEquals ( id , uid . getOrCreateId ( "foo" ) )
testStackOverflowOnRevisitationOfSameDirectory ( ) { com . drew . metadata . Metadata metadata = com . drew . metadata . exif . ExifReaderTest . processBytes ( "Tests/Data/recursiveDirectories.jpg.app1" ) ; "<AssertPlaceHolder>" ; } getDirectoryCount ( ) { return _directories . size ( ) ; }
org . junit . Assert . assertEquals ( 5 , metadata . getDirectoryCount ( ) )
testSimpleNoDecimals ( ) { org . apache . commons . math3 . geometry . euclidean . oned . Vector1D c = new org . apache . commons . math3 . geometry . euclidean . oned . Vector1D ( 1 ) ; java . lang . String expected = "{1}" ; java . lang . String actual = vector1DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( java . lang . Object [ ] ) { return format . format ( arguments ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testMissingParameter ( ) { final net . violet . platform . datamodel . Lang frLang = getSiteFrLang ( ) ; final net . violet . platform . api . actions . Action theAction = new net . violet . platform . api . actions . dico . Create ( ) ; final net . violet . platform . api . callers . APICaller caller = getPublicApplicationAPICaller ( ) ; final java . util . Map < java . lang . String , java . lang . Object > theParams = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; theParams . put ( Create . LANGUAGE_PARAM , frLang . getIsoCode ( ) ) ; final net . violet . platform . api . actions . ActionParam theActionParam = new net . violet . platform . api . actions . ActionParam ( caller , theParams ) ; final java . lang . Object theResult = theAction . processRequest ( theActionParam ) ; "<AssertPlaceHolder>" ; } getIsoCode ( ) { return isoCode ; }
org . junit . Assert . assertNotNull ( theResult )
shouldAddObjectArrayInNestedObjectColumn ( ) { org . springframework . data . crate . core . mapping . schema . Column objectColOne = createColumn ( "strings" , java . util . Collection . class , java . lang . String . class , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectColTwo = createColumn ( "longField" , org . springframework . data . crate . core . sql . Long . class , null , false ) ; org . springframework . data . crate . core . mapping . schema . Column objectArrayCol = createColumn ( "entity.nested.objectArray" , java . util . List . class , java . lang . Object . class , false ) ; objectArrayCol . setSubColumns ( asList ( objectColOne , objectColTwo ) ) ; org . springframework . data . crate . core . sql . CrateSQLStatement statement = new org . springframework . data . crate . core . sql . AlterTable ( "testTable" , objectArrayCol ) ; java . lang . StringBuilder sql = new java . lang . StringBuilder ( "ALTER<sp>TABLE<sp>testTable<sp>ADD<sp>COLUMN<sp>\"entity\"[\'nested\'][\'objectArray\']<sp>" ) ; sql . append ( "array(object<sp>AS<sp>(\"strings\"<sp>array(string),<sp>\"longField\"<sp>long))" ) ; "<AssertPlaceHolder>" ; } createStatement ( ) { return org . springframework . data . crate . core . sql . DROP_TABLE . concat ( org . springframework . data . crate . core . sql . SPACE ) . concat ( tableName ) ; }
org . junit . Assert . assertThat ( statement . createStatement ( ) , org . hamcrest . Matchers . is ( sql . toString ( ) ) )
tagsInMetricName ( ) { org . jmxtrans . agent . influxdb . InfluxMetric converted = org . jmxtrans . agent . influxdb . InfluxMetricConverter . convertToInfluxMetric ( "foo,tag1=tagValue1" , 1 , org . jmxtrans . agent . influxdb . InfluxMetricConverterTest . EMPTY_TAG_LIST , 2L ) ; org . jmxtrans . agent . influxdb . InfluxMetric expected = new org . jmxtrans . agent . influxdb . InfluxMetric ( "foo" , java . util . Arrays . asList ( new org . jmxtrans . agent . influxdb . InfluxTag ( "tag1" , "tagValue1" ) ) , 1 , 2L ) ; "<AssertPlaceHolder>" ; } convertToInfluxMetric ( java . lang . String , java . lang . Object , java . util . List , long ) { java . util . List < org . jmxtrans . agent . influxdb . InfluxTag > tagsFromMetricName = org . jmxtrans . agent . influxdb . InfluxMetricConverter . parseTags ( metricName ) ; java . util . List < org . jmxtrans . agent . influxdb . InfluxTag > allTags = new java . util . ArrayList ( additionalTags ) ; allTags . addAll ( tagsFromMetricName ) ; return new org . jmxtrans . agent . influxdb . InfluxMetric ( org . jmxtrans . agent . influxdb . InfluxMetricConverter . parseMeasurement ( metricName ) , allTags , value , timestamp ) ; }
org . junit . Assert . assertThat ( converted , equalTo ( expected ) )
testOfConfigurationParametersIncludingSearchTimeout ( ) { org . apache . jackrabbit . oak . security . authentication . ldap . impl . LdapProviderConfig config = org . apache . jackrabbit . oak . security . authentication . ldap . impl . LdapProviderConfig . of ( org . apache . jackrabbit . oak . spi . security . ConfigurationParameters . of ( LdapProviderConfig . PARAM_SEARCH_TIMEOUT , 25 ) ) ; "<AssertPlaceHolder>" ; } getSearchTimeout ( ) { return searchTimeout ; }
org . junit . Assert . assertEquals ( 25 , config . getSearchTimeout ( ) )
testPrefixNotImply ( ) { org . uberfire . security . authz . Permission p1 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.r" , true ) ; org . uberfire . security . authz . Permission p2 = new org . uberfire . security . impl . authz . DotNamedPermission ( "resource.read.r2" , true ) ; "<AssertPlaceHolder>" ; } implies ( org . uberfire . security . authz . Permission ) { for ( org . uberfire . security . authz . Permission p : permissionSet ) { if ( p . implies ( permission ) ) { return true ; } } return false ; }
org . junit . Assert . assertFalse ( p1 . implies ( p2 ) )
testCompareWithDifferentType ( ) { com . alicloud . openservices . tablestore . model . PutRowRequest pr = new com . alicloud . openservices . tablestore . model . PutRowRequest ( ) ; java . util . ArrayList < com . alicloud . openservices . tablestore . model . PrimaryKeyColumn > pks = new java . util . ArrayList < com . alicloud . openservices . tablestore . model . PrimaryKeyColumn > ( ) ; pks . add ( new com . alicloud . openservices . tablestore . model . PrimaryKeyColumn ( "PK0" , com . alicloud . openservices . tablestore . model . PrimaryKeyValue . fromLong ( 0 ) ) ) ; com . alicloud . openservices . tablestore . model . PrimaryKey primaryKey = new com . alicloud . openservices . tablestore . model . PrimaryKey ( pks ) ; com . alicloud . openservices . tablestore . model . RowPutChange rowChange = new com . alicloud . openservices . tablestore . model . RowPutChange ( com . alicloud . openservices . tablestore . model . UnifiedFilterRestrictionAndParamCheckingTest . tableName ) ; rowChange . setPrimaryKey ( primaryKey ) ; java . lang . String [ ] names = new java . lang . String [ ] { "col_int" , "col_string" , "col_double" , "col_boolean" , "col_byte" } ; com . alicloud . openservices . tablestore . model . ColumnValue [ ] values = new com . alicloud . openservices . tablestore . model . ColumnValue [ ] { com . alicloud . openservices . tablestore . model . ColumnValue . fromLong ( 0 ) , com . alicloud . openservices . tablestore . model . ColumnValue . fromString ( "a" ) , com . alicloud . openservices . tablestore . model . ColumnValue . fromDouble ( 1.0 ) , com . alicloud . openservices . tablestore . model . ColumnValue . fromBoolean ( true ) , com . alicloud . openservices . tablestore . model . ColumnValue . fromBinary ( new byte [ ] { 0 } ) } ; for ( int i = 0 ; i < ( names . length ) ; i ++ ) { rowChange . addColumn ( names [ i ] , values [ i ] ) ; } pr . setRowChange ( rowChange ) ; com . alicloud . openservices . tablestore . model . UnifiedFilterRestrictionAndParamCheckingTest . ots . putRow ( pr ) ; for ( int i = 0 ; i < ( names . length ) ; i ++ ) { for ( int j = 0 ; j < ( values . length ) ; j ++ ) { if ( i == j ) { continue ; } com . alicloud . openservices . tablestore . model . filter . SingleColumnValueFilter singleFilter = new com . alicloud . openservices . tablestore . model . filter . SingleColumnValueFilter ( names [ i ] , SingleColumnValueFilter . CompareOperator . EQUAL , values [ j ] ) ; com . alicloud . openservices . tablestore . model . filter . CompositeColumnValueFilter compositeFilter = new com . alicloud . openservices . tablestore . model . filter . CompositeColumnValueFilter ( CompositeColumnValueFilter . LogicOperator . AND ) ; compositeFilter . addFilter ( singleFilter ) ; compositeFilter . addFilter ( new com . alicloud . openservices . tablestore . model . filter . SingleColumnValueFilter ( "CC" , SingleColumnValueFilter . CompareOperator . EQUAL , com . alicloud . openservices . tablestore . model . ColumnValue . fromBoolean ( false ) ) ) ; com . alicloud . openservices . tablestore . model . SingleRowQueryCriteria rowQueryCriteria = new com . alicloud . openservices . tablestore . model . SingleRowQueryCriteria ( com . alicloud . openservices . tablestore . model . UnifiedFilterRestrictionAndParamCheckingTest . tableName ) ; rowQueryCriteria . setPrimaryKey ( primaryKey ) ; rowQueryCriteria . setFilter ( singleFilter ) ; rowQueryCriteria . setMaxVersions ( 1 ) ; com . alicloud . openservices . tablestore . model . GetRowRequest getRowRequest = new com . alicloud . openservices . tablestore . model . GetRowRequest ( rowQueryCriteria ) ; com . alicloud . openservices . tablestore . model . GetRowResponse result = com . alicloud . openservices . tablestore . model . UnifiedFilterRestrictionAndParamCheckingTest . ots . getRow ( getRowRequest ) ; com . alicloud . openservices . tablestore . model . Row resultRow = result . getRow ( ) ; "<AssertPlaceHolder>" ; } } } getRow ( ) { return row ; }
org . junit . Assert . assertEquals ( resultRow , null )
fetchStopsAfterFirstSuccessAfterFailure ( ) { org . easymock . EasyMock . expect ( downloader . fetch ( fakeEventBus , fakeUri , fakePath ) ) . andThrow ( new java . io . IOException ( ) ) . andReturn ( true ) ; org . easymock . EasyMock . replay ( downloader ) ; "<AssertPlaceHolder>" ; } from ( com . facebook . buck . file . downloader . Downloader , int ) { return new com . facebook . buck . file . downloader . impl . RetryingDownloader ( downloader , maxNumberOfRetries ) ; }
org . junit . Assert . assertTrue ( com . facebook . buck . file . downloader . impl . RetryingDownloader . from ( downloader , 3 ) . fetch ( fakeEventBus , fakeUri , fakePath ) )
testReadInputStreamToString ( ) { java . lang . String inputString = "The<sp>quick<sp>brown<sp>fox" ; java . io . InputStream inputStream = new java . io . ByteArrayInputStream ( inputString . getBytes ( StandardCharsets . UTF_8 ) ) ; com . washingtonpost . wordpress . rest . api . JAXRSWordPressClient client = new com . washingtonpost . wordpress . rest . api . JAXRSWordPressClient ( null , null , null ) ; java . lang . String outputString = client . readInputStreamToString ( inputStream ) ; "<AssertPlaceHolder>" ; } readInputStreamToString ( java . io . InputStream ) { java . io . StringWriter writer = new java . io . StringWriter ( ) ; try { org . apache . commons . io . IOUtils . copy ( inputStream , writer , java . nio . charset . Charset . forName ( "UTF-8" ) ) ; } catch ( java . io . IOException ex ) { throw new java . lang . RuntimeException ( ex ) ; } return writer . toString ( ) ; }
org . junit . Assert . assertEquals ( inputString , outputString )
testFloorDoubleInWhere ( ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( getUrl ( ) ) ; java . sql . ResultSet rs = conn . createStatement ( ) . executeQuery ( ( ( "SELECT<sp>*<sp>FROM<sp>" + ( tableName ) ) + "<sp>WHERE<sp>FLOOR(doub,<sp>2)<sp>=<sp>1.26" ) ) ; "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( org . apache . phoenix . util . CursorUtil . moreValues ( cursorName ) ) ) { return null ; } else if ( ( fetchSize ) == ( rowsRead ) ) { return null ; } org . apache . phoenix . schema . tuple . Tuple next = delegate . next ( ) ; org . apache . phoenix . util . CursorUtil . updateCursor ( cursorName , next , delegate . peek ( ) ) ; ( rowsRead ) ++ ; return next ; }
org . junit . Assert . assertTrue ( rs . next ( ) )
query_by_special_char2 ( ) { dao . update ( dao . fetch ( org . nutz . dao . test . meta . Pet . class ) . setName ( "a$b" ) ) ; java . util . List < org . nutz . dao . test . meta . Pet > pets = dao . query ( org . nutz . dao . test . meta . Pet . class , org . nutz . dao . Cnd . where ( "name" , "=" , "a$b" ) , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( index ) > 0 ? ( ( width ) * ( ( index ) - 1 ) ) + ( cursor ) : cursor ; }
org . junit . Assert . assertEquals ( 1 , pets . size ( ) )
testCredentialProvider ( ) { org . nuxeo . elasticsearch . config . ElasticSearchClientConfig config = new org . nuxeo . elasticsearch . config . ElasticSearchClientConfig ( ) ; config . options . put ( "addressList" , "localhost:9200" ) ; config . options . put ( ESRestClientFactory . AUTH_USER_OPT , "bob" ) ; config . options . put ( ESRestClientFactory . AUTH_PASSWORD_OPT , "bob" ) ; org . nuxeo . elasticsearch . client . ESRestClient esClient = ( ( org . nuxeo . elasticsearch . client . ESRestClient ) ( factory . create ( null , config ) ) ) ; "<AssertPlaceHolder>" ; } create ( java . lang . String , int ) { org . nuxeo . lib . stream . log . chronicle . ChronicleLogAppender . create ( org . nuxeo . lib . stream . log . chronicle . NO_CODEC , basePath . resolve ( name ) . toFile ( ) , size , retention ) . close ( ) ; }
org . junit . Assert . assertNotNull ( esClient )
testCanAcceptVoterWhenEmpty ( ) { com . tc . l2 . state . ServerVoterManagerImpl manager = new com . tc . l2 . state . ServerVoterManagerImpl ( 1 , timeSource , false ) ; "<AssertPlaceHolder>" ; } canAcceptVoter ( ) { return ( ! ( votingInProgress ) ) && ( ( getRegisteredVoters ( ) ) < ( voterLimit ) ) ; }
org . junit . Assert . assertThat ( manager . canAcceptVoter ( ) , org . hamcrest . Matchers . is ( true ) )
testBRY9905FoutSitiuatieRefereertNaarEenReferentie ( ) { final nl . bzk . brp . model . bijhouding . BijhoudingsBericht simplegGeboorteBericht = maakSimpleInschrijvingBericht2 ( ) ; final nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht famBericht = ( ( nl . bzk . brp . model . bericht . kern . FamilierechtelijkeBetrekkingBericht ) ( simplegGeboorteBericht . getAdministratieveHandeling ( ) . getActies ( ) . get ( 0 ) . getRootObject ( ) ) ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht kind = famBericht . getKindBetrokkenheid ( ) . getPersoon ( ) ; final java . util . Iterator < nl . bzk . brp . model . bericht . kern . OuderBericht > it = famBericht . getOuderBetrokkenheden ( ) . iterator ( ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht ouder1 = it . next ( ) . getPersoon ( ) ; final nl . bzk . brp . model . bericht . kern . PersoonBericht ouder2 = it . next ( ) . getPersoon ( ) ; ouder1 . setReferentieID ( kind . getCommunicatieID ( ) ) ; ouder2 . setReferentieID ( ouder1 . getCommunicatieID ( ) ) ; nl . bzk . brp . bijhouding . business . util . BerichtAdministratieUtil . verrijktBerichtMetIdentificeerbaarObjectIndex ( simplegGeboorteBericht ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtIdentificeerbaar > berichtenDieDeRegelOvertreden = bedrijfsregel . voerRegelUit ( simplegGeboorteBericht ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , berichtenDieDeRegelOvertreden . size ( ) )
priorityIs0 ( ) { final int priority = this . mocker . getComponentUnderTest ( ) . getPriority ( ) ; "<AssertPlaceHolder>" ; } getPriority ( ) { org . junit . Assert . assertEquals ( 500 , this . component . getPriority ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , priority )
testGetFlags_Array ( ) { org . openscience . cdk . interfaces . IChemObject chemObject = newChemObject ( ) ; chemObject . setFlag ( CDKConstants . ISINRING , true ) ; boolean [ ] flags = chemObject . getFlags ( ) ; "<AssertPlaceHolder>" ; } getFlags ( ) { boolean [ ] flagArray = new boolean [ ( CDKConstants . MAX_FLAG_INDEX ) + 1 ] ; for ( int i = 0 ; i < ( CDKConstants . FLAG_MASKS . length ) ; i ++ ) { int mask = CDKConstants . FLAG_MASKS [ i ] ; flagArray [ i ] = getFlag ( mask ) ; } return flagArray ; }
org . junit . Assert . assertTrue ( flags [ 1 ] )
testSerialization ( ) { org . jfree . chart . urls . StandardXYURLGenerator g1 = new org . jfree . chart . urls . StandardXYURLGenerator ( "index.html?" ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( g1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . urls . StandardXYURLGenerator g2 = ( ( org . jfree . chart . urls . StandardXYURLGenerator ) ( 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 ( g1 , g2 )
testJSONConsoleTraceFileNameStdout ( ) { com . ibm . ws . logging . json . fat . ConsoleFormatTest . setUpClass ( com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 ) ; com . ibm . websphere . simplicity . RemoteFile consoleLogFile = com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 . getConsoleLogFile ( ) ; line = com . ibm . ws . logging . json . fat . ConsoleFormatTest . setConfig ( com . ibm . ws . logging . json . fat . ConsoleFormatTest . SERVER_XML_JSON_STDOUT , consoleLogFile , com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 ) ; boolean hasNoJSON = checkStringsNotInLog ( com . ibm . ws . logging . json . fat . ConsoleFormatTest . JSON_MESSAGES , consoleLogFile , com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 ) ; "<AssertPlaceHolder>" ; com . ibm . ws . logging . json . fat . ConsoleFormatTest . tearDownClass ( com . ibm . ws . logging . json . fat . ConsoleFormatTest . server3 ) ; } checkStringsNotInLog ( java . lang . String [ ] , com . ibm . websphere . simplicity . RemoteFile , componenttest . topology . impl . LibertyServer ) { com . ibm . ws . logging . json . fat . TestUtils . runApp ( server , "logServlet" ) ; java . util . List < java . lang . String > results ; for ( java . lang . String message : messagesList ) { results = server . findStringsInLogsUsingMark ( message , logFile ) ; if ( ! ( results . isEmpty ( ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertFalse ( hasNoJSON )
remove ( ) { joptsimple . internal . SimpleOptionNameMap < java . lang . Integer > map = new joptsimple . internal . SimpleOptionNameMap ( ) ; map . put ( joptsimple . internal . SimpleOptionNameMapTest . KEY , 1 ) ; map . remove ( joptsimple . internal . SimpleOptionNameMapTest . KEY ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return ( get ( key ) ) != null ; }
org . junit . Assert . assertFalse ( map . contains ( joptsimple . internal . SimpleOptionNameMapTest . KEY ) )
testNullParameters ( ) { nom . tam . fits . compression . algorithm . api . ICompressorControl compressor = nom . tam . fits . compression . provider . CompressorProvider . findCompressorControl ( null , "GZIP_1" , byte . class ) ; nom . tam . fits . compression . algorithm . api . ICompressOption option = compressor . option ( ) ; nom . tam . fits . compression . provider . param . api . ICompressParameters parameters = option . getCompressionParameters ( ) ; parameters . addColumnsToTable ( null ) ; "<AssertPlaceHolder>" ; parameters . setValueFromColumn ( 10000 ) ; parameters . setValuesInHeader ( null ) ; } copy ( int ) { nom . tam . fits . compression . algorithm . hcompress . HDecompress . LongArrayPointer intAP = new nom . tam . fits . compression . algorithm . hcompress . HDecompress . LongArrayPointer ( this . a ) ; intAP . offset = ( this . offset ) + extraOffset ; return intAP ; }
org . junit . Assert . assertSame ( parameters , parameters . copy ( option ) )
formula ( ) { java . lang . String input = "<in-line-formula>c=a+b</in-line-formula>" ; java . lang . String expect = "<span<sp>id=\"FOR-0001\"<sp>class=\"formula\">c=a+b</span>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expect , actual )
testHasAttributeWithPresentAttribute ( ) { org . candlepin . dto . manifest . v1 . PoolDTO dto = new org . candlepin . dto . manifest . v1 . PoolDTO ( ) ; java . util . Map < java . lang . String , java . lang . String > attributes = new java . util . HashMap ( ) ; attributes . put ( "attribute-key-2" , "attribute-value-2" ) ; dto . setAttributes ( attributes ) ; "<AssertPlaceHolder>" ; } hasAttribute ( java . lang . String ) { if ( key == null ) { throw new java . lang . IllegalArgumentException ( "key<sp>is<sp>null" ) ; } return ( ( this . attributes ) != null ) && ( this . attributes . containsKey ( key ) ) ; }
org . junit . Assert . assertTrue ( dto . hasAttribute ( "attribute-key-2" ) )
constructFromUriAndBack ( ) { org . apache . shindig . common . uri . Uri uri = org . apache . shindig . common . uri . Uri . parse ( "http://apache.org/foo/bar?foo=bar&a=b&c=d&y=z&foo=zoo#foo" ) ; org . apache . shindig . common . uri . UriBuilder builder = new org . apache . shindig . common . uri . UriBuilder ( uri ) ; "<AssertPlaceHolder>" ; } toUri ( ) { return new org . apache . shindig . common . uri . Uri ( this ) ; }
org . junit . Assert . assertEquals ( uri , builder . toUri ( ) )
testSafelyParallize ( ) { java . util . concurrent . ExecutorService pool = java . util . concurrent . Executors . newFixedThreadPool ( 10 ) ; int [ ] batch = new int [ ] { 0 , 0 , 1 , 1 , 2 , 2 , 2 , 3 , 3 , 4 , 5 , 5 , 1 } ; edu . jhu . prim . util . random . Prng . seed ( java . lang . System . currentTimeMillis ( ) ) ; edu . jhu . prim . arrays . IntArrays . shuffle ( batch ) ; java . util . List < java . lang . Integer > results = edu . jhu . pacaya . util . Threads . safelyParallelizeBatch ( pool , batch , new edu . jhu . pacaya . util . ThreadsTest . MockTaskFactory ( ) ) ; int [ ] res = edu . jhu . pacaya . util . collections . QLists . asArray ( results ) ; edu . jhu . prim . sort . IntSort . sortAsc ( batch ) ; edu . jhu . prim . sort . IntSort . sortAsc ( res ) ; "<AssertPlaceHolder>" ; } asArray ( java . util . List ) { int [ ] array = new int [ list . size ( ) ] ; int i = 0 ; for ( java . lang . Integer v : list ) { array [ ( i ++ ) ] = v ; } return array ; }
org . junit . Assert . assertArrayEquals ( batch , res )
testCancel ( ) { final int count = 100000 ; final java . util . List < com . taobao . gecko . core . nio . impl . TimerRef > list = new java . util . ArrayList < com . taobao . gecko . core . nio . impl . TimerRef > ( ) ; for ( int i = 0 ; i < count ; i ++ ) { final com . taobao . gecko . core . nio . impl . TimerRef timer = new com . taobao . gecko . core . nio . impl . TimerRef ( i , null ) ; this . queue . add ( timer ) ; list . add ( timer ) ; } final java . util . concurrent . CyclicBarrier barrier = new java . util . concurrent . CyclicBarrier ( 2001 ) ; final java . util . List < com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . IterateThread > iterateThreads = new java . util . ArrayList < com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . IterateThread > ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { final com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . IterateThread iterateThread = new com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . IterateThread ( barrier , count ) ; iterateThreads . add ( iterateThread ) ; iterateThread . start ( ) ; } final java . util . Random rand = new java . security . SecureRandom ( ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { final java . lang . Thread thread = new com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . CancelThread ( list , barrier , rand ) ; thread . start ( ) ; } barrier . await ( ) ; barrier . await ( ) ; for ( final com . taobao . gecko . core . nio . impl . TimerRefQueueUnitTest . IterateThread iterateThread : iterateThreads ) { "<AssertPlaceHolder>" ; } } start ( ) { if ( this . shutdown . get ( ) ) { throw new java . lang . IllegalStateException ( "cannot<sp>be<sp>started<sp>once<sp>stopped" ) ; } if ( ! ( this . workerThread . isAlive ( ) ) ) { this . workerThread . start ( ) ; } }
org . junit . Assert . assertTrue ( iterateThread . end )
testFlushInMiddleOfElementUsingByteArrays ( ) { java . io . ByteArrayOutputStream bos = new java . io . ByteArrayOutputStream ( ) ; org . apache . beam . sdk . util . BufferedElementCountingOutputStream os = new org . apache . beam . sdk . util . BufferedElementCountingOutputStream ( bos ) ; os . markElementStart ( ) ; os . write ( new byte [ ] { 1 } ) ; os . flush ( ) ; os . write ( new byte [ ] { 2 } ) ; os . close ( ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { if ( ( ! ( isFallback ) ) && ( ( count ) > 0 ) ) { return buf ; } else { return super . toByteArray ( ) ; } }
org . junit . Assert . assertArrayEquals ( new byte [ ] { 1 , 1 , 2 , 0 } , bos . toByteArray ( ) )
testDataStoreFinderFindsIt ( ) { java . util . Iterator < org . geotools . data . DataStoreFactorySpi > allFactories = org . geotools . data . DataStoreFinder . getAllDataStores ( ) ; org . geotools . arcsde . data . ArcSDEJNDIDataStoreFactory sdeFac = null ; while ( allFactories . hasNext ( ) ) { org . geotools . data . DataAccessFactory next = allFactories . next ( ) ; if ( next instanceof org . geotools . arcsde . data . ArcSDEJNDIDataStoreFactory ) { sdeFac = ( ( org . geotools . arcsde . data . ArcSDEJNDIDataStoreFactory ) ( next ) ) ; break ; } } "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java . util . NoSuchElementException ( ) ; } org . geotools . image . palette . ColorMap . ColorEntry result = current ; current = result . next ; return result ; }
org . junit . Assert . assertNotNull ( sdeFac )
testCreationViaNewInsertionOrdered ( ) { java . lang . String columnNames = "Letter" ; final java . lang . Class < ? > [ ] columnTypes = new java . lang . Class [ ] { net . casper . data . model . tests . Character . class } ; net . casper . data . model . CDataCacheContainer container = net . casper . data . model . CDataCacheContainer . newInsertionOrdered ( "Letters" , columnNames , columnTypes ) ; for ( int i = 0 ; i < 26 ; i ++ ) { container . addSingleRow ( new java . lang . Character [ ] { java . lang . Character . valueOf ( ( ( char ) ( 65 + i ) ) ) } ) ; } int i = 0 ; net . casper . data . model . CDataRowSet cdrs = container . getAll ( ) ; while ( cdrs . next ( ) ) { "<AssertPlaceHolder>" ; } } getChar ( int ) { java . lang . Object value = getRowAtCursor ( cursor ) . getValue ( columnIndex ) ; return ( ( java . lang . Character ) ( net . casper . data . model . CDataConverter . convertTo ( value , CTypes . CHARACTER ) ) ) ; }
org . junit . Assert . assertEquals ( java . lang . Character . valueOf ( ( ( char ) ( 65 + ( i ++ ) ) ) ) , cdrs . getChar ( "Letter" ) )
testPrepareCheckpointPreBarrier ( ) { final java . util . concurrent . atomic . AtomicInteger intRef = new java . util . concurrent . atomic . AtomicInteger ( ) ; final org . apache . flink . streaming . api . operators . OneInputStreamOperator < java . lang . String , java . lang . String > one = new org . apache . flink . streaming . runtime . tasks . OperatorChainTest . ValidatingOperator ( intRef , 0 ) ; final org . apache . flink . streaming . api . operators . OneInputStreamOperator < java . lang . String , java . lang . String > two = new org . apache . flink . streaming . runtime . tasks . OperatorChainTest . ValidatingOperator ( intRef , 1 ) ; final org . apache . flink . streaming . api . operators . OneInputStreamOperator < java . lang . String , java . lang . String > three = new org . apache . flink . streaming . runtime . tasks . OperatorChainTest . ValidatingOperator ( intRef , 2 ) ; final org . apache . flink . streaming . runtime . tasks . OperatorChain < ? , ? > chain = org . apache . flink . streaming . runtime . tasks . OperatorChainTest . setupOperatorChain ( one , two , three ) ; chain . prepareSnapshotPreBarrier ( org . apache . flink . streaming . runtime . tasks . OperatorChainTest . ValidatingOperator . CHECKPOINT_ID ) ; "<AssertPlaceHolder>" ; } get ( ) { return delegate . get ( ) ; }
org . junit . Assert . assertEquals ( 3 , intRef . get ( ) )
readsContentOfEntityStreamAsMultivaluedMapWhenFormFieldMissedValue ( ) { testContent = "foo&bar=hello%20world" . getBytes ( "UTF-8" ) ; javax . ws . rs . core . MultivaluedMap < java . lang . String , java . lang . String > multivaluedMap = multivaluedMapEntityProvider . readFrom ( ( ( java . lang . Class ) ( javax . ws . rs . core . MultivaluedMap . class ) ) , multiValuedMapGenericType , null , javax . ws . rs . core . MediaType . APPLICATION_FORM_URLENCODED_TYPE , new org . everrest . core . impl . MultivaluedMapImpl ( ) , new java . io . ByteArrayInputStream ( testContent ) ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > decodedMap = com . google . common . collect . ImmutableMap . of ( "foo" , newArrayList ( "" ) , "bar" , newArrayList ( "hello<sp>world" ) ) ; "<AssertPlaceHolder>" ; } readFrom ( java . lang . Class , java . lang . reflect . Type , java . lang . annotation . Annotation [ ] , javax . ws . rs . core . MediaType , javax . ws . rs . core . MultivaluedMap , java . io . InputStream ) { return null ; }
org . junit . Assert . assertEquals ( decodedMap , multivaluedMap )
testCopyPaste ( ) { new org . openqa . selenium . interactions . Actions ( driver ) . sendKeys ( "hello<sp>world" ) . sendKeys ( ( ( org . openqa . selenium . Keys . CONTROL ) + "a" ) ) . sendKeys ( ( ( org . openqa . selenium . Keys . CONTROL ) + "c" ) ) . sendKeys ( fieldTwo , ( ( org . openqa . selenium . Keys . CONTROL ) + "v" ) ) . build ( ) . perform ( ) ; "<AssertPlaceHolder>" ; } getAttribute ( java . lang . String ) { assertElementNotStale ( ) ; if ( attribute . equalsIgnoreCase ( "value" ) ) { return callMethod ( ( "if(/^input|select|option|textarea$/i.test(locator.nodeName)){" + ( ( "return<sp>locator.value;" + "}" ) + "return<sp>locator.textContent;" ) ) ) ; } else { return callMethod ( ( ( ( ( "return<sp>" + ( OperaAtom . GET_ATTRIBUTE ) ) + "(locator,<sp>'" ) + attribute ) + "')" ) ) ; } }
org . junit . Assert . assertEquals ( "hello<sp>world" , fieldTwo . getAttribute ( "value" ) )
addWiresConnector ( ) { final org . kie . workbench . common . stunner . shapes . client . view . AbstractConnectorView connector = new org . kie . workbench . common . stunner . shapes . client . view . PolylineConnectorView ( 0.0 , 0.0 ) ; final java . lang . String uuid = connector . uuid ( ) ; connector . setUUID ( uuid ) ; view . add ( connector ) ; final com . ait . lienzo . client . core . shape . wires . WiresShape registeredConnector = wiresManager . getShape ( uuid ) ; "<AssertPlaceHolder>" ; } getShape ( java . lang . String ) { return getPlane ( ) . getPlaneElement ( ) . stream ( ) . filter ( ( dia ) -> dia instanceof org . eclipse . bpmn2 . di . BPMNShape ) . map ( ( shape ) -> ( ( org . eclipse . bpmn2 . di . BPMNShape ) ( shape ) ) ) . filter ( ( shape ) -> shape . getBpmnElement ( ) . getId ( ) . equals ( elementId ) ) . findFirst ( ) . orElse ( null ) ; }
org . junit . Assert . assertNull ( registeredConnector )
conversionString ( ) { int value = org . openhab . binding . dmx . internal . Util . toDmxValue ( "100" ) ; "<AssertPlaceHolder>" ; } is ( org . eclipse . smarthome . core . thing . ThingTypeUID ) { return thingTypeUID . equals ( otherThingTypeUID ) ; }
org . junit . Assert . assertThat ( value , org . hamcrest . CoreMatchers . is ( 100 ) )
shouldHaveTypeMemberWithValueName ( ) { com . frightanic . smn . api . geojson . Crs crs = new com . frightanic . smn . api . geojson . Crs ( CrsType . CH1903 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( crs . getType ( ) , org . hamcrest . core . Is . is ( "name" ) )
testDoGetRootChildren ( ) { java . lang . String filter = "filter" ; java . lang . Boolean showHidden = Boolean . TRUE ; java . lang . Boolean includeAcls = Boolean . TRUE ; java . util . List < org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto > mockList = mock ( java . util . List . class ) ; doReturn ( mockList ) . when ( fileResource . fileService ) . doGetChildren ( FileUtils . PATH_SEPARATOR , filter , showHidden , includeAcls ) ; java . util . List < org . pentaho . platform . api . repository2 . unified . webservices . RepositoryFileDto > testList = fileResource . doGetRootChildren ( filter , showHidden , includeAcls ) ; "<AssertPlaceHolder>" ; verify ( fileResource . fileService , times ( 1 ) ) . doGetChildren ( FileUtils . PATH_SEPARATOR , filter , showHidden , includeAcls ) ; } doGetRootChildren ( java . lang . String , java . lang . Boolean , java . lang . Boolean ) { return fileService . doGetChildren ( FileUtils . PATH_SEPARATOR , filter , showHidden , includeAcls ) ; }
org . junit . Assert . assertEquals ( mockList , testList )
testDecorateRunnable ( ) { io . netty . util . internal . ThreadExecutorMap . apply ( new java . lang . Runnable ( ) { @ io . netty . util . internal . Override public void run ( ) { "<AssertPlaceHolder>" ; } } , ImmediateEventExecutor . INSTANCE ) . run ( ) ; } currentExecutor ( ) { return io . netty . util . internal . ThreadExecutorMap . mappings . get ( ) ; }
org . junit . Assert . assertSame ( ImmediateEventExecutor . INSTANCE , io . netty . util . internal . ThreadExecutorMap . currentExecutor ( ) )
shouldParseFastOnJdk7u6 ( ) { org . apache . ibatis . parsing . GenericTokenParser parser = new org . apache . ibatis . parsing . GenericTokenParser ( "initial" 0 , "}" , new org . apache . ibatis . parsing . GenericTokenParserTest . VariableTokenHandler ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "first_name" , "James" ) ; put ( "initial" , "T" ) ; put ( "last_name" , "Kirk" ) ; put ( "" , "" ) ; } } ) ) ; java . lang . StringBuilder input = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { input . append ( "${first_name}<sp>${initial}<sp>${last_name}<sp>reporting.<sp>" ) ; } java . lang . StringBuilder expected = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 10000 ; i ++ ) { expected . append ( "James<sp>T<sp>Kirk<sp>reporting.<sp>" ) ; } "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "<" ) ; builder . append ( name ) ; for ( Map . Entry < java . lang . Object , java . lang . Object > entry : attributes . entrySet ( ) ) { builder . append ( "<sp>" ) ; builder . append ( entry . getKey ( ) ) ; builder . append ( "=\"" ) ; builder . append ( entry . getValue ( ) ) ; builder . append ( "\"" ) ; } java . util . List < org . apache . ibatis . parsing . XNode > children = getChildren ( ) ; if ( ! ( children . isEmpty ( ) ) ) { builder . append ( ">\n" ) ; for ( org . apache . ibatis . parsing . XNode node : children ) { builder . append ( node . toString ( ) ) ; } builder . append ( "</" ) ; builder . append ( name ) ; builder . append ( ">" ) ; } else if ( ( body ) != null ) { builder . append ( ">" ) ; builder . append ( body ) ; builder . append ( "</" ) ; builder . append ( name ) ; builder . append ( ">" ) ; } else { builder . append ( "/>" ) ; } builder . append ( "\n" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , parser . parse ( input . toString ( ) ) )
multiDimensionalIntArraysAreEqual ( ) { int [ ] [ ] int1 = new int [ ] [ ] { new int [ ] { 1 , 2 , 3 } , new int [ ] { 4 , 5 , 6 } } ; int [ ] [ ] int2 = new int [ ] [ ] { new int [ ] { 1 , 2 , 3 } , new int [ ] { 4 , 5 , 6 } } ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertArrayEquals ( int1 , int2 )
test58updateXAuditMapVXResourceNull ( ) { org . apache . ranger . view . VXAuditMap vXAuditMap = null ; org . apache . ranger . view . VXAuditMap retvXAuditMap = xUserRest . updateXAuditMap ( vXAuditMap ) ; "<AssertPlaceHolder>" ; } updateXAuditMap ( org . apache . ranger . rest . VXAuditMap ) { org . apache . ranger . rest . VXAuditMap vXAuditMapRet = null ; if ( vXAuditMap != null ) { if ( ( xResourceService . readResource ( vXAuditMap . getResourceId ( ) ) ) == null ) { throw restErrorUtil . createRESTException ( ( "Invalid<sp>Input<sp>Data<sp>-<sp>No<sp>resource<sp>found<sp>with<sp>Id:<sp>" + ( vXAuditMap . getResourceId ( ) ) ) , MessageEnums . INVALID_INPUT_DATA ) ; } else { vXAuditMapRet = xUserMgr . updateXAuditMap ( vXAuditMap ) ; } } return vXAuditMapRet ; }
org . junit . Assert . assertNull ( retvXAuditMap )
testGetAsyncContext ( ) { javax . servlet . AsyncContext asyncContext = mockit . Deencapsulation . getField ( org . apache . servicecomb . foundation . vertx . http . VertxServerRequestToHttpServletRequest . class , "EMPTY_ASYNC_CONTEXT" ) ; "<AssertPlaceHolder>" ; } getAsyncContext ( ) { return org . apache . servicecomb . foundation . vertx . http . VertxServerRequestToHttpServletRequest . EMPTY_ASYNC_CONTEXT ; }
org . junit . Assert . assertSame ( asyncContext , request . getAsyncContext ( ) )
noColumnActions ( ) { final java . lang . String response = given ( ) . contentType ( org . talend . dataprep . transformation . service . JSON ) . body ( "" ) . when ( ) . post ( "/actions/column" ) . asString ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( ( ( ( org . apache . commons . lang3 . StringUtils . isEmpty ( title ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( mail ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( severity ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( type ) ) ) && ( org . apache . commons . lang3 . StringUtils . isEmpty ( description ) ) ; }
org . junit . Assert . assertFalse ( response . isEmpty ( ) )
shouldInitializeDefaultAttemptsOnInitialize ( ) { propertyManager . initializeConnection ( "url" ) ; final int attempts = propertyManager . getReConnectionAttempts ( "url" ) ; "<AssertPlaceHolder>" ; } getReConnectionAttempts ( java . lang . String ) { return java . lang . Integer . valueOf ( getProperty ( url , org . eclipse . che . ide . websocket . impl . WebSocketPropertyManager . Properties . ATTEMPTS ) ) ; }
org . junit . Assert . assertEquals ( 0 , attempts )
testMatrixDeterminant ( ) { org . nd4j . OpValidationSuite . ignoreFailing ( ) ; org . nd4j . linalg . factory . Nd4j . getRandom ( ) . setSeed ( 12345 ) ; org . nd4j . linalg . api . ndarray . INDArray in = org . nd4j . linalg . factory . Nd4j . rand ( 3 , 3 ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable var = sd . var ( "in" , in ) ; org . nd4j . autodiff . samediff . SDVariable md = sd . f ( ) . matrixDeterminant ( var ) ; double d = new org . apache . commons . math3 . linear . LUDecomposition ( org . nd4j . linalg . checkutil . CheckUtil . convertToApacheMatrix ( in ) ) . getDeterminant ( ) ; org . nd4j . linalg . api . ndarray . INDArray outExp = org . nd4j . linalg . factory . Nd4j . trueScalar ( d ) ; java . lang . String err = org . nd4j . autodiff . validation . OpValidation . validate ( new org . nd4j . autodiff . validation . TestCase ( sd ) . expected ( md . getVarName ( ) , outExp ) ) ; "<AssertPlaceHolder>" ; } expected ( org . nd4j . autodiff . samediff . SDVariable , org . nd4j . linalg . api . ndarray . INDArray ) { return expected ( var . getVarName ( ) , output ) ; }
org . junit . Assert . assertNull ( err )
testA ( ) { org . antlr . tool . Grammar g = new org . antlr . tool . Grammar ( ( "parser<sp>grammar<sp>P;\n" + "a<sp>:<sp>A;" ) ) ; java . lang . String expecting = "(rule<sp>a<sp>ARG<sp>RET<sp>scope<sp>(BLOCK<sp>(ALT<sp>A<sp><end-of-alt>)<sp><end-of-block>)<sp><end-of-rule>)" ; java . lang . String found = g . getRule ( "a" ) . tree . toStringTree ( ) ; "<AssertPlaceHolder>" ; } toStringTree ( ) { if ( ( ( children ) == null ) || ( children . isEmpty ( ) ) ) { return this . toString ( ) ; } java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; if ( ! ( isNil ( ) ) ) { buf . append ( "(" ) ; buf . append ( this . toString ( ) ) ; buf . append ( '<sp>' ) ; } for ( int i = 0 ; ( ( children ) != null ) && ( i < ( children . size ( ) ) ) ; i ++ ) { org . antlr . runtime . tree . Tree t = ( ( org . antlr . runtime . tree . Tree ) ( children . get ( i ) ) ) ; if ( i > 0 ) { buf . append ( '<sp>' ) ; } buf . append ( t . toStringTree ( ) ) ; } if ( ! ( isNil ( ) ) ) { buf . append ( ")" ) ; } return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( expecting , found )
testGetResourcePropertyValue ( ) { System . out . println ( "getResourcePropertyValue" ) ; OpenRate . utils . PropertyUtils instance = OpenRate . utils . PropertyUtils . getPropertyUtils ( ) ; java . lang . String resource = "ECI" ; java . lang . String propertyName = "Port" ; java . lang . String expResult = "8086" ; java . lang . String result = instance . getResourcePropertyValue ( resource , propertyName ) ; "<AssertPlaceHolder>" ; } getResourcePropertyValue ( java . lang . String , java . lang . String ) { java . lang . String valueFound ; java . lang . String ModuleSymKey ; ModuleSymKey = ( ( "Resource." + resourceName ) + "." ) + propertyName ; valueFound = this . getPropertyValue ( ModuleSymKey ) ; return valueFound ; }
org . junit . Assert . assertEquals ( expResult , result )
testFetchByPrimaryKeysWithMultiplePrimaryKeysWhereNoPrimaryKeysExist ( ) { long pk1 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; long pk2 = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; primaryKeys . add ( pk1 ) ; primaryKeys . add ( pk2 ) ; java . util . Map < java . io . Serializable , com . liferay . portal . kernel . model . RepositoryEntry > repositoryEntries = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( repositoryEntries . isEmpty ( ) )
testIDInvalid ( ) { org . kie . workbench . common . stunner . bpmn . definition . BPMNDiagramImpl BPMNDiagramImpl = createValidBpmnDiagram ( ) ; BPMNDiagramImpl . getDiagramSet ( ) . setId ( new org . kie . workbench . common . stunner . bpmn . definition . property . diagram . Id ( org . kie . workbench . common . stunner . bpmn . definition . property . task . BPMNDiagramTest . ID_INVALID ) ) ; java . util . Set < javax . validation . ConstraintViolation < org . kie . workbench . common . stunner . bpmn . definition . BPMNDiagramImpl > > violations = this . validator . validate ( BPMNDiagramImpl ) ; "<AssertPlaceHolder>" ; } size ( ) { return index . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , violations . size ( ) )
testGeneratingBaseConusmerScenario5 ( ) { haveProperty = false ; haveScpp = false ; java . io . File consumerProps = createPropertyFile ( destDir . getAbsolutePath ( ) , CONSUMER_PROPERTIES ) ; fillProperties ( consumerProper , consumerProps ) ; java . lang . String [ ] testArgs1 = new java . lang . String [ ] { "-servicename" , "NewService" , "-genType" , "COMMON" 0 , "-interface" , "COMMON" 1 , "COMMON" 3 , destDir . getAbsolutePath ( ) , "COMMON" 7 , "1.2.3" , "COMMON" 4 , "COMMON" , "-bin" , binDir . getAbsolutePath ( ) , "-pr" , destDir . getAbsolutePath ( ) , "-adminname" , "COMMON" 5 , "COMMON" 6 , "cname" } ; performDirectCodeGen ( testArgs1 , binDir ) ; baseConsumer = ( destDir . getAbsolutePath ( ) ) + "COMMON" 2 ; baseConsumerClass = new java . io . File ( baseConsumer ) ; "<AssertPlaceHolder>" ; } exists ( ) { return legacyPropertiesFile . exists ( ) ; }
org . junit . Assert . assertTrue ( baseConsumerClass . exists ( ) )
testDoubleUseOfCode ( ) { java . lang . String code = authClient . authorizeClient ( clientEntity , "test1<sp>test2" ) . getCode ( ) ; "<AssertPlaceHolder>" ; restClient . setFollowRedirects ( false ) ; com . github . hburgmeier . jerseyoauth2 . testsuite . base . client . ResourceClient client = new com . github . hburgmeier . jerseyoauth2 . testsuite . base . client . ResourceClient ( clientEntity ) ; client . getAccessToken ( code ) ; try { client . getAccessToken ( code ) ; org . junit . Assert . fail ( ) ; } catch ( com . github . hburgmeier . jerseyoauth2 . client . scribe . TokenExtractorException e ) { } } getCode ( ) { return code ; }
org . junit . Assert . assertNotNull ( code )
testDontPlaceTwoQueensOnOneSquare ( ) { board . addQueenAt ( new aima . core . util . datastructure . XYLocation ( 0 , 0 ) ) ; board . addQueenAt ( new aima . core . util . datastructure . XYLocation ( 0 , 0 ) ) ; "<AssertPlaceHolder>" ; } getNumberOfQueensOnBoard ( ) { int count = 0 ; for ( int i = 0 ; i < ( getSize ( ) ) ; i ++ ) { for ( int j = 0 ; j < ( getSize ( ) ) ; j ++ ) { if ( ( squares [ i ] [ j ] ) == 1 ) count ++ ; } } return count ; }
org . junit . Assert . assertEquals ( 1 , board . getNumberOfQueensOnBoard ( ) )