input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
validate_fourth_quarter ( ) { java . time . LocalDate date = java . time . LocalDate . of ( 2014 , Month . DECEMBER , 18 ) ; java . lang . Integer quarter = date . query ( new com . levelup . java . date . query . CurrentQuarterQuery ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( new java . lang . Integer ( 4 ) , quarter )
retrievesLocaleFromLanguage ( ) { java . util . Locale locale = new java . util . Locale ( "en" , "us" ) ; org . everrest . core . impl . header . AcceptLanguage acceptLanguage = new org . everrest . core . impl . header . AcceptLanguage ( new org . everrest . core . impl . header . Language ( locale ) ) ; "<AssertPlaceHolder>" ; } getLocale ( ) { return locale ; }
org . junit . Assert . assertEquals ( locale , acceptLanguage . getLocale ( ) )
testWriteByteArrayOffLen ( ) { temporaryFileBackedOutputStream . write ( org . codice . ddf . platform . util . TemporaryFileBackedOutputStreamTest . TEST_BYTE_ARRAY , 0 , 1 ) ; com . google . common . io . ByteSource byteSource = temporaryFileBackedOutputStream . asByteSource ( ) ; "<AssertPlaceHolder>" ; } read ( ) { ddf . platform . scheduler . CommandJob . LOGGER . error ( "This<sp>method<sp>implementation<sp>of<sp>an<sp>InputStream<sp>is<sp>just<sp>a<sp>work-around<sp>for<sp>a<sp>Karaf<sp>bug<sp>and<sp>should<sp>never<sp>be<sp>called.<sp>There<sp>is<sp>an<sp>issue<sp>with<sp>the<sp>Platform<sp>Command<sp>Scheduler<sp>implementation." ) ; return - 1 ; }
org . junit . Assert . assertThat ( byteSource . read ( ) , org . hamcrest . Matchers . is ( org . codice . ddf . platform . util . TemporaryFileBackedOutputStreamTest . TEST_BYTE_ARRAY ) )
nonNullBeadsItem ( ) { org . sejda . sambox . pdmodel . PDPage victim = new org . sejda . sambox . pdmodel . PDPage ( ) ; org . sejda . sambox . cos . COSArray beads = new org . sejda . sambox . cos . COSArray ( new org . sejda . sambox . cos . COSDictionary ( ) ) ; victim . getCOSObject ( ) . setItem ( COSName . B , beads ) ; "<AssertPlaceHolder>" ; } getThreadBeads ( ) { org . sejda . sambox . cos . COSArray beads = page . getDictionaryObject ( COSName . B , org . sejda . sambox . cos . COSArray . class ) ; if ( beads == null ) { return new org . sejda . sambox . cos . COSArrayList ( page , org . sejda . sambox . cos . COSName . B ) ; } java . util . List < org . sejda . sambox . pdmodel . interactive . pagenavigation . PDThreadBead > actuals = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < ( beads . size ( ) ) ; i ++ ) { org . sejda . sambox . cos . COSBase item = beads . getObject ( i ) ; org . sejda . sambox . pdmodel . interactive . pagenavigation . PDThreadBead bead = ofNullable ( item ) . filter ( ( d ) -> d instanceof org . sejda . sambox . cos . COSDictionary ) . map ( org . sejda . sambox . cos . COSDictionary . class :: cast ) . map ( PDThreadBead :: new ) . orElseGet ( ( ) -> { org . sejda . sambox . pdmodel . PDPage . LOG . warn ( "Ignored<sp>thread<sp>bead<sp>expected<sp>to<sp>be<sp>a<sp>dictionary<sp>but<sp>was<sp>{}" , item ) ; return null ; } ) ; if ( nonNull ( bead ) ) { actuals . add ( bead ) ; } } return new org . sejda . sambox . cos . COSArrayList ( actuals , beads ) ; }
org . junit . Assert . assertFalse ( victim . getThreadBeads ( ) . isEmpty ( ) )
testUrl ( ) { java . lang . String fixture = "http://myfm.at" ; this . libshout . setUrl ( fixture ) ; "<AssertPlaceHolder>" ; } getUrl ( ) { return com . gmail . kunicins . olegs . libshout . Libshout . shout_get_url ( this . instance ) ; }
org . junit . Assert . assertEquals ( fixture , this . libshout . getUrl ( ) )
testSetUniqueValueColor ( ) { org . orbisgis . legend . thematic . constant . UniqueSymbolLine usl = getUniqueSymbolLine ( org . orbisgis . legend . analyzer . CONSTANT_LINE ) ; usl . setLineColor ( Color . BLUE ) ; "<AssertPlaceHolder>" ; } getLineColor ( ) { return null ; }
org . junit . Assert . assertTrue ( usl . getLineColor ( ) . equals ( Color . BLUE ) )
testSaveWithBook ( ) { int before = countRowsInTable ( org . sculptor . examples . library . media . domain . Book . class ) ; org . sculptor . examples . library . media . domain . PhysicalMedia media = new org . sculptor . examples . library . media . domain . PhysicalMedia ( ) ; media . setStatus ( "A" ) ; media . setLocation ( "abcdef" ) ; if ( org . sculptor . framework . accessimpl . jpa . JpaHelper . isJpaProviderOpenJpa ( getEntityManager ( ) ) ) media = physicalMediaService . save ( getServiceContext ( ) , media ) ; media . addMedia ( new org . sculptor . examples . library . media . domain . Book ( "book1" , "123456" ) ) ; media . addMedia ( new org . sculptor . examples . library . media . domain . Book ( "book2" , "654321" ) ) ; media = physicalMediaService . save ( getServiceContext ( ) , media ) ; "<AssertPlaceHolder>" ; } countRowsInTable ( java . lang . Class ) { javax . persistence . Query query = getEntityManager ( ) . createQuery ( ( ( "select<sp>count(e)<sp>from<sp>" + ( domainObjectClass . getSimpleName ( ) ) ) + "<sp>e" ) ) ; return ( ( java . lang . Integer ) ( query . getSingleResult ( ) ) ) ; }
org . junit . Assert . assertEquals ( ( before + 2 ) , countRowsInTable ( org . sculptor . examples . library . media . domain . Book . class ) )
testRoundTripChange ( ) { org . semanticweb . owlapi . change . RemoveAxiomData data = new org . semanticweb . owlapi . change . RemoveAxiomData ( mockAxiom ) ; org . semanticweb . owlapi . model . RemoveAxiom change = new org . semanticweb . owlapi . model . RemoveAxiom ( mockOntology , mockAxiom ) ; "<AssertPlaceHolder>" ; } getChangeData ( ) { return new org . semanticweb . owlapi . change . SetOntologyIDData ( newOntologyID ) ; }
org . junit . Assert . assertEquals ( data , change . getChangeData ( ) )
testGeoServerReloadActionConfigurationAliased ( ) { java . lang . Boolean configurationAliasRegistered = false ; java . lang . Class configurationClass = it . geosolutions . geobatch . geoserver . reload . GeoServerReloadConfiguration . class ; java . util . Iterator < java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > > it = aliasRegistry . iterator ( ) ; while ( it . hasNext ( ) ) { java . util . Map . Entry < java . lang . String , java . lang . Class < ? > > alias = it . next ( ) ; it . geosolutions . geobatch . annotations . Action action = ( ( it . geosolutions . geobatch . annotations . Action ) ( it . geosolutions . geobatch . geoserver . reload . GeoServerReload . class . getAnnotations ( ) [ 0 ] ) ) ; java . lang . String configurationAlias = action . configurationAlias ( ) ; if ( ( configurationAlias == null ) || ( configurationAlias . isEmpty ( ) ) ) { configurationAlias = configurationClass . getSimpleName ( ) ; } if ( ( alias . getKey ( ) . equals ( configurationAlias ) ) && ( alias . getValue ( ) . equals ( configurationClass ) ) ) { configurationAliasRegistered = true ; break ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } if ( ! ( super . equals ( obj ) ) ) { return false ; } if ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator . getClass ( ) ) != ( obj . getClass ( ) ) ) { return false ; } it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator < it . geosolutions . filesystemmonitor . monitor . FileSystemEvent > other = null ; if ( obj instanceof it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) { other = ( ( it . geosolutions . geobatch . flow . event . generator . file . FileBasedEventGenerator ) ( obj ) ) ; } else { throw new java . lang . IllegalArgumentException ( "The<sp>object<sp>is<sp>not<sp>a<sp>FileBasedEventGenerator." ) ; } if ( ( fsMonitor ) == null ) { if ( ( other . fsMonitor ) != null ) { return false ; } } else if ( ! ( fsMonitor . equals ( other . fsMonitor ) ) ) { return false ; } if ( ( watchDirectory ) == null ) { if ( ( other . watchDirectory ) != null ) { return false ; } } else if ( ! ( watchDirectory . equals ( other . watchDirectory ) ) ) { return false ; } if ( ( wildCard ) == null ) { if ( ( other . wildCard ) != null ) { return false ; } } else if ( ! ( wildCard . equals ( other . wildCard ) ) ) { return false ; } return true ; }
org . junit . Assert . assertTrue ( configurationAliasRegistered )
readUsingDirectByteBuffer ( ) { byte [ ] output = new byte [ expected . length ] ; try ( com . groupon . lex . metrics . history . xdr . support . reader . FileReader reader = new com . groupon . lex . metrics . history . xdr . support . reader . GzipReader ( new com . groupon . lex . metrics . history . xdr . support . reader . FileChannelReader ( file , 0 ) ) ) { java . nio . ByteBuffer buf = java . nio . ByteBuffer . allocateDirect ( ( ( output . length ) + 100 ) ) ; while ( ( buf . position ( ) ) < ( output . length ) ) reader . read ( buf ) ; buf . flip ( ) ; buf . get ( output ) ; } "<AssertPlaceHolder>" ; } get ( int ) { if ( ( n < 0 ) || ( n >= ( size ( ) ) ) ) throw new java . util . NoSuchElementException ( ( ( ( ( "index<sp>" + n ) + "<sp>out<sp>of<sp>bounds<sp>[0.." ) + ( size ( ) ) ) + ")" ) ) ; return ( begin ) + n ; }
org . junit . Assert . assertArrayEquals ( expected , output )
testMapSideJoinWithImmutableBytesWritable ( ) { org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( tmpDir . getDefaultConfiguration ( ) ) ; org . apache . hadoop . fs . Path path1 = tmpDir . getPath ( "input1.txt" ) ; org . apache . hadoop . fs . Path path2 = tmpDir . getPath ( "input2.txt" ) ; java . io . OutputStream out1 = fs . create ( path1 , true ) ; java . io . OutputStream out2 = fs . create ( path2 , true ) ; for ( int i = 0 ; i < 4 ; i ++ ) { byte [ ] value = ( ( "value" + i ) + "\n" ) . getBytes ( java . nio . charset . Charset . forName ( "UTF-8" ) ) ; out1 . write ( value ) ; out2 . write ( value ) ; } out1 . flush ( ) ; out1 . close ( ) ; out2 . flush ( ) ; out2 . close ( ) ; final org . apache . crunch . impl . mr . MRPipeline pipeline = new org . apache . crunch . impl . mr . MRPipeline ( org . apache . crunch . lib . join . MapsideJoinStrategyIT . class , tmpDir . getDefaultConfiguration ( ) ) ; final org . apache . crunch . PCollection < java . lang . String > values1 = pipeline . readTextFile ( path1 . toString ( ) ) ; final org . apache . crunch . PCollection < java . lang . String > values2 = pipeline . readTextFile ( path2 . toString ( ) ) ; final org . apache . crunch . PTable < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > convertedValues1 = org . apache . crunch . lib . join . MapsideJoinStrategyIT . convertStringToText ( values1 ) ; final org . apache . crunch . PTable < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > convertedValues2 = org . apache . crunch . lib . join . MapsideJoinStrategyIT . convertStringToText ( values2 ) ; final org . apache . crunch . lib . join . MapsideJoinStrategy < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > mapSideJoinStrategy = org . apache . crunch . lib . join . MapsideJoinStrategy . < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > create ( ) ; final org . apache . crunch . PTable < org . apache . hadoop . io . Text , org . apache . crunch . Pair < org . apache . hadoop . io . Text , org . apache . hadoop . io . Text > > updatedJoinedRows = mapSideJoinStrategy . join ( convertedValues1 , convertedValues2 , JoinType . INNER_JOIN ) ; pipeline . run ( ) ; "<AssertPlaceHolder>" ; } materializeToMap ( ) { return new org . apache . crunch . materialize . MaterializableMap < K , V > ( this . materialize ( ) ) ; }
org . junit . Assert . assertEquals ( 4 , updatedJoinedRows . materializeToMap ( ) . size ( ) )
testSaml2 ( ) { org . apache . cxf . service . Service service = createService ( ) ; java . util . Map < java . lang . String , java . lang . Object > inProperties = new java . util . HashMap ( ) ; inProperties . put ( ConfigurationConstants . ACTION , ConfigurationConstants . SAML_TOKEN_UNSIGNED ) ; final java . util . Map < javax . xml . namespace . QName , java . lang . Object > customMap = new java . util . HashMap ( ) ; org . apache . cxf . ws . security . wss4j . saml . CustomSamlValidator validator = new org . apache . cxf . ws . security . wss4j . saml . CustomSamlValidator ( ) ; validator . setRequireSAML1Assertion ( false ) ; customMap . put ( WSConstants . SAML_TOKEN , validator ) ; customMap . put ( WSConstants . SAML2_TOKEN , validator ) ; inProperties . put ( WSS4JInInterceptor . VALIDATOR_MAP , customMap ) ; inProperties . put ( SecurityConstants . VALIDATE_SAML_SUBJECT_CONFIRMATION , "false" ) ; org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor inInterceptor = new org . apache . cxf . ws . security . wss4j . WSS4JInInterceptor ( inProperties ) ; service . getInInterceptors ( ) . add ( inInterceptor ) ; service . put ( SecurityConstants . VALIDATE_SAML_SUBJECT_CONFIRMATION , "false" ) ; org . apache . cxf . ws . security . wss4j . Echo echo = createClientProxy ( ) ; org . apache . cxf . endpoint . Client client = org . apache . cxf . frontend . ClientProxy . getClient ( echo ) ; client . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; client . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . wss4j . stax . ext . WSSSecurityProperties properties = new org . apache . wss4j . stax . ext . WSSSecurityProperties ( ) ; java . util . List < org . apache . wss4j . stax . ext . WSSConstants . Action > actions = new java . util . ArrayList ( ) ; actions . add ( WSSConstants . SAML_TOKEN_UNSIGNED ) ; properties . setActions ( actions ) ; properties . setSamlCallbackHandler ( new org . apache . cxf . ws . security . wss4j . saml . SAML2CallbackHandler ( ) ) ; org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ohandler = new org . apache . cxf . ws . security . wss4j . WSS4JStaxOutInterceptor ( properties ) ; client . getOutInterceptors ( ) . add ( ohandler ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
testGetProperty ( ) { when ( mockNode . getProperty ( "xyz" ) ) . thenReturn ( mockProp ) ; final javax . jcr . Property actual = getJcrNode ( testObj ) . getProperty ( "xyz" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( mockProp , actual )
shouldNotHandleRequest_noBearerValue ( ) { io . gravitee . common . http . HttpHeaders headers = new io . gravitee . common . http . HttpHeaders ( ) ; io . gravitee . gateway . api . Request request = mock ( io . gravitee . gateway . api . Request . class ) ; when ( request . headers ( ) ) . thenReturn ( headers ) ; headers . add ( HttpHeaders . AUTHORIZATION , ( ( JWTAuthenticationHandler . BEARER_AUTHORIZATION_TYPE ) + "<sp>" ) ) ; boolean handle = authenticationHandler . canHandle ( request ) ; "<AssertPlaceHolder>" ; } canHandle ( io . gravitee . gateway . repository . plugins . Plugin ) { return ( plugin . type ( ) ) == ( PluginType . REPOSITORY ) ; }
org . junit . Assert . assertFalse ( handle )
testSetGetColBandSize ( ) { org . apache . poi . xwpf . usermodel . XWPFDocument doc = new org . apache . poi . xwpf . usermodel . XWPFDocument ( ) ; org . openxmlformats . schemas . wordprocessingml . x2006 . main . CTTbl ctTable = CTTbl . Factory . newInstance ( ) ; org . apache . poi . xwpf . usermodel . XWPFTable table = new org . apache . poi . xwpf . usermodel . XWPFTable ( ctTable , doc ) ; table . setColBandSize ( 16 ) ; int sz = table . getColBandSize ( ) ; "<AssertPlaceHolder>" ; try { doc . close ( ) ; } catch ( java . io . IOException e ) { org . junit . Assert . fail ( "Unable<sp>to<sp>close<sp>doc" ) ; } } getColBandSize ( ) { int size = 0 ; org . openxmlformats . schemas . wordprocessingml . x2006 . main . CTTblPr tblPr = getTblPr ( ) ; if ( tblPr . isSetTblStyleColBandSize ( ) ) { org . openxmlformats . schemas . wordprocessingml . x2006 . main . CTDecimalNumber colSize = tblPr . getTblStyleColBandSize ( ) ; size = colSize . getVal ( ) . intValue ( ) ; } return size ; }
org . junit . Assert . assertEquals ( 16 , sz )
doFindAccountUserId ( ) { when ( repo . findByUserid ( ServiceTestConfiguration . USER_ID ) ) . thenReturn ( io . pivotal . springtrader . accounts . ServiceTestConfiguration . account ( ) ) ; "<AssertPlaceHolder>" ; } getAccount ( java . lang . Integer ) { io . pivotal . springtrader . accounts . services . AccountService . logger . debug ( ( "AccountService.getAccount:<sp>id=" + id ) ) ; io . pivotal . springtrader . accounts . domain . Account account = accountRepository . findOne ( id ) ; if ( account == null ) { io . pivotal . springtrader . accounts . services . AccountService . logger . warn ( ( "AccountService.getAccount:<sp>could<sp>not<sp>find<sp>account<sp>with<sp>id:<sp>" + id ) ) ; throw new io . pivotal . springtrader . accounts . exceptions . NoRecordsFoundException ( ) ; } io . pivotal . springtrader . accounts . services . AccountService . logger . info ( java . lang . String . format ( "AccountService.getAccount<sp>-<sp>retrieved<sp>account<sp>with<sp>id:<sp>%s.<sp>Payload<sp>is:<sp>%s" , id , account ) ) ; return account ; }
org . junit . Assert . assertEquals ( service . getAccount ( ServiceTestConfiguration . USER_ID ) . toString ( ) , io . pivotal . springtrader . accounts . ServiceTestConfiguration . account ( ) . toString ( ) )
testNodeSummaries ( ) { com . fasterxml . jackson . databind . node . ArrayNode nodes = getNodeSummaries ( ) ; final int size = nodes . size ( ) ; "<AssertPlaceHolder>" ; for ( int i = 0 ; i < size ; ++ i ) { checkNodeFields ( ( ( com . fasterxml . jackson . databind . node . ObjectNode ) ( nodes . get ( i ) ) ) , org . apache . hyracks . tests . integration . NodesAPIIntegrationTest . NODE_SUMMARY_FIELDS ) ; } } size ( ) { return list . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , size )
testSearchServices_Wildcard_SvcName ( ) { final org . oscm . serviceprovisioningservice . bean . VOServiceListResult hits = org . oscm . serviceprovisioningservice . bean . SearchServiceBeanListIT . search . searchServices ( org . oscm . serviceprovisioningservice . bean . SearchServiceBeanListIT . FUJITSU , "de" , "wic" ) ; final org . oscm . serviceprovisioningservice . bean . VOServiceListResult hits2 = org . oscm . serviceprovisioningservice . bean . SearchServiceBeanListIT . search . searchServices ( org . oscm . serviceprovisioningservice . bean . SearchServiceBeanListIT . FUJITSU , "de" , "wicked" ) ; "<AssertPlaceHolder>" ; } getResultSize ( ) { return resultSize ; }
org . junit . Assert . assertTrue ( ( ( hits . getResultSize ( ) ) == ( hits2 . getResultSize ( ) ) ) )
testRunProgram ( ) { com . vmware . thinapp . workpool . VmRunCommandBuilder v = new com . vmware . thinapp . workpool . VmRunCommandBuilder ( com . vmware . thinapp . workpool . WorkpoolStub . vcInfo , com . vmware . thinapp . workpool . WorkpoolStub . vmInfo ) ; java . util . List < java . lang . String > expected = com . google . common . collect . ImmutableList . of ( "vmrun" , "-T" , "vc" , "-h" , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . VC , "vc" 1 , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . VC_USER , "vc" 2 , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . VC_PWD , "-gu" , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . GUEST_USER , "-gp" , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . GUEST_PWD , "CopyFileFromHostToGuest" , "runProgramInGuest" , com . vmware . thinapp . workpool . tests . VmRunCommandBuilderTest . DS_LOC , "-interactive" , "C:\\Windows\\notepad.exe" , "vc" 0 ) ; com . vmware . thinapp . workpool . VmRunCommandBuilder . RunProgramOptions runOptions = new com . vmware . thinapp . workpool . VmRunCommandBuilder . RunProgramOptions ( ) ; runOptions . setInteractive ( true ) ; java . util . List < java . lang . String > cmd = v . runProgram ( runOptions , "C:\\Windows\\notepad.exe" , "vc" 0 ) ; "<AssertPlaceHolder>" ; } runProgram ( com . vmware . thinapp . workpool . VmRunCommandBuilder$RunProgramOptions , java . lang . String , java . lang . String [ ] ) { java . util . List < java . lang . String > runargs = runOpts . toList ( ) ; runargs . add ( guestPath ) ; runargs . addAll ( java . util . Arrays . asList ( args ) ) ; return createCommand ( "runProgramInGuest" , runargs . toArray ( new java . lang . String [ runargs . size ( ) ] ) ) ; }
org . junit . Assert . assertEquals ( expected , cmd )
testAddPartition ( ) { java . util . Map < java . lang . String , java . util . Collection < java . lang . String > > update = new java . util . HashMap ( ) ; java . util . Set < java . lang . String > locations = new java . util . HashSet ( ) ; locations . add ( org . apache . sentry . service . thrift . TestFullUpdateModifier . PATH ) ; update . put ( org . apache . sentry . service . thrift . TestFullUpdateModifier . AUTH , locations ) ; org . apache . hadoop . hive . metastore . api . NotificationEvent event = new org . apache . hadoop . hive . metastore . api . NotificationEvent ( 0 , 0 , org . apache . sentry . service . thrift . ADD_PARTITION . toString ( ) , "" ) ; org . apache . hadoop . hive . metastore . messaging . MessageDeserializer deserializer = org . mockito . Mockito . mock ( org . apache . sentry . binding . metastore . messaging . json . SentryJSONMessageDeserializer . class ) ; java . lang . String partPath = "hello/world" ; java . lang . String partLocation = org . apache . sentry . service . thrift . TestFullUpdateModifier . uri ( partPath ) ; org . apache . sentry . binding . metastore . messaging . json . SentryJSONAddPartitionMessage message = new org . apache . sentry . binding . metastore . messaging . json . SentryJSONAddPartitionMessage ( org . apache . sentry . service . thrift . TestFullUpdateModifier . SERVER , org . apache . sentry . service . thrift . TestFullUpdateModifier . PRINCIPAL , org . apache . sentry . service . thrift . TestFullUpdateModifier . TABLE_OBJ , java . util . Collections . emptyIterator ( ) , java . util . Collections . emptyIterator ( ) , 0L , java . util . Collections . singletonList ( partLocation ) ) ; org . mockito . Mockito . when ( deserializer . getAddPartitionMessage ( "" ) ) . thenReturn ( message ) ; org . apache . sentry . service . thrift . FullUpdateModifier . applyEvent ( update , event , deserializer ) ; java . util . Set < java . lang . String > expected = new java . util . HashSet ( 2 ) ; expected . add ( org . apache . sentry . service . thrift . TestFullUpdateModifier . PATH ) ; expected . add ( partPath ) ; "<AssertPlaceHolder>" ; } get ( int ) { return sentryServers . get ( serverNum ) ; }
org . junit . Assert . assertEquals ( expected , update . get ( org . apache . sentry . service . thrift . TestFullUpdateModifier . AUTH ) )
testRemove ( ) { com . liferay . portal . workflow . kaleo . model . KaleoTaskAssignment newKaleoTaskAssignment = addKaleoTaskAssignment ( ) ; _persistence . remove ( newKaleoTaskAssignment ) ; com . liferay . portal . workflow . kaleo . model . KaleoTaskAssignment existingKaleoTaskAssignment = _persistence . fetchByPrimaryKey ( newKaleoTaskAssignment . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingKaleoTaskAssignment )
testDeleteStream ( ) { mockStorageContainer ( org . apache . bookkeeper . stream . storage . impl . service . RangeStoreServiceImplTest . SCID ) ; org . apache . bookkeeper . stream . proto . storage . DeleteStreamResponse expectedResp = org . apache . bookkeeper . stream . proto . storage . DeleteStreamResponse . getDefaultInstance ( ) ; when ( rrStore . deleteStream ( any ( org . apache . bookkeeper . stream . proto . storage . DeleteStreamRequest . class ) ) ) . thenReturn ( org . apache . bookkeeper . common . concurrent . FutureUtils . value ( expectedResp ) ) ; org . apache . bookkeeper . stream . proto . storage . DeleteStreamRequest expectedReq = org . apache . bookkeeper . stream . proto . storage . DeleteStreamRequest . getDefaultInstance ( ) ; "<AssertPlaceHolder>" ; verify ( rrStore , times ( 1 ) ) . deleteStream ( same ( expectedReq ) ) ; } result ( java . util . concurrent . CompletableFuture ) { return org . apache . bookkeeper . common . concurrent . FutureUtils . result ( future , org . apache . bookkeeper . common . concurrent . FutureUtils . DEFAULT_EXCEPTION_HANDLER ) ; }
org . junit . Assert . assertSame ( expectedResp , org . apache . bookkeeper . common . concurrent . FutureUtils . result ( rrStore . deleteStream ( expectedReq ) ) )
testMatchExactlyTpSrcErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "in_node" , "node01" ) ; put ( "in_port" , "port01" ) ; put ( OFPFlowMatch . TCP_SRC , "100" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowMatchQuery ( params ) ; target . parse ( ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch match = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowMatch ( ) ; match . setTcpSrc ( 0 ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . matchExactly ( match ) , org . hamcrest . CoreMatchers . is ( false ) )
testIndicatieOnderCurateleHistorisch ( ) { final java . util . Set < nl . bzk . brp . domain . algemeen . ZoekCriterium > zoekCriteria = new java . util . HashSet ( ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria1 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_INDICATIE_ONDERCURATELE_WAARDE ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , true ) ; nl . bzk . brp . domain . algemeen . ZoekCriterium zoekCriteria2 = new nl . bzk . brp . domain . algemeen . ZoekCriterium ( getAttribuutElement ( Element . PERSOON_INDICATIE_ONDERCURATELE_SOORTNAAM ) , nl . bzk . algemeenbrp . dal . domein . brp . enums . Zoekoptie . EXACT , SoortIndicatie . ONDER_CURATELE . getId ( ) ) ; zoekCriteria1 . setAdditioneel ( zoekCriteria2 ) ; zoekCriteria . add ( zoekCriteria1 ) ; nl . bzk . brp . delivery . dataaccess . bevraging . SqlStamementZoekPersoon sql = new nl . bzk . brp . delivery . dataaccess . bevraging . SqlBepaler ( zoekCriteria , 10 , true , null , false ) . maakSql ( ) ; final java . util . List < java . lang . Long > ids = zoekPersoonRepository . zoekPersonen ( sql , postgres ) ; System . out . println ( sql ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , ids . size ( ) )
testDoesNotCutFromStandardFields ( ) { org . graylog2 . plugin . Message msg = new org . graylog2 . plugin . Message ( "The<sp>short<sp>message" , "TestUnit" , org . graylog2 . plugin . Tools . nowUTC ( ) ) ; org . graylog2 . inputs . extractors . SubstringExtractor x = new org . graylog2 . inputs . extractors . SubstringExtractor ( metricRegistry , "foo" , "foo" , 0 , Extractor . CursorStrategy . CUT , "message" , "our_result" , org . graylog2 . inputs . extractors . SubstringExtractorTest . config ( 0 , 3 ) , "foo" , noConverters ( ) , Extractor . ConditionType . NONE , null ) ; x . runExtractor ( msg ) ; "<AssertPlaceHolder>" ; } getField ( java . lang . String ) { return message . getField ( key ) ; }
org . junit . Assert . assertEquals ( "The<sp>short<sp>message" , msg . getField ( "message" ) )
showSharesExport_notInitialized ( ) { model . setSelectedBillingDataType ( null ) ; boolean result = ctrl . isShowSharesExport ( ) ; "<AssertPlaceHolder>" ; } isShowSharesExport ( ) { if ( ( model . getSelectedBillingDataType ( ) ) == null ) return false ; if ( model . getSelectedBillingDataType ( ) . equals ( BillingDataType . RevenueShare ) ) return true ; else return false ; }
org . junit . Assert . assertFalse ( result )
testAliasPastTop ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . scan ( "DEPT" ) . join ( JoinRelType . LEFT , builder . call ( SqlStdOperatorTable . EQUALS , builder . field ( 2 , "EMP" , "DEPTNO" ) , builder . field ( 2 , "DEPT" , "DEPTNO" ) ) , builder . call ( SqlStdOperatorTable . EQUALS , builder . field ( 2 , "EMP" , "EMPNO" ) , builder . literal ( 123 ) ) ) . build ( ) ; final java . lang . String expected = "" + ( ( "LogicalJoin(condition=[AND(=($7,<sp>$8),<sp>=($0,<sp>123))],<sp>joinType=[left])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" ) + "<sp>LogicalTableScan(table=[[scott,<sp>DEPT]])\n" ) ; "<AssertPlaceHolder>" ; } hasTree ( java . lang . String ) { return org . apache . calcite . test . Matchers . compose ( org . hamcrest . core . Is . is ( value ) , ( input ) -> { return org . apache . calcite . util . Util . toLinux ( org . apache . calcite . plan . RelOptUtil . toString ( input ) ) ; } ) ; }
org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) )
testServletCustomCallerPrincipal ( ) { java . lang . String resp = readFromServer ( "/servlet?useCallerPrincipal" ) ; "<AssertPlaceHolder>" ; } isContainerPrincipalTypeInResponse ( java . lang . String , boolean ) { java . lang . String [ ] principalArray = response . split ( "," ) ; java . lang . String containerPrincipal = principalArray [ 0 ] ; java . lang . String applicationPrincipal = principalArray [ 1 ] ; java . lang . String inputApplicationPrincipal = ( isCallerPrincipalUsed ) ? "org.glassfish.soteria.test.CustomCallerPrincipal" : "org.glassfish.soteria.test.CustomPrincipal" ; boolean isContainerPricipalCorrect = ( ( ( ( ( ( ( containerPrincipal . contains ( "com.sun.enterprise.security.web.integration.WebPrincipal" ) ) || ( containerPrincipal . contains ( "weblogic.security.principal.WLSUserImpl" ) ) ) || ( containerPrincipal . contains ( "com.ibm.ws.security.authentication.principals.WSPrincipal" ) ) ) || ( containerPrincipal . contains ( "org.jboss.security.SimplePrincipal" ) ) ) || ( containerPrincipal . contains ( "org.jboss.security.SimpleGroup" ) ) ) || ( containerPrincipal . contains ( "org.apache.tomee.catalina.TomcatSecurityService$TomcatUser" ) ) ) || ( containerPrincipal . contains ( "javax.security.enterprise.CallerPrincipal" ) ) ) || ( containerPrincipal . contains ( inputApplicationPrincipal ) ) ; boolean isApplicationPrincipalCorrect = applicationPrincipal . contains ( inputApplicationPrincipal ) ; return isContainerPricipalCorrect && isApplicationPrincipalCorrect ; }
org . junit . Assert . assertTrue ( isContainerPrincipalTypeInResponse ( resp , true ) )
testMakeRefSpec2 ( ) { com . sonymobile . tools . gerrit . gerritevents . dto . events . PatchsetCreated event = new com . sonymobile . tools . gerrit . gerritevents . dto . events . PatchsetCreated ( ) ; com . sonymobile . tools . gerrit . gerritevents . dto . attr . Change change = new com . sonymobile . tools . gerrit . gerritevents . dto . attr . Change ( ) ; change . setNumber ( "12" ) ; event . setChange ( change ) ; com . sonymobile . tools . gerrit . gerritevents . dto . attr . PatchSet patch = new com . sonymobile . tools . gerrit . gerritevents . dto . attr . PatchSet ( ) ; patch . setNumber ( "1" ) ; event . setPatchset ( patch ) ; java . lang . String expResult = ( com . sonyericsson . hudson . plugins . gerrit . trigger . utils . StringUtil . REFSPEC_PREFIX ) + "12/12/1" ; java . lang . String result = com . sonyericsson . hudson . plugins . gerrit . trigger . utils . StringUtil . makeRefSpec ( event ) ; "<AssertPlaceHolder>" ; } makeRefSpec ( com . sonymobile . tools . gerrit . gerritevents . dto . events . ChangeBasedEvent ) { if ( ( ( event . getPatchSet ( ) ) != null ) && ( ( event . getPatchSet ( ) . getRef ( ) ) != null ) ) { if ( ( event . getPatchSet ( ) . getRef ( ) . length ( ) ) > 0 ) { return event . getPatchSet ( ) . getRef ( ) ; } } java . lang . StringBuilder str = new java . lang . StringBuilder ( com . sonyericsson . hudson . plugins . gerrit . trigger . utils . StringUtil . REFSPEC_PREFIX ) ; java . lang . String number = event . getChange ( ) . getNumber ( ) ; if ( ( number . length ( ) ) < 2 ) { str . append ( "0" ) . append ( number ) ; } else if ( ( number . length ( ) ) == 2 ) { str . append ( number ) ; } else { str . append ( number . substring ( ( ( number . length ( ) ) - 2 ) ) ) ; } str . append ( "/" ) . append ( number ) ; str . append ( "/" ) . append ( event . getPatchSet ( ) . getNumber ( ) ) ; return str . toString ( ) ; }
org . junit . Assert . assertEquals ( expResult , result )
testCountReplicationsForFileInResGroup ( ) { if ( org . irods . jargon . core . pub . DataObjectAOImplTest . testingPropertiesHelper . isTestEirods ( org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties ) ) { return ; } java . lang . String testFileName = "testCountReplicationsForFileInResGroup.txt" ; java . lang . String testDir = "testCountReplicationsForFileInResGroup" ; java . lang . String absPath = org . irods . jargon . core . pub . DataObjectAOImplTest . scratchFileUtils . createAndReturnAbsoluteScratchPath ( org . irods . jargon . core . pub . DataObjectAOImplTest . IRODS_TEST_SUBDIR_PATH ) ; java . lang . String fileNameOrig = org . irods . jargon . testutils . filemanip . FileGenerator . generateFileOfFixedLengthGivenName ( absPath , testFileName , 2 ) ; java . lang . String targetIrodsCollection = org . irods . jargon . core . pub . DataObjectAOImplTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties , ( ( ( org . irods . jargon . core . pub . DataObjectAOImplTest . IRODS_TEST_SUBDIR_PATH ) + "/" ) + testDir ) ) ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . DataObjectAOImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties ) ; org . irods . jargon . core . pub . IRODSAccessObjectFactory accessObjectFactory = org . irods . jargon . core . pub . DataObjectAOImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) ; if ( accessObjectFactory . getIRODSServerProperties ( irodsAccount ) . isAtLeastIrods410 ( ) ) { return ; } org . irods . jargon . core . pub . io . IRODSFileFactory irodsFileFactory = accessObjectFactory . getIRODSFileFactory ( irodsAccount ) ; org . irods . jargon . core . pub . io . IRODSFile irodsFile = irodsFileFactory . instanceIRODSFile ( targetIrodsCollection ) ; irodsFile . delete ( ) ; irodsFile . mkdirs ( ) ; org . irods . jargon . core . pub . DataTransferOperations dto = accessObjectFactory . getDataTransferOperations ( irodsAccount ) ; dto . putOperation ( fileNameOrig , targetIrodsCollection , org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties . getProperty ( TestingPropertiesHelper . IRODS_RESOURCE_KEY ) , null , null ) ; org . irods . jargon . core . pub . DataObjectAO dataObjectAO = org . irods . jargon . core . pub . DataObjectAOImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) . getDataObjectAO ( irodsAccount ) ; dataObjectAO . replicateIrodsDataObjectToAllResourcesInResourceGroup ( ( ( targetIrodsCollection + "/" ) + testFileName ) , org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties . getProperty ( TestingPropertiesHelper . IRODS_RESOURCE_GROUP_KEY ) ) ; int nbrRepls = dataObjectAO . getTotalNumberOfReplsInResourceGroupForDataObject ( targetIrodsCollection , testFileName , org . irods . jargon . core . pub . DataObjectAOImplTest . testingProperties . getProperty ( TestingPropertiesHelper . IRODS_RESOURCE_GROUP_KEY ) ) ; "<AssertPlaceHolder>" ; } getTotalNumberOfReplsInResourceGroupForDataObject ( java . lang . String , java . lang . String , java . lang . String ) { org . irods . jargon . core . pub . DataObjectAOImpl . log . info ( "getTotalNumberOfReplsInResourceGroupForDataObject()" ) ; if ( ( irodsAbsolutePath == null ) || ( irodsAbsolutePath . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>irodsAbsolutePath" ) ; } if ( ( fileName == null ) || ( fileName . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>fileName" ) ; } if ( ( resourceGroupName == null ) || ( resourceGroupName . isEmpty ( ) ) ) { throw new java . lang . IllegalArgumentException ( "null<sp>or<sp>empty<sp>resourceGroupName" ) ; } java . util . List < org . irods . jargon . core . pub . domain . DataObject > totalres ; totalres = listReplicationsForFileInResGroup ( irodsAbsolutePath , fileName , resourceGroupName ) ; return totalres . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , nbrRepls )
testMultiList_loop ( ) { java . util . List < iot . jcypher . query . result . JcError > errors ; iot . jcypher . domain . IDomainAccess da = iot . jcypher . domain . DomainAccessFactory . createDomainAccess ( test . domainmapping . DomainMappingTest . dbAccess , test . domainmapping . DomainMappingTest . domainName ) ; iot . jcypher . domain . IDomainAccess da1 ; test . domainmapping . maps . MultiDimMapsLists multiDimMapsLists = new test . domainmapping . maps . MultiDimMapsLists ( ) ; test . domainmapping . maps . MultiDimMapsLists multiDimMapsLists_1 ; boolean equals ; java . util . List < java . lang . Object > multiDimList = new java . util . ArrayList < java . lang . Object > ( ) ; java . util . List < java . lang . Object > multiDimList_1 = new java . util . ArrayList < java . lang . Object > ( ) ; multiDimList_1 . add ( multiDimList ) ; multiDimList . add ( multiDimList_1 ) ; multiDimMapsLists . setMultiDimList ( multiDimList ) ; errors = test . domainmapping . DomainMappingTest . dbAccess . clearDatabase ( ) ; if ( ( errors . size ( ) ) > 0 ) { printErrors ( errors ) ; throw new iot . jcypher . query . result . JcResultException ( errors ) ; } errors = da . store ( multiDimMapsLists ) ; if ( ( errors . size ( ) ) > 0 ) { printErrors ( errors ) ; throw new iot . jcypher . query . result . JcResultException ( errors ) ; } iot . jcypher . domain . SyncInfo syncInfo_1 = da . getSyncInfo ( multiDimMapsLists ) ; da1 = iot . jcypher . domain . DomainAccessFactory . createDomainAccess ( test . domainmapping . DomainMappingTest . dbAccess , test . domainmapping . DomainMappingTest . domainName ) ; multiDimMapsLists_1 = da1 . loadById ( test . domainmapping . maps . MultiDimMapsLists . class , ( - 1 ) , syncInfo_1 . getId ( ) ) ; equals = test . domainmapping . util . CompareUtil_3 . equalsMultiDimMapsLists ( multiDimMapsLists , multiDimMapsLists_1 ) ; "<AssertPlaceHolder>" ; return ; } equalsMultiDimMapsLists ( test . domainmapping . maps . MultiDimMapsLists , test . domainmapping . maps . MultiDimMapsLists ) { return test . domainmapping . util . CompareUtil_3 . equalsMultiDimMapsLists ( m_1 , m_2 , new java . util . ArrayList < test . domainmapping . util . AlreadyCompared > ( ) ) ; }
org . junit . Assert . assertTrue ( equals )
testSerializeAndDeserializeEqual ( ) { com . ctrip . soa . caravan . util . serializer . xml . XMLPojo p = new com . ctrip . soa . caravan . util . serializer . xml . XMLPojo ( ) ; p . setName ( makeString ( 1000 ) ) ; p . setId ( 123456789L ) ; java . io . ByteArrayOutputStream bout = new java . io . ByteArrayOutputStream ( ) ; FastInfosetSerializer . INSTANCE . serialize ( bout , p ) ; com . ctrip . soa . caravan . util . serializer . xml . XMLPojo got = FastInfosetSerializer . INSTANCE . deserialize ( new java . io . ByteArrayInputStream ( bout . toByteArray ( ) ) , com . ctrip . soa . caravan . util . serializer . xml . XMLPojo . class ) ; "<AssertPlaceHolder>" ; } deserialize ( byte [ ] , java . lang . Class ) { return _mapperWrapper . readValue ( is , clazz ) ; }
org . junit . Assert . assertEquals ( p , got )
parseNovelItemInfoUpdateInvalid ( ) { org . mewx . wenku8 . global . api . NovelItemInfoUpdate info = org . mewx . wenku8 . global . api . NovelItemInfoUpdate . parse ( "1234" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { try { org . mewx . wenku8 . global . api . NovelItemInfoUpdate niiu = new org . mewx . wenku8 . global . api . NovelItemInfoUpdate ( 0 ) ; org . xmlpull . v1 . XmlPullParserFactory factory = org . xmlpull . v1 . XmlPullParserFactory . newInstance ( ) ; org . xmlpull . v1 . XmlPullParser xmlPullParser = factory . newPullParser ( ) ; xmlPullParser . setInput ( new java . io . StringReader ( xml ) ) ; int eventType = xmlPullParser . getEventType ( ) ; while ( eventType != ( org . xmlpull . v1 . XmlPullParser . END_DOCUMENT ) ) { switch ( eventType ) { case org . xmlpull . v1 . XmlPullParser . START_DOCUMENT : break ; case org . xmlpull . v1 . XmlPullParser . START_TAG : if ( "metadata" . equals ( xmlPullParser . getName ( ) ) ) { niiu . aid = 0 ; niiu . title = "" ; niiu . author = "" ; niiu . status = "" ; niiu . update = "" ; niiu . intro_short = "" ; niiu . latest_chapter = "" ; } else if ( "data" . equals ( xmlPullParser . getName ( ) ) ) { if ( "Title" . equals ( xmlPullParser . getAttributeValue ( 0 ) ) ) { niiu . aid = java . lang . Integer . valueOf ( xmlPullParser . getAttributeValue ( 1 ) ) ; niiu . title = xmlPullParser . nextText ( ) ; } else if ( "Author" . equals ( xmlPullParser . getAttributeValue ( 0 ) ) ) { niiu . author = xmlPullParser . getAttributeValue ( 1 ) ; } else if ( "BookStatus" . equals ( xmlPullParser . getAttributeValue ( 0 ) ) ) { niiu . status = xmlPullParser . getAttributeValue ( 1 ) ; } else if ( "LastUpdate" . equals ( xmlPullParser . getAttributeValue ( 0 ) ) ) { niiu . update = xmlPullParser . getAttributeValue ( 1 ) ; } else if ( "IntroPreview" . equals ( xmlPullParser . getAttributeValue ( 0 ) ) ) { niiu . intro_short = xmlPullParser . nextText ( ) . replaceAll ( "[<sp>|<sp>]" , "<sp>" ) . trim ( ) ; } } break ; } eventType = xmlPullParser . next ( ) ; } return niiu ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; return null ; } }
org . junit . Assert . assertNull ( info )
testResponseHeader ( ) { org . apache . kafka . common . requests . ResponseHeader header = createResponseHeader ( ) ; java . nio . ByteBuffer buffer = toBuffer ( header . toStruct ( ) ) ; org . apache . kafka . common . requests . ResponseHeader deserialized = org . apache . kafka . common . requests . ResponseHeader . parse ( buffer ) ; "<AssertPlaceHolder>" ; } correlationId ( ) { return correlationId ; }
org . junit . Assert . assertEquals ( header . correlationId ( ) , deserialized . correlationId ( ) )
with_marker ( ) { final net . ripe . db . whois . common . Message subject = new net . ripe . db . whois . common . Message ( Messages . Type . ERROR , ( "" + ( ( "%ERROR:100:<sp>internal<sp>software<sp>error\n" + "%\n" ) + "%<sp>Please<sp>contact<sp>ripe-dbm@ripe.net<sp>if<sp>the<sp>problem<sp>persists.\n" ) ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { return text . toString ( ) ; }
org . junit . Assert . assertThat ( subject . toString ( ) , org . hamcrest . Matchers . is ( ( "" + ( ( "%ERROR:100:<sp>internal<sp>software<sp>error\n" + "%\n" ) + "%<sp>Please<sp>contact<sp>ripe-dbm@ripe.net<sp>if<sp>the<sp>problem<sp>persists.\n" ) ) ) )
test02 ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
testGetFeatureInfoRemoteWmsGmlOutputValid ( ) { java . io . InputStream response = doGetFeatureInfo ( "remotewms_dominant_vegetation" , "utah" , "57142.857142857145" , "application/gml+xml;<sp>version=3.1" ) ; java . lang . String [ ] schemaUrls = new java . lang . String [ 2 ] ; schemaUrls [ 0 ] = org . deegree . protocol . wfs . WFSConstants . WFS_110_SCHEMA_URL ; schemaUrls [ 1 ] = org . deegree . services . wmts . WmtsIT . class . getResource ( "dominant_vegetation.xsd" ) . toExternalForm ( ) ; java . util . List < org . deegree . commons . xml . schema . SchemaValidationEvent > errors = org . deegree . commons . xml . schema . SchemaValidator . validate ( response , schemaUrls ) ; "<AssertPlaceHolder>" ; } size ( ) { return fragment . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
testSerialization ( ) { org . jfree . data . KeyToGroupMap m1 = new org . jfree . data . KeyToGroupMap ( "Test" ) ; org . jfree . data . KeyToGroupMap m2 = ( ( org . jfree . data . KeyToGroupMap ) ( org . jfree . chart . TestUtilities . serialised ( m1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( m1 , m2 )
testFromSimpleString ( ) { javax . ws . rs . core . NewCookie c = javax . ws . rs . core . NewCookie . valueOf ( "foo=bar" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertTrue ( ( ( "bar" . equals ( c . getValue ( ) ) ) && ( "foo" . equals ( c . getName ( ) ) ) ) )
somePreconditions ( ) { com . google . common . base . Preconditions . checkNotNull ( lisa . getId ( ) ) ; "<AssertPlaceHolder>" ; com . google . common . base . Preconditions . checkState ( ( ! ( lisa . isSick ( ) ) ) ) ; com . google . common . base . Preconditions . checkArgument ( ( ( lisa . getAddress ( ) ) != null ) , "We<sp>couldn't<sp>find<sp>the<sp>description<sp>for<sp>customer<sp>with<sp>id<sp>%s" , lisa . getId ( ) ) ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( com . google . common . base . Preconditions . checkNotNull ( lisa . getId ( ) ) , java . lang . Integer . valueOf ( 2 ) )
testGetINSET ( ) { java . lang . String actual = table . getINSET ( ) ; java . lang . String expected = "in<sp>set" ; "<AssertPlaceHolder>" ; } getINSET ( ) { return "in<sp>set" ; }
org . junit . Assert . assertEquals ( expected , actual )
testLastSave ( ) { actual . add ( connection . lastSave ( ) ) ; org . springframework . data . redis . connection . List < java . lang . Object > results = getResults ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return delegate . get ( key ) ; }
org . junit . Assert . assertNotNull ( results . get ( 0 ) )
validate_valueIsSet_returnTrue ( ) { sampledValue . setValue ( "something" ) ; boolean isValid = sampledValue . validate ( ) ; "<AssertPlaceHolder>" ; } validate ( ) { return true ; }
org . junit . Assert . assertThat ( isValid , org . hamcrest . CoreMatchers . is ( true ) )
testFreshnessLifetimeIsSMaxAgeEvenIfExpiresIsPresent ( ) { final org . apache . hc . core5 . http . Header [ ] headers = new org . apache . hc . core5 . http . Header [ ] { new org . apache . hc . core5 . http . message . BasicHeader ( "Cache-Control" , "s-maxage=10" ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Date" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( tenSecondsAgo ) ) , new org . apache . hc . core5 . http . message . BasicHeader ( "Expires" , org . apache . hc . client5 . http . utils . DateUtils . formatDate ( sixSecondsAgo ) ) } ; final org . apache . hc . client5 . http . cache . HttpCacheEntry entry = org . apache . hc . client5 . http . impl . cache . HttpTestUtils . makeCacheEntry ( headers ) ; "<AssertPlaceHolder>" ; } getFreshnessLifetimeSecs ( org . apache . hc . client5 . http . cache . HttpCacheEntry ) { final long maxage = getMaxAge ( entry ) ; if ( maxage > ( - 1 ) ) { return maxage ; } final java . util . Date dateValue = entry . getDate ( ) ; if ( dateValue == null ) { return 0L ; } final java . util . Date expiry = org . apache . hc . client5 . http . utils . DateUtils . parseDate ( entry , HeaderConstants . EXPIRES ) ; if ( expiry == null ) { return 0 ; } final long diff = ( expiry . getTime ( ) ) - ( dateValue . getTime ( ) ) ; return diff / 1000 ; }
org . junit . Assert . assertEquals ( 10 , impl . getFreshnessLifetimeSecs ( entry ) )
with1Row8Columns_DrawEntireLine ( ) { "<AssertPlaceHolder>" ; } drawLine ( byte [ ] , int , int , int , int ) { if ( x2 < x1 ) throw new java . lang . IllegalArgumentException ( "end<sp>must<sp>not<sp>be<sp>less<sp>than<sp>start" ) ; int startByte = x1 / 8 ; int endByte = x2 / 8 ; int row = ( width / 8 ) * y ; for ( int i = startByte + 1 ; i <= ( endByte - 1 ) ; i ++ ) { screen [ ( row + i ) ] = ( ( byte ) ( 255 ) ) ; } int startIndex = x1 % 8 ; int endIndex = x2 % 8 ; if ( startByte == endByte ) { set ( screen , ( row + startByte ) , startIndex , endIndex ) ; } else { set ( screen , ( row + startByte ) , startIndex , 7 ) ; set ( screen , ( row + endByte ) , 0 , endIndex ) ; } return screen ; }
org . junit . Assert . assertArrayEquals ( new byte [ ] { ( ( byte ) ( 255 ) ) } , s . drawLine ( new byte [ ] { 0 } , 8 , 0 , 7 , 0 ) )
testSkipBody ( ) { when ( featureService . getFeatureState ( "name" ) ) . thenReturn ( FeatureState . ENABLED ) ; tag . setFeature ( "name" ) ; "<AssertPlaceHolder>" ; } doStartTag ( ) { com . tacitknowledge . flip . FeatureService service = getFeatureService ( ) ; if ( service == null ) { throw new com . tacitknowledge . flip . exceptions . FlipException ( "The<sp>FeatureService<sp>has<sp>not<sp>been<sp>instantiated." ) ; } return ( service . getFeatureState ( feature ) ) == ( myState ) ? javax . servlet . jsp . tagext . Tag . EVAL_BODY_INCLUDE : javax . servlet . jsp . tagext . Tag . SKIP_BODY ; }
org . junit . Assert . assertEquals ( Tag . SKIP_BODY , tag . doStartTag ( ) )
shouldNotBeValidWithAnotherService ( ) { io . gravitee . management . model . api . ApiEntity api = mock ( io . gravitee . management . model . api . ApiEntity . class ) ; io . gravitee . definition . model . services . dynamicproperty . DynamicPropertyService dpSrv = mock ( io . gravitee . definition . model . services . dynamicproperty . DynamicPropertyService . class ) ; when ( dpSrv . isEnabled ( ) ) . thenReturn ( Boolean . TRUE ) ; io . gravitee . definition . model . services . Services services = new io . gravitee . definition . model . services . Services ( ) ; services . set ( java . util . Collections . singletonList ( dpSrv ) ) ; when ( api . getServices ( ) ) . thenReturn ( services ) ; boolean valid = srv . isValid ( api ) ; "<AssertPlaceHolder>" ; } isValid ( io . gravitee . management . model . api . ApiEntity ) { return ( ( api . getViews ( ) ) != null ) && ( ! ( api . getViews ( ) . isEmpty ( ) ) ) ; }
org . junit . Assert . assertFalse ( valid )
testInformLeaderElected ( ) { broadcaster . informLeaderElected ( io . vlingo . wire . node . Id . of ( 3 ) , true , false ) ; "<AssertPlaceHolder>" ; } informLeaderElected ( io . vlingo . wire . node . Id , boolean , boolean ) { }
org . junit . Assert . assertEquals ( 1 , application . informLeaderElected . get ( ) )
shouldCreateRecursiveBindings ( ) { java . lang . ClassLoader loader = this . compile ( org . bindgen . processor . BasicPropertiesTest . path ( "Address" ) , org . bindgen . processor . BasicPropertiesTest . path ( "Person" ) ) ; java . lang . Class < ? > addressClass = loader . loadClass ( org . bindgen . processor . BasicPropertiesTest . name ( "Address" ) ) ; java . lang . Class < ? > addressBindingPathClass = loader . loadClass ( org . bindgen . processor . BasicPropertiesTest . name ( "AddressBindingPath" ) ) ; @ org . bindgen . processor . SuppressWarnings ( "unused" ) java . lang . Class < ? > addressBindingClass = loader . loadClass ( org . bindgen . processor . BasicPropertiesTest . name ( "AddressBinding" ) ) ; java . lang . Class < ? > personClass = loader . loadClass ( org . bindgen . processor . BasicPropertiesTest . name ( "Person" ) ) ; java . lang . Class < ? > personBindingClass = loader . loadClass ( org . bindgen . processor . BasicPropertiesTest . name ( "PersonBinding" ) ) ; java . lang . Object address = addressClass . newInstance ( ) ; addressClass . getField ( "city" ) . set ( address , org . bindgen . processor . BasicPropertiesTest . CITY ) ; java . lang . Object person = personClass . newInstance ( ) ; personClass . getField ( "name" ) . set ( person , org . bindgen . processor . BasicPropertiesTest . NAME ) ; personClass . getField ( "address" ) . set ( person , address ) ; java . lang . Object binding = personBindingClass . getConstructor ( personClass ) . newInstance ( person ) ; java . lang . Object addressBinding = personBindingClass . getMethod ( "address" ) . invoke ( binding ) ; java . lang . Object cityBinding = addressBindingPathClass . getMethod ( "city" ) . invoke ( addressBinding ) ; java . lang . String city = ( ( java . lang . String ) ( org . bindgen . Binding . class . getMethod ( "get" ) . invoke ( cityBinding ) ) ) ; "<AssertPlaceHolder>" ; } name ( java . lang . String ) { return ( org . bindgen . processor . BasicPropertiesTest . PACKAGE ) + className ; }
org . junit . Assert . assertThat ( org . bindgen . processor . BasicPropertiesTest . CITY , org . hamcrest . CoreMatchers . is ( city ) )
testIsInfoEnabled ( ) { expect ( mock . isInfoEnabled ( ) ) . andReturn ( true ) ; replay ( mock ) ; final fr . gouv . vitam . common . logging . VitamLogger logger = fr . gouv . vitam . common . logging . VitamLoggerFactory . getInstance ( "mock" ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } isInfoEnabled ( ) { return false ; }
org . junit . Assert . assertTrue ( logger . isInfoEnabled ( ) )
convertToMatchableEntity ( ) { eu . dnetlib . iis . citationmatching . schemas . BasicMetadata basicMetadata = eu . dnetlib . iis . citationmatching . schemas . BasicMetadata . newBuilder ( ) . setAuthors ( com . google . common . collect . Lists . newArrayList ( "John<sp>Doe" ) ) . setJournal ( "Some<sp>Journal" ) . setTitle ( "Some<sp>Title" ) . setPages ( "55-64" ) . setYear ( "2002" ) . build ( ) ; eu . dnetlib . iis . citationmatching . schemas . ReferenceMetadata referenceMetadata = eu . dnetlib . iis . citationmatching . schemas . ReferenceMetadata . newBuilder ( ) . setPosition ( 5 ) . setBasicMetadata ( basicMetadata ) . setRawText ( "rawText" ) . build ( ) ; pl . edu . icm . coansys . citations . data . MatchableEntity actualMatchableEntity = converter . convertToMatchableEntity ( "cit_someId" , referenceMetadata ) ; pl . edu . icm . coansys . citations . data . MatchableEntity expectedMatchableEntity = pl . edu . icm . coansys . citations . data . MatchableEntity . fromParameters ( "cit_someId" , "John<sp>Doe" , "Some<sp>Journal" , "Some<sp>Title" , "55-64" , "2002" , "rawText" ) ; "<AssertPlaceHolder>" ; } convertToMatchableEntity ( java . lang . String , eu . dnetlib . iis . citationmatching . schemas . DocumentMetadata ) { eu . dnetlib . iis . citationmatching . schemas . BasicMetadata metadata = docMetadata . getBasicMetadata ( ) ; pl . edu . icm . coansys . citations . data . MatchableEntity entity = pl . edu . icm . coansys . citations . data . MatchableEntity . fromParameters ( documentId , eu . dnetlib . iis . wf . citationmatching . converter . BasicMetadataDataExtractionUtil . extractAuthors ( metadata ) , eu . dnetlib . iis . wf . citationmatching . converter . BasicMetadataDataExtractionUtil . extractJournal ( metadata ) , eu . dnetlib . iis . wf . citationmatching . converter . BasicMetadataDataExtractionUtil . extractTitle ( metadata ) , eu . dnetlib . iis . wf . citationmatching . converter . BasicMetadataDataExtractionUtil . extractPages ( metadata ) , eu . dnetlib . iis . wf . citationmatching . converter . BasicMetadataDataExtractionUtil . extractYear ( metadata ) , null ) ; return entity ; }
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( actualMatchableEntity . data ( ) . toByteArray ( ) , expectedMatchableEntity . data ( ) . toByteArray ( ) ) )
testCreateAdmissionMedicationHistorySectionBuilder ( ) { org . openhealthtools . mdht . uml . cda . builder . SectionBuilder < org . openhealthtools . mdht . uml . cda . hitsp . AdmissionMedicationHistorySection > sectionBuilder = org . openhealthtools . mdht . uml . cda . hitsp . builder . HITSPBuilderFactory . createAdmissionMedicationHistorySectionBuilder ( ) ; org . openhealthtools . mdht . uml . cda . hitsp . AdmissionMedicationHistorySection section = sectionBuilder . buildSection ( ) ; "<AssertPlaceHolder>" ; Diagnostician . INSTANCE . validate ( section ) ; org . openhealthtools . mdht . uml . cda . util . CDAUtil . saveSnippet ( section , System . out ) ; } buildSection ( ) { org . openhealthtools . mdht . uml . cda . Section section = CDAFactory . eINSTANCE . createSection ( ) ; construct ( section ) ; return section ; }
org . junit . Assert . assertNotNull ( section )
testPostConstructCalled ( ) { "<AssertPlaceHolder>" ; } isPostConstructCalled ( ) { return org . jboss . as . test . integration . jsf . managedbean . managedproperty . SimpleJsfManagedBean . postConstructCalled ; }
org . junit . Assert . assertTrue ( org . jboss . as . test . integration . jsf . managedbean . managedproperty . SimpleJsfManagedBean . isPostConstructCalled ( ) )
processService_createRevenueDetailService ( ) { org . oscm . reportingservice . business . PartnerRevenueBuilder builder = spy ( new org . oscm . reportingservice . business . PartnerRevenueBuilder ( java . util . Locale . ENGLISH , null ) ) ; doReturn ( "1" ) . when ( builder ) . readServiceRevenue ( anyString ( ) , anyString ( ) , anyString ( ) ) ; doReturn ( "423" ) . when ( builder ) . getServiceKey ( any ( org . w3c . dom . Node . class ) ) ; doAnswer ( new org . mockito . stubbing . Answer < java . lang . Object > ( ) { @ org . oscm . reportingservice . business . Override public java . lang . Object answer ( org . mockito . invocation . InvocationOnMock invocation ) { return null ; } } ) . when ( builder ) . createRevenueDetailService ( anyInt ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) ; java . util . List < org . oscm . reportingservice . business . model . partnerrevenue . RDORevenueDetailService > result = new java . util . LinkedList < org . oscm . reportingservice . business . model . partnerrevenue . RDORevenueDetailService > ( ) ; org . w3c . dom . Node dummyService = null ; builder . processService ( result , 0 , dummyService , "dummy" , "dummy" ) ; "<AssertPlaceHolder>" ; verify ( builder , times ( 1 ) ) . createRevenueDetailService ( anyInt ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , result . size ( ) )
onCheckListener ( ) { android . widget . CheckBox checkbox = new android . widget . CheckBox ( new android . app . Activity ( ) ) ; checkbox . setId ( android . R . id . button1 ) ; com . github . kevinsawicki . wishlist . ViewFinder finder = new com . github . kevinsawicki . wishlist . ViewFinder ( checkbox ) ; final java . util . concurrent . atomic . AtomicBoolean run = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; finder . onCheck ( android . R . id . button1 , new android . widget . CompoundButton . OnCheckedChangeListener ( ) { public void onCheckedChanged ( android . widget . CompoundButton buttonView , boolean isChecked ) { run . set ( true ) ; } } ) ; checkbox . performClick ( ) ; "<AssertPlaceHolder>" ; } onCheckedChanged ( android . widget . CompoundButton , boolean ) { run . set ( true ) ; }
org . junit . Assert . assertTrue ( run . get ( ) )
testGetPlanningTime ( ) { final com . dremio . service . job . proto . ResourceSchedulingInfo schedulingInfo = new com . dremio . service . job . proto . ResourceSchedulingInfo ( ) . setResourceSchedulingStart ( ( ( java . lang . System . currentTimeMillis ( ) ) - ( TimeUnit . HOURS . toMillis ( 3 ) ) ) ) . setResourceSchedulingEnd ( 0L ) ; final com . dremio . service . job . proto . JobInfo info = new com . dremio . service . job . proto . JobInfo ( ) . setResourceSchedulingInfo ( schedulingInfo ) ; final com . dremio . service . job . proto . JobAttempt attempt = new com . dremio . service . job . proto . JobAttempt ( ) . setInfo ( info ) . setState ( JobState . ENQUEUED ) . setDetails ( new com . dremio . service . job . proto . JobDetails ( ) ) ; "<AssertPlaceHolder>" ; } getPlanningTime ( com . dremio . service . job . proto . JobAttempt ) { long planningScheduling = java . util . Optional . ofNullable ( jobAttempt . getDetails ( ) . getTimeSpentInPlanning ( ) ) . orElse ( 0L ) ; final long enqueuedTime = com . dremio . service . jobs . AttemptsHelper . getEnqueuedTime ( jobAttempt ) ; planningScheduling = java . lang . Math . max ( planningScheduling , enqueuedTime ) ; return planningScheduling - enqueuedTime ; }
org . junit . Assert . assertEquals ( 0L , com . dremio . service . jobs . AttemptsHelper . getPlanningTime ( attempt ) )
testMaakentityConvertorIndicatieOnderCuratele ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEADER_INDICATIE_ONDER_CURATELE , indicatieOnderCuratele . toString ( ) ) ; converter . maakEntity ( ctx ) ; nl . bzk . migratiebrp . synchronisatie . dal . domein . brp . kern . entity . StapelVoorkomen stapelVoorkomen = ctx . getStapel ( java . lang . Integer . parseInt ( volgnummer ) ) . getStapelvoorkomens ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getIndicatieOnderCuratele ( ) { return indicatieOnderCuratele ; }
org . junit . Assert . assertFalse ( stapelVoorkomen . getIndicatieOnderCuratele ( ) )
testFitsUndefinedHdu ( ) { nom . tam . fits . Fits fits1 = makeAsciiTable ( ) ; fits1 . read ( ) ; byte [ ] undefinedData = new byte [ 1000 ] ; for ( int index = 0 ; index < ( undefinedData . length ) ; index ++ ) { undefinedData [ index ] = ( ( byte ) ( index ) ) ; } fits1 . addHDU ( nom . tam . fits . Fits . makeHDU ( new nom . tam . fits . UndefinedData ( undefinedData ) ) ) ; nom . tam . util . BufferedDataOutputStream os = new nom . tam . util . BufferedDataOutputStream ( new java . io . FileOutputStream ( "target/UndefindedHDU.fits" ) ) ; fits1 . write ( os ) ; os . close ( ) ; nom . tam . fits . Fits fits2 = new nom . tam . fits . Fits ( "target/UndefindedHDU.fits" ) ; nom . tam . fits . BasicHDU < ? > [ ] hdus = fits2 . read ( ) ; byte [ ] rereadUndefinedData = ( ( byte [ ] ) ( ( ( nom . tam . fits . UndefinedData ) ( hdus [ ( ( hdus . length ) - 1 ) ] . getData ( ) ) ) . getData ( ) ) ) ; "<AssertPlaceHolder>" ; } getData ( ) { throw new java . lang . IllegalStateException ( ) ; }
org . junit . Assert . assertArrayEquals ( undefinedData , rereadUndefinedData )
testGetRemoteBlobs ( ) { org . talend . components . azurestorage . blob . tazurestorageget . TAzureStorageGetProperties props = new org . talend . components . azurestorage . blob . tazurestorageget . TAzureStorageGetProperties ( "test" ) ; props . setupProperties ( ) ; java . util . List < java . lang . String > prefixes = java . util . Arrays . asList ( "test1" , "test2" ) ; java . util . List < java . lang . Boolean > includes = java . util . Arrays . asList ( true , false ) ; props . remoteBlobs . prefix . setValue ( prefixes ) ; props . remoteBlobs . include . setValue ( includes ) ; source . initialize ( null , props ) ; "<AssertPlaceHolder>" ; } getRemoteBlobs ( ) { java . util . List < org . talend . components . azurestorage . blob . helpers . RemoteBlob > remoteBlobs = new java . util . ArrayList < org . talend . components . azurestorage . blob . helpers . RemoteBlob > ( ) ; if ( ! ( ( this . properties ) instanceof org . talend . components . azurestorage . blob . AzureStorageBlobProperties ) ) return null ; org . talend . components . azurestorage . blob . AzureStorageBlobProperties p = ( ( org . talend . components . azurestorage . blob . AzureStorageBlobProperties ) ( properties ) ) ; org . talend . daikon . properties . ValidationResult vr = p . remoteBlobs . getValidationResult ( ) ; if ( vr . getStatus ( ) . equals ( Result . ERROR ) ) { throw new java . lang . IllegalArgumentException ( vr . getMessage ( ) ) ; } for ( int idx = 0 ; idx < ( p . remoteBlobs . prefix . getValue ( ) . size ( ) ) ; idx ++ ) { java . lang . String prefix = ( ( p . remoteBlobs . prefix . getValue ( ) . get ( idx ) ) != null ) ? p . remoteBlobs . prefix . getValue ( ) . get ( idx ) : "" ; java . lang . Boolean include = ( ( p . remoteBlobs . include . getValue ( ) . get ( idx ) ) != null ) ? p . remoteBlobs . include . getValue ( ) . get ( idx ) : false ; remoteBlobs . add ( new org . talend . components . azurestorage . blob . helpers . RemoteBlob ( prefix , include ) ) ; } return remoteBlobs ; }
org . junit . Assert . assertNotNull ( source . getRemoteBlobs ( ) )
deveGerarNSU ( ) { final com . fincatto . documentofiscal . cte . classes . distribuicao . CTDistribuicaoConsultaNSU retorno = new com . fincatto . documentofiscal . cte . classes . distribuicao . CTDistribuicaoConsultaNSU ( ) ; retorno . setNsu ( "000000000000001" ) ; "<AssertPlaceHolder>" ; } getNsu ( ) { return this . nsu ; }
org . junit . Assert . assertEquals ( "000000000000001" , retorno . getNsu ( ) )
elementsSetByNativeCodeShouldBeReloaded ( ) { final java . lang . String MAGIC = "test" ; java . lang . String [ ] strings = new java . lang . String [ 1 ] ; jnr . ffi . Pointer ptr = jnr . ffi . Memory . allocateDirect ( jnr . ffi . StringArrayTest . runtime , 1024 ) ; ptr . putString ( 0 , MAGIC , 1024 , java . nio . charset . Charset . defaultCharset ( ) ) ; jnr . ffi . StringArrayTest . testlib . ptr_set_array_element ( strings , 0 , ptr ) ; "<AssertPlaceHolder>" ; } putString ( long , java . lang . String , int , java . nio . charset . Charset ) { java . nio . ByteBuffer buf = cs . encode ( string ) ; int len = java . lang . Math . min ( maxLength , buf . remaining ( ) ) ; jnr . ffi . provider . jffi . DirectMemoryIO . IO . putZeroTerminatedByteArray ( ( ( address ( ) ) + offset ) , buf . array ( ) , ( ( buf . arrayOffset ( ) ) + ( buf . position ( ) ) ) , len ) ; }
org . junit . Assert . assertEquals ( MAGIC , strings [ 0 ] )
testDynamicDataRead ( ) { java . io . Reader input = new java . io . FileReader ( getTestData ( "metadata.json" ) ) ; try { com . puppetlabs . geppetto . forge . model . Metadata md = getGson ( ) . fromJson ( input , com . puppetlabs . geppetto . forge . model . Metadata . class ) ; java . util . Map < java . lang . String , java . lang . Object > dynAttrs = md . getDynamicAttributes ( ) ; "<AssertPlaceHolder>" ; validateMetadataExtraMap ( dynAttrs . get ( "extra_map" ) ) ; } finally { input . close ( ) ; } } getDynamicAttributes ( ) { return ( dynamicAttributes ) == null ? java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) : java . util . Collections . unmodifiableMap ( dynamicAttributes ) ; }
org . junit . Assert . assertNotNull ( dynAttrs )
shouldFindNextCharacterAfterCloseSquareBracket ( ) { int position = edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . indexOfWord ( "xx]x" , 1 ) ; "<AssertPlaceHolder>" ; } indexOfWord ( java . lang . String , int ) { checkNotNull ( entityName , "Input<sp>string<sp>must<sp>not<sp>be<sp>null" ) ; int length = entityName . length ( ) ; checkElementIndex ( startIndex , length ) ; for ( int index = startIndex ; index < length ; index ++ ) { if ( edu . stanford . bmir . protege . web . shared . entity . EntityNameUtils . isWordStart ( entityName , index ) ) { return index ; } } return - 1 ; }
org . junit . Assert . assertEquals ( 3 , position )
shouldRegisterAndRetrieveComplexTypeHandler ( ) { org . apache . ibatis . type . TypeHandler < java . util . List < java . net . URI > > fakeHandler = new org . apache . ibatis . type . TypeHandler < java . util . List < java . net . URI > > ( ) { @ org . apache . ibatis . type . Override public void setParameter ( java . sql . PreparedStatement ps , int i , java . util . List < java . net . URI > parameter , org . apache . ibatis . type . JdbcType jdbcType ) throws java . sql . SQLException { } @ org . apache . ibatis . type . Override public java . util . List < java . net . URI > getResult ( java . sql . CallableStatement cs , int columnIndex ) throws java . sql . SQLException { return null ; } @ org . apache . ibatis . type . Override public java . util . List < java . net . URI > getResult ( java . sql . ResultSet rs , int columnIndex ) throws java . sql . SQLException { return null ; } @ org . apache . ibatis . type . Override public java . util . List < java . net . URI > getResult ( java . sql . ResultSet rs , java . lang . String columnName ) throws java . sql . SQLException { return null ; } } ; org . apache . ibatis . type . TypeReference < java . util . List < java . net . URI > > type = new org . apache . ibatis . type . TypeReference < java . util . List < java . net . URI > > ( ) { } ; typeHandlerRegistry . register ( type , fakeHandler ) ; "<AssertPlaceHolder>" ; } getTypeHandler ( org . apache . ibatis . type . JdbcType ) { return JDBC_TYPE_HANDLER_MAP . get ( jdbcType ) ; }
org . junit . Assert . assertSame ( fakeHandler , typeHandlerRegistry . getTypeHandler ( type ) )
test_FailureTest ( ) { org . openscience . cdk . group . PermutationGroup group = getCubeGroup ( ) ; org . openscience . cdk . group . Permutation p = new org . openscience . cdk . group . Permutation ( 1 , 2 , 3 , 4 , 0 , 6 , 7 , 5 ) ; int position = group . test ( p ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return size ; }
org . junit . Assert . assertTrue ( ( position < ( group . getSize ( ) ) ) )
notNull ( ) { org . ebayopensource . fido . uaf . msg . RegistrationRequest regReq = new org . ebayopensource . fido . uaf . ops . RegistrationRequestGeneration ( ) . createRegistrationRequest ( "Username" , new org . ebayopensource . fido . uaf . ops . RegistrationRequestGenerationTest . NotaryImpl ( ) ) ; "<AssertPlaceHolder>" ; logger . info ( gson . toJson ( regReq ) ) ; } createRegistrationRequest ( java . lang . String , org . ebayopensource . fido . uaf . crypto . Notary ) { java . lang . String challenge = generateChallenge ( ) ; java . lang . String serverDataString = generateServerData ( username , challenge , notary ) ; return createRegistrationRequest ( username , serverDataString , challenge ) ; }
org . junit . Assert . assertNotNull ( regReq )
consumedValueIsAcceptedOnSameThread ( ) { java . lang . String outerThread = java . lang . Thread . currentThread ( ) . getName ( ) ; com . spotify . flo . AwaitValue < java . lang . String > val = new com . spotify . flo . AwaitValue ( ) ; context . immediateValue ( "hello" ) . consume ( val ) ; "<AssertPlaceHolder>" ; } acceptingThreadName ( ) { return acceptingThreadName ; }
org . junit . Assert . assertThat ( val . acceptingThreadName ( ) , org . hamcrest . Matchers . is ( outerThread ) )
testFetchInvitesPageOfRecords ( ) { com . datastax . driver . core . PagingState pagingState = null ; pagingState = fetchAndAssert ( 1 , 30 , 30 , pagingState ) ; pagingState = fetchAndAssert ( 2 , 30 , 30 , pagingState ) ; pagingState = fetchAndAssert ( 3 , 30 , 30 , pagingState ) ; pagingState = fetchAndAssert ( 4 , 30 , 10 , pagingState ) ; "<AssertPlaceHolder>" ; } fetchAndAssert ( int , int , int , com . datastax . driver . core . PagingState ) { net . oneandone . troilus . Dao dao = new net . oneandone . troilus . DaoImpl ( net . oneandone . troilus . api . PaginationTest . cassandra . getSession ( ) , net . oneandone . troilus . api . PaginationTest . TABLE_NAME ) ; net . oneandone . troilus . ListReadWithUnit < net . oneandone . troilus . ResultList < net . oneandone . troilus . Record > , net . oneandone . troilus . Record > listReadUnit = dao . readSequenceWithKey ( "group_id" , "group_1" ) ; net . oneandone . troilus . ListRead < net . oneandone . troilus . ResultList < net . oneandone . troilus . Record > , net . oneandone . troilus . Record > listRead = listReadUnit . all ( ) . withFetchSize ( pageSize ) . withPagingState ( pagingState ) ; net . oneandone . troilus . ResultList < net . oneandone . troilus . Record > resultList = listRead . execute ( ) ; java . util . Iterator < net . oneandone . troilus . Record > i = resultList . iterator ( ) ; int numRecords = assertSortOrder ( i ) ; org . junit . Assert . assertEquals ( ( "Size<sp>should<sp>be<sp>" + expectedSize ) , expectedSize , numRecords ) ; return resultList . getExecutionInfo ( ) . getPagingState ( ) ; }
org . junit . Assert . assertNull ( pagingState )
testFormatParser_simple_1 ( ) { final com . ericsson . otp . erlang . OtpErlangObject value = org . erlide . util . erlang . OtpErlang . format ( "~a" , "hej" ) ; final com . ericsson . otp . erlang . OtpErlangObject expected = org . erlide . util . erlang . OtpErlang . parse ( "hej" ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return org . erlide . util . erlang . OtpErlang . TERM_PARSER . parse ( string ) ; }
org . junit . Assert . assertEquals ( expected , value )
testGetSizeOfEmptyIntermediatePCollection_MRPipeline ( ) { org . apache . crunch . PCollection < java . lang . String > emptyIntermediate = createPesistentEmptyIntermediate ( new org . apache . crunch . impl . mr . MRPipeline ( this . getClass ( ) ) ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return collect . size ( ) ; }
org . junit . Assert . assertThat ( emptyIntermediate . getSize ( ) , org . hamcrest . Matchers . is ( 0L ) )
take_A$int_Nil ( ) { com . m3 . scalaflavor4j . Seq < java . lang . Integer > seq = com . m3 . scalaflavor4j . IndexedSeq . apply ( ) ; int n = 3 ; com . m3 . scalaflavor4j . Seq < java . lang . Integer > actual = seq . take ( n ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertThat ( actual . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) )
deveObterLogradouroComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco retornoConsultaCadastroEndereco = new com . fincatto . documentofiscal . nfe400 . classes . cadastro . NFRetornoConsultaCadastroEndereco ( ) ; retornoConsultaCadastroEndereco . setLogradouro ( "Av<sp>José<sp>Bonifácio" ) ; "<AssertPlaceHolder>" ; } getLogradouro ( ) { return this . logradouro ; }
org . junit . Assert . assertEquals ( "Av<sp>José<sp>Bonifácio" , retornoConsultaCadastroEndereco . getLogradouro ( ) )
testBuild ( ) { org . bff . javampd . server . MPD mpd = mpdBuilder . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { org . bff . javampd . server . MPD mpd = new org . bff . javampd . server . MPD ( this ) ; injector . getInstance ( org . bff . javampd . monitor . ConnectionMonitor . class ) . setServer ( mpd ) ; return mpd ; }
org . junit . Assert . assertNotNull ( mpd )
test_return_char ( ) { for ( short c = 0 ; c < 255 ; c ++ ) { char result = server . return_char ( c ) ; "<AssertPlaceHolder>" ; } } return_char ( short ) { return ( ( char ) ( unicode_number ) ) ; }
org . junit . Assert . assertEquals ( ( ( char ) ( c ) ) , result )
testValueOfWithNull ( ) { "<AssertPlaceHolder>" ; } valueOf ( org . apache . geode . cache . EvictionAction ) { for ( org . springframework . data . gemfire . eviction . EvictionActionType evictionActionType : org . springframework . data . gemfire . eviction . EvictionActionType . values ( ) ) { if ( evictionActionType . getEvictionAction ( ) . equals ( evictionAction ) ) { return evictionActionType ; } } return null ; }
org . junit . Assert . assertNull ( org . springframework . data . gemfire . eviction . EvictionActionType . valueOf ( ( ( org . apache . geode . cache . EvictionAction ) ( null ) ) ) )
testCompare ( ) { com . arjuna . ats . internal . jts . orbspecific . TransactionFactoryImple factory = new com . arjuna . ats . internal . jts . orbspecific . TransactionFactoryImple ( "test" ) ; com . arjuna . ats . internal . jts . orbspecific . ControlImple tx = factory . createLocal ( 1000 ) ; org . omg . CosTransactions . Control proxy = factory . getTransaction ( com . arjuna . ats . jts . utils . Utility . uidToOtid ( tx . get_uid ( ) ) ) ; "<AssertPlaceHolder>" ; try { tx . getImplHandle ( ) . rollback ( ) ; } catch ( final java . lang . Throwable ex ) { } } getUid ( org . omg . CosTransactions . Control ) { try { com . arjuna . ArjunaOTS . UidCoordinator coord = com . arjuna . ats . internal . jts . utils . Helper . getUidCoordinator ( cont ) ; if ( coord == null ) throw new org . omg . CORBA . BAD_PARAM ( ) ; else return com . arjuna . ats . internal . jts . utils . Helper . getUid ( coord ) ; } catch ( org . omg . CORBA . BAD_PARAM ex ) { return com . arjuna . ats . arjuna . common . Uid . nullUid ( ) ; } }
org . junit . Assert . assertTrue ( com . arjuna . ats . jts . utils . Utility . getUid ( proxy ) . equals ( tx . get_uid ( ) ) )
changePassword ( ) { java . lang . String newPassword = com . google . common . hash . Hashing . sha256 ( ) . hashString ( "321321" , StandardCharsets . UTF_8 ) . toString ( ) ; java . util . Map < java . lang . String , java . lang . String > passwords = new java . util . HashMap ( ) ; passwords . put ( "password" , io . robe . admin . resources . AuthenticationResourceTest . PASSWORD ) ; passwords . put ( "newPassword" , newPassword ) ; passwords . put ( "newPasswordRepeat" , newPassword ) ; io . robe . test . request . TestRequest request = requestBuilder . endpoint ( "password" ) . entity ( passwords ) . header ( tokenHeaderName , io . robe . admin . resources . AuthenticationResourceTest . TOKEN ) . build ( ) ; io . robe . test . request . TestResponse response = client . post ( request ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
testGetScriptFromDefaultMapping ( ) { org . richfaces . javascript . LibraryFunction script = getScript ( null , javax . validation . constraints . Max . class ) ; "<AssertPlaceHolder>" ; } getScript ( javax . faces . component . behavior . ClientBehaviorContext , javax . faces . component . behavior . ClientBehavior ) { javax . faces . context . FacesContext facesContext = behaviorContext . getFacesContext ( ) ; org . richfaces . component . behavior . ComponentControlBehavior controlBehavior = ( ( org . richfaces . component . behavior . ComponentControlBehavior ) ( behavior ) ) ; java . lang . String apiFunctionName = controlBehavior . getOperation ( ) ; java . lang . String targetSourceString = controlBehavior . getTarget ( ) ; java . lang . String selector = controlBehavior . getSelector ( ) ; if ( ( isEmpty ( apiFunctionName ) ) || ( ( isEmpty ( targetSourceString ) ) && ( isEmpty ( selector ) ) ) ) { throw new java . lang . IllegalArgumentException ( "One<sp>of<sp>the<sp>necessary<sp>attributes<sp>is<sp>null<sp>or<sp>empty.<sp>Check<sp>operation<sp>attribute<sp>and<sp>selector<sp>or<sp>target<sp>attributes." ) ; } org . ajax4jsf . javascript . JSFunctionDefinition callback = new org . ajax4jsf . javascript . JSFunctionDefinition ( ) ; callback . addParameter ( new org . ajax4jsf . javascript . JSReference ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_EVENT ) ) ; callback . addParameter ( new org . ajax4jsf . javascript . JSReference ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_COMPONENT ) ) ; java . lang . StringBuffer script = new java . lang . StringBuffer ( ) ; script . append ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_COMPONENT ) . append ( "['" ) . append ( apiFunctionName ) . append ( "']." ) . append ( "apply" ) . append ( "(" ) ; java . util . List < java . lang . Object > apiFunctionParams = createSignature ( controlBehavior ) ; script . append ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_COMPONENT ) . append ( "," ) . append ( org . ajax4jsf . javascript . ScriptUtils . toScript ( apiFunctionParams . toArray ( ) ) ) . append ( ");" ) ; callback . addToBody ( script ) ; java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . PARAM_CALLBACK , callback ) ; parameters . put ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . PARAM_TARGET , resolveTargets ( facesContext , targetSourceString ) ) ; parameters . put ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . PARAM_SELECTOR , selector ) ; java . lang . String onBeforeOperation = controlBehavior . getOnbeforeoperation ( ) ; if ( ( null != onBeforeOperation ) && ( ! ( onBeforeOperation . isEmpty ( ) ) ) ) { org . ajax4jsf . javascript . JSFunctionDefinition onBeforeOperationFunction = new org . ajax4jsf . javascript . JSFunctionDefinition ( new org . ajax4jsf . javascript . JSReference ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_EVENT ) ) ; onBeforeOperationFunction . addToBody ( onBeforeOperation ) ; parameters . put ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . PARAM_ONBEFOREOPERATION , onBeforeOperationFunction ) ; } org . ajax4jsf . javascript . JSFunction eventFunction = new org . ajax4jsf . javascript . JSFunction ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . FUNC_NAME ) ; eventFunction . addParameter ( new org . ajax4jsf . javascript . JSReference ( org . richfaces . renderkit . ComponentControlBehaviorRenderer . REF_EVENT ) ) ; eventFunction . addParameter ( parameters ) ; java . lang . StringBuffer execution = new java . lang . StringBuffer ( ) ; execution . append ( eventFunction . toScript ( ) ) ; execution . append ( ";<sp>return<sp>false;" ) ; return execution . toString ( ) ; }
org . junit . Assert . assertSame ( function , script )
testRecordTask ( ) { profileReport . recordTask ( ) ; "<AssertPlaceHolder>" ; } hasRecordedTasks ( ) { return recordedTasks ; }
org . junit . Assert . assertThat ( profileReport . hasRecordedTasks ( ) , org . hamcrest . Matchers . equalTo ( true ) )
testToEntityWithNullParamClass ( ) { java . lang . String str = null ; org . apache . griffin . core . job . entity . JobHealth jobHealth = org . apache . griffin . core . util . JsonUtil . toEntity ( str , org . apache . griffin . core . job . entity . JobHealth . class ) ; "<AssertPlaceHolder>" ; } toEntity ( java . lang . String , java . lang . Class ) { if ( org . apache . commons . lang . StringUtils . isEmpty ( jsonStr ) ) { org . apache . griffin . core . util . JsonUtil . LOGGER . warn ( "Json<sp>string<sp>{}<sp>is<sp>empty!" , type ) ; return null ; } com . fasterxml . jackson . databind . ObjectMapper mapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; mapper . configure ( com . fasterxml . jackson . databind . DeserializationFeature . FAIL_ON_UNKNOWN_PROPERTIES , false ) ; return mapper . readValue ( jsonStr , type ) ; }
org . junit . Assert . assertNull ( jobHealth )
testOpenOpenDescending ( ) { org . apache . commons . functor . range . LongRange range = org . apache . commons . functor . range . Ranges . longRange ( 5L , BoundType . OPEN , ( - 5L ) , BoundType . OPEN , ( - 3L ) ) ; java . util . List < java . lang . Long > expected = java . util . Arrays . asList ( 2L , ( - 1L ) , ( - 4L ) ) ; java . util . Collection < java . lang . Long > elements = org . apache . commons . functor . generator . loop . IteratorToGeneratorAdapter . adapt ( range ) . toCollection ( ) ; "<AssertPlaceHolder>" ; } toCollection ( ) { return new org . apache . commons . functor . generator . util . CollectionTransformer < E , java . util . Collection < E > > ( new java . util . ArrayList < E > ( ) ) ; }
org . junit . Assert . assertEquals ( expected , elements )
testReflect21 ( ) { com . ibm . wala . ipa . callgraph . AnalysisScope scope = com . ibm . wala . core . tests . callGraph . ReflectionTest . findOrCreateAnalysisScope ( ) ; com . ibm . wala . ipa . cha . IClassHierarchy cha = com . ibm . wala . core . tests . callGraph . ReflectionTest . findOrCreateCHA ( scope ) ; java . lang . Iterable < com . ibm . wala . ipa . callgraph . Entrypoint > entrypoints = com . ibm . wala . ipa . callgraph . impl . Util . makeMainEntrypoints ( scope , cha , TestConstants . REFLECT21_MAIN ) ; com . ibm . wala . ipa . callgraph . AnalysisOptions options = com . ibm . wala . core . tests . callGraph . CallGraphTestUtil . makeAnalysisOptions ( scope , entrypoints ) ; com . ibm . wala . ipa . callgraph . CallGraph cg = com . ibm . wala . core . tests . callGraph . CallGraphTestUtil . buildZeroOneCFA ( options , new com . ibm . wala . ipa . callgraph . AnalysisCacheImpl ( ) , cha , scope , false ) ; com . ibm . wala . types . TypeReference tr = com . ibm . wala . types . TypeReference . findOrCreate ( ClassLoaderReference . Application , "Lreflection/Helper" ) ; com . ibm . wala . types . MethodReference mr = com . ibm . wala . types . MethodReference . findOrCreate ( tr , "<init>" , "(Ljava/lang/Object;Ljava/lang/Object;)V" ) ; java . util . Set < com . ibm . wala . ipa . callgraph . CGNode > nodes = cg . getNodes ( mr ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( top ) == ( - 1 ) ; }
org . junit . Assert . assertFalse ( nodes . isEmpty ( ) )
testGetGroupMembersEntryFaultyJsonResponse ( ) { super . setResponseResource ( new org . springframework . core . io . ByteArrayResource ( "not-even-valid-json" . getBytes ( ) ) ) ; nl . surfnet . coin . api . client . domain . GroupMembersEntry groupMembersEntry = groupService . getGroupMembersEntry ( provider , "personId" , "whatever" , 0 , 0 ) ; "<AssertPlaceHolder>" ; } getEntry ( ) { return entry ; }
org . junit . Assert . assertTrue ( groupMembersEntry . getEntry ( ) . isEmpty ( ) )
lookUpEndpoint ( ) { names . clear ( ) ; names . add ( org . talend . esb . locator . service . LocatorSoapServiceTest . ENDPOINTURL ) ; expect ( sl . lookup ( org . talend . esb . locator . service . LocatorSoapServiceTest . SERVICE_NAME ) ) . andStubReturn ( names ) ; expect ( sl . getEndpoint ( org . talend . esb . locator . service . LocatorSoapServiceTest . SERVICE_NAME , org . talend . esb . locator . service . LocatorSoapServiceTest . ENDPOINTURL ) ) . andStubReturn ( endpoint ) ; expect ( endpoint . getProperties ( ) ) . andStubReturn ( SLPropertiesImpl . EMPTY_PROPERTIES ) ; replayAll ( ) ; javax . xml . ws . wsaddressing . W3CEndpointReference endpointRef ; javax . xml . ws . wsaddressing . W3CEndpointReference expectedRef ; javax . xml . ws . wsaddressing . W3CEndpointReferenceBuilder builder = new javax . xml . ws . wsaddressing . W3CEndpointReferenceBuilder ( ) ; builder . address ( org . talend . esb . locator . service . LocatorSoapServiceTest . ENDPOINTURL ) ; expectedRef = builder . build ( ) ; endpointRef = lps . lookupEndpoint ( org . talend . esb . locator . service . LocatorSoapServiceTest . SERVICE_NAME , null ) ; "<AssertPlaceHolder>" ; } toString ( ) { if ( ( ( ( ( variant ) == null ) || ( variant . isEmpty ( ) ) ) || ( ( destinationName ) == null ) ) || ( destinationName . isEmpty ( ) ) ) { return "jms://" ; } final java . lang . StringBuilder buf = new java . lang . StringBuilder ( "jms:" ) ; buf . append ( variant ) . append ( ':' ) . append ( encode ( destinationName ) ) ; if ( ! ( parameters . isEmpty ( ) ) ) { buf . append ( '?' ) ; boolean addDelimiter = false ; for ( java . util . Map . Entry < java . lang . String , java . lang . String > param : parameters . entrySet ( ) ) { if ( addDelimiter ) { buf . append ( '&' ) ; } else { addDelimiter = true ; } buf . append ( encode ( param . getKey ( ) ) ) ; final java . lang . String value = param . getValue ( ) ; if ( ( value != null ) && ( ( value . length ( ) ) > 0 ) ) { buf . append ( '=' ) . append ( encode ( value ) ) ; } } } return buf . toString ( ) ; }
org . junit . Assert . assertTrue ( endpointRef . toString ( ) . equals ( expectedRef . toString ( ) ) )
exceptionsDoNotBlockAllListeners ( ) { wallet . addEventListener ( new com . google . bitcoin . core . AbstractWalletEventListener ( ) { @ com . google . bitcoin . core . Override public void onCoinsReceived ( com . google . bitcoin . core . Wallet wallet , com . google . bitcoin . core . Transaction tx , java . math . BigInteger prevBalance , java . math . BigInteger newBalance ) { com . google . bitcoin . core . WalletTest . log . info ( "onCoinsReceived<sp>1" ) ; throw new java . lang . RuntimeException ( "barf" ) ; } } ) ; final java . util . concurrent . atomic . AtomicInteger flag = new java . util . concurrent . atomic . AtomicInteger ( ) ; wallet . addEventListener ( new com . google . bitcoin . core . AbstractWalletEventListener ( ) { @ com . google . bitcoin . core . Override public void onCoinsReceived ( com . google . bitcoin . core . Wallet wallet , com . google . bitcoin . core . Transaction tx , java . math . BigInteger prevBalance , java . math . BigInteger newBalance ) { com . google . bitcoin . core . WalletTest . log . info ( "onCoinsReceived<sp>2" ) ; flag . incrementAndGet ( ) ; } } ) ; sendMoneyToWallet ( com . google . bitcoin . core . Utils . Utils . toNanoCoins ( 1 , 0 ) , AbstractBlockChain . NewBlockType . BEST_CHAIN ) ; com . google . bitcoin . core . WalletTest . log . info ( "Wait<sp>for<sp>user<sp>thread" ) ; com . google . bitcoin . utils . Threading . waitForUserCode ( ) ; com . google . bitcoin . core . WalletTest . log . info ( "...<sp>and<sp>test<sp>flag." ) ; "<AssertPlaceHolder>" ; } onCoinsReceived ( org . multibit . controller . bitcoin . Wallet , org . multibit . controller . bitcoin . Transaction , java . math . BigInteger , java . math . BigInteger ) { for ( org . multibit . viewsystem . ViewSystem viewSystem : super . getViewSystem ( ) ) { viewSystem . onCoinsReceived ( wallet , transaction , prevBalance , newBalance ) ; } }
org . junit . Assert . assertEquals ( 1 , flag . get ( ) )
testDeleteImage ( ) { com . myjeeva . digitalocean . pojo . Delete result = apiClient . deleteImage ( 3897539 ) ; "<AssertPlaceHolder>" ; log . info ( ( "Delete<sp>Request<sp>result:<sp>" + result ) ) ; } deleteImage ( java . lang . Integer ) { checkNullAndThrowError ( imageId , "Missing<sp>required<sp>parameter<sp>-<sp>imageId." ) ; java . lang . Object [ ] params = new java . lang . Object [ ] { imageId } ; return ( ( com . myjeeva . digitalocean . pojo . Delete ) ( perform ( new com . myjeeva . digitalocean . impl . ApiRequest ( com . myjeeva . digitalocean . common . ApiAction . DELETE_IMAGE , params ) ) . getData ( ) ) ) ; }
org . junit . Assert . assertNotNull ( result )
testVehiclePositionsNoVlr ( ) { org . onebusaway . transit_data . model . ListBean < org . onebusaway . transit_data . model . VehicleStatusBean > vehicles = org . onebusaway . nyc . gtfsrt . tests . UnitTestSupport . listBean ( org . onebusaway . nyc . gtfsrt . tests . VehiclePositionServiceImplTest . vsb ( "0" ) , org . onebusaway . nyc . gtfsrt . tests . VehiclePositionServiceImplTest . vsb ( "1" ) , org . onebusaway . nyc . gtfsrt . tests . VehiclePositionServiceImplTest . vsb ( "2" ) ) ; when ( tds . getAllVehiclesForAgency ( "agency" , 0 ) ) . thenReturn ( vehicles ) ; when ( tds . getVehicleLocationRecordForVehicleId ( anyString ( ) , anyLong ( ) ) ) . thenReturn ( null ) ; java . util . List < org . onebusaway . nyc . gtfsrt . tests . FeedEntity . Builder > entities = service . getEntities ( 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { return _cache . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , entities . size ( ) )
testFromCluster ( ) { java . util . List < org . apache . hadoop . yarn . api . records . ReservationDefinition > list = new java . util . ArrayList < org . apache . hadoop . yarn . api . records . ReservationDefinition > ( ) ; list . add ( createReservationDefinition ( 1425716392178L , 1425722262791L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 7 , 1 , 587000 ) } , ReservationRequestInterpreter . R_ALL , "u1" ) ) ; list . add ( createReservationDefinition ( 1425716406178L , 1425721255841L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 6 , 1 , 485000 ) } , ReservationRequestInterpreter . R_ALL , "u2" ) ) ; list . add ( createReservationDefinition ( 1425716399178L , 1425723780138L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 6 , 1 , 738000 ) } , ReservationRequestInterpreter . R_ALL , "u3" ) ) ; list . add ( createReservationDefinition ( 1425716437178L , 1425722968378L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 7 , 1 , 653000 ) } , ReservationRequestInterpreter . R_ALL , "u4" ) ) ; list . add ( createReservationDefinition ( 1425716406178L , 1425721926090L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 6 , 1 , 552000 ) } , ReservationRequestInterpreter . R_ALL , "Agent-based<sp>allocation<sp>failed" 0 ) ) ; list . add ( createReservationDefinition ( 1425716379178L , 1425722238553L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 6 , 1 , 586000 ) } , ReservationRequestInterpreter . R_ALL , "u6" ) ) ; list . add ( createReservationDefinition ( 1425716407178L , 1425722908317L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 7 , 1 , 650000 ) } , ReservationRequestInterpreter . R_ALL , "u7" ) ) ; list . add ( createReservationDefinition ( 1425716452178L , 1425722841562L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 6 , 1 , 639000 ) } , ReservationRequestInterpreter . R_ALL , "u8" ) ) ; list . add ( createReservationDefinition ( 1425716384178L , 1425721766129L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 7 , 1 , 538000 ) } , ReservationRequestInterpreter . R_ALL , "u9" ) ) ; list . add ( createReservationDefinition ( 1425716437178L , 1425722507886L , new org . apache . hadoop . yarn . api . records . ReservationRequest [ ] { org . apache . hadoop . yarn . api . records . ReservationRequest . newInstance ( org . apache . hadoop . yarn . api . records . Resource . newInstance ( 1024 , 1 ) , 5 , 1 , 607000 ) } , ReservationRequestInterpreter . R_ALL , "u10" ) ) ; int i = 1 ; for ( org . apache . hadoop . yarn . api . records . ReservationDefinition rr : list ) { org . apache . hadoop . yarn . api . records . ReservationId reservationID = org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemTestUtil . getNewReservationId ( ) ; agent . createReservation ( reservationID , ( "Agent-based<sp>allocation<sp>failed" 1 + ( java . lang . Integer . toString ( i ) ) ) , plan , rr ) ; ++ i ; } "<AssertPlaceHolder>" ; } getAllReservations ( ) { readLock . lock ( ) ; try { if ( ( currentReservations ) != null ) { java . util . Set < org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationAllocation > flattenedReservations = new java . util . TreeSet < org
org . junit . Assert . assertTrue ( "Agent-based<sp>allocation<sp>failed" , ( ( plan . getAllReservations ( ) . size ( ) ) == ( list . size ( ) ) ) )
testSerialization ( ) { org . jfree . chart . StandardChartTheme t1 = new org . jfree . chart . StandardChartTheme ( "Name" ) ; org . jfree . chart . StandardChartTheme t2 = ( ( org . jfree . chart . StandardChartTheme ) ( org . jfree . chart . TestUtilities . serialised ( t1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . jfree . data . general . TestIntervalCategoryDataset ) ) { return false ; } org . jfree . data . general . TestIntervalCategoryDataset that = ( ( org . jfree . data . general . TestIntervalCategoryDataset ) ( obj ) ) ; if ( ! ( getRowKeys ( ) . equals ( that . getRowKeys ( ) ) ) ) { return false ; } if ( ! ( getColumnKeys ( ) . equals ( that . getColumnKeys ( ) ) ) ) { return false ; } int rowCount = getRowCount ( ) ; int colCount = getColumnCount ( ) ; for ( int r = 0 ; r < rowCount ; r ++ ) { for ( int c = 0 ; c < colCount ; c ++ ) { java . lang . Number v1 = getValue ( r , c ) ; java . lang . Number v2 = that . getValue ( r , c ) ; if ( v1 == null ) { if ( v2 != null ) { return false ; } } else if ( ! ( v1 . equals ( v2 ) ) ) { return false ; } } } return true ; }
org . junit . Assert . assertTrue ( t1 . equals ( t2 ) )
testGetWriteOperations ( ) { "<AssertPlaceHolder>" ; } getWriteOperation ( ) { return writeOperation ; }
org . junit . Assert . assertEquals ( writeOperation , writer . getWriteOperation ( ) )
testCallbackIsInvokedWhenRelevantFileIsDiscovered ( ) { final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; final java . io . File [ ] fileAccessor = new java . io . File [ 1 ] ; final java . io . File tempWriteReplayFolder = new java . io . File ( directories . getRemainder ( ) , "TempWriteReplayP99" ) ; final java . io . File target = new java . io . File ( tempWriteReplayFolder , BattleLobbyWatcher . REPLAY_SERVER_BATTLELOBBY ) ; tempWatcher . setCallback ( ( file ) -> { fileAccessor [ 0 ] = file ; latch . countDown ( ) ; } ) ; if ( ! ( ( tempWriteReplayFolder . mkdirs ( ) ) && ( target . createNewFile ( ) ) ) ) { org . junit . Assert . fail ( ( ( "Could<sp>not<sp>create<sp>file<sp>to<sp>drop<sp>target<sp>" + target ) + "<sp>in" ) ) ; } long stopAt = ( java . lang . System . currentTimeMillis ( ) ) + 50000 ; while ( ( latch . getCount ( ) ) != 0 ) { if ( ( java . lang . System . currentTimeMillis ( ) ) > stopAt ) { org . junit . Assert . fail ( "Latch<sp>was<sp>not<sp>tripped" ) ; } java . lang . Thread . sleep ( 1000 ) ; } final java . lang . String expected = target . getName ( ) ; final java . lang . String actual = fileAccessor [ 0 ] . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetAllPlugins ( ) { com . t1t . apim . rest . KongPluginConfigList confList = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . getAllPlugins ( ) ; long initSize = confList . getTotal ( ) ; print ( confList ) ; com . t1t . apim . rest . KongApi apie = createDummyApi ( "apiexx" , "/apiexx" , com . t1t . apim . rest . KongClientIntegrationTest . API_URL ) ; com . t1t . apim . rest . KongConsumer consumer = createDummyConsumer ( "123456xx" , "apicuserexx" ) ; apie = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . addApi ( apie ) ; consumer = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . createConsumer ( consumer ) ; com . t1t . apim . rest . KongPluginConfig pluginConfig = createTestPlugin ( consumer ) ; pluginConfig = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . createPluginConfig ( apie . getId ( ) , pluginConfig ) ; print ( pluginConfig ) ; confList = com . t1t . apim . rest . KongClientIntegrationTest . kongClient . getAllPlugins ( ) ; long sizeAfter = confList . getTotal ( ) ; com . t1t . apim . rest . KongClientIntegrationTest . log . info ( "size<sp>before:{}" , initSize ) ; com . t1t . apim . rest . KongClientIntegrationTest . log . info ( "size<sp>after:{}" , sizeAfter ) ; com . t1t . apim . rest . KongClientIntegrationTest . kongClient . deleteApi ( apie . getId ( ) ) ; com . t1t . apim . rest . KongClientIntegrationTest . kongClient . deleteConsumer ( consumer . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertTrue ( ( sizeAfter == ( initSize + 1 ) ) )
testNoNullValuesEmptyParameterNull ( ) { com . twelvemonkeys . lang . Map < ? , ? > map = com . twelvemonkeys . lang . Collections . emptyMap ( ) ; "<AssertPlaceHolder>" ; } noNullValues ( java . util . Map , java . lang . String ) { com . twelvemonkeys . lang . Validate . notNull ( pParameter , pParamName ) ; for ( V value : pParameter . values ( ) ) { if ( value == null ) { throw new java . lang . IllegalArgumentException ( java . lang . String . format ( "%s<sp>may<sp>not<sp>contain<sp>null<sp>values" , ( pParamName == null ? com . twelvemonkeys . lang . Validate . UNSPECIFIED_PARAM_NAME : pParamName ) ) ) ; } } return pParameter ; }
org . junit . Assert . assertSame ( map , com . twelvemonkeys . lang . Validate . noNullValues ( map , null ) )
testMultiTokenDeletionDuringLoop2 ( ) { java . lang . String grammar = "grammar<sp>T;\n" + "a<sp>:<sp>'a'<sp>('b'|'z'{;})*<sp>'c'<sp>;" ; java . lang . String found = execParser ( "T.g4" , grammar , "TParser" , "TLexer" , "a" , "abaaababc" , false ) ; java . lang . String expecting = "line<sp>1:2<sp>extraneous<sp>input<sp>\'a\'<sp>expecting<sp>{\'b\',<sp>\'z\',<sp>\'c\'}\n" + "line<sp>1:6<sp>extraneous<sp>input<sp>\'a\'<sp>expecting<sp>{\'b\',<sp>\'z\',<sp>\'c\'}\n" ; java . lang . String result = stderrDuringParse ; "<AssertPlaceHolder>" ; } execParser ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , boolean ) { return execParser ( grammarFileName , grammarStr , parserName , lexerName , startRuleName , input , debug , false ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testGetAllDatasetMetadataByName ( ) { org . deegree . services . metadata . provider . DefaultOWSMetadataProvider metadataProvider = createProvider ( ) ; java . util . List < org . deegree . commons . ows . metadata . DatasetMetadata > datasetMetadata = metadataProvider . getAllDatasetMetadata ( new javax . xml . namespace . QName ( "name1" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return fragment . size ( ) ; }
org . junit . Assert . assertThat ( datasetMetadata . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
testEmptyCombinedHostsFileReader ( ) { java . io . FileWriter hosts = new java . io . FileWriter ( newFile ) ; hosts . write ( "" ) ; hosts . close ( ) ; org . apache . hadoop . hdfs . protocol . DatanodeAdminProperties [ ] all = org . apache . hadoop . hdfs . util . CombinedHostsFileReader . readFile ( newFile . getAbsolutePath ( ) ) ; "<AssertPlaceHolder>" ; } getAbsolutePath ( ) { final java . lang . String path = getValue ( ) ; return path == null ? null : "/" + path ; }
org . junit . Assert . assertEquals ( 0 , all . length )
testReturnsAbsentIfNoUri ( ) { com . google . common . base . Optional < org . atlasapi . media . entity . Topic > resolved = eventsUtil . createOrResolveVenue ( null ) ; org . mockito . Mockito . verifyZeroInteractions ( topicStore ) ; "<AssertPlaceHolder>" ; } createOrResolveVenue ( org . atlasapi . remotesite . opta . events . sports . model . SportsMatchData ) { java . lang . String location = getVenueData ( match . stats ( ) ) ; com . google . common . base . Optional < org . atlasapi . media . entity . Topic > value = utility . createOrResolveVenue ( location ) ; if ( ! ( value . isPresent ( ) ) ) { log . error ( "Unable<sp>to<sp>resolve<sp>location:<sp>{}" , location ) ; } return value ; }
org . junit . Assert . assertFalse ( resolved . isPresent ( ) )
testCreateConsumerWithFilter ( ) { clientSession . createQueue ( queueName , queueName , false ) ; org . apache . activemq . artemis . api . core . client . ClientConsumer consumer = clientSession . createConsumer ( queueName , "foo=bar" ) ; "<AssertPlaceHolder>" ; } createConsumer ( javax . jms . Destination , java . lang . String ) { lock ( ) ; try { javax . jms . Session session = getSessionInternal ( ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( ( ( "createConsumer<sp>" + session ) + "<sp>dest=" ) + destination ) + "<sp>messageSelector=" ) + messageSelector ) ) ; } javax . jms . MessageConsumer result = session . createConsumer ( destination , messageSelector ) ; result = new org . apache . activemq . artemis . ra . ActiveMQRAMessageConsumer ( result , this ) ; if ( ActiveMQRALogger . LOGGER . isTraceEnabled ( ) ) { ActiveMQRALogger . LOGGER . trace ( ( ( ( "createdConsumer<sp>" + session ) + "<sp>consumer=" ) + result ) ) ; } addConsumer ( result ) ; return result ; } finally { unlock ( ) ; } }
org . junit . Assert . assertNotNull ( consumer )
longConstructorSetsMean ( ) { com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile value = new com . rackspacecloud . blueflood . types . BluefloodTimerRollup . Percentile ( 123L ) ; "<AssertPlaceHolder>" ; } getMean ( ) { return mean ; }
org . junit . Assert . assertEquals ( 123L , value . getMean ( ) )
testOnInPacketAddedPreErr ( ) { org . o3project . odenos . core . component . network . packet . InPacketAdded msg = new org . o3project . odenos . core . component . network . packet . InPacketAdded ( ) ; org . o3project . odenos . core . component . ConversionTable conversionTable = org . powermock . api . mockito . PowerMockito . spy ( new org . o3project . odenos . core . component . ConversionTable ( ) ) ; org . powermock . api . mockito . PowerMockito . doReturn ( "aggregated" ) . when ( conversionTable , "getConnectionType" , org . o3project . odenos . component . aggregator . AggregatorTest . ORIGINAL_NW_ID ) ; org . powermock . api . mockito . PowerMockito . doReturn ( conversionTable ) . when ( target , "conversionTable" ) ; "<AssertPlaceHolder>" ; } onInPacketAddedPre ( java . lang . String , org . o3project . odenos . core . component . network . packet . InPacketAdded ) { org . o3project . odenos . component . linklayerizer . LinkLayerizer . log . debug ( "" ) ; org . o3project . odenos . core . component . NetworkInterface upperNwIf = networkInterfaces ( ) . get ( networkId ) ; org . o3project . odenos . core . component . NetworkInterface layerizedNwIf = getNetworkIf ( org . o3project . odenos . component . linklayerizer . LinkLayerizer . LAYERIZED_NETWORK ) ; if ( ( upperNwIf == null ) || ( layerizedNwIf == null ) ) { return false ; } org . o3project . odenos . core . component . network . packet . InPacket inPacket = getInPacket ( upperNwIf , msg . getId ( ) ) ; if ( inPacket == null ) { return false ; } java . lang . String nodeId = inPacket . getNodeId ( ) ; java . lang . String portId = inPacket . getPortId ( ) ; java . util . Map < java . lang . String , org . o3project . odenos . core . component . network . topology . Link > layLinks = layerizedNwIf . getLinks ( ) ; for ( java . lang . String linkId : layLinks . keySet ( ) ) { org . o3project . odenos . core . component . network . topology . Link link = layLinks . get ( linkId ) ; if ( ( link . getSrcNode ( ) . equals ( nodeId ) ) && ( link . getSrcPort ( ) . equals ( portId ) ) ) { return false ; } if ( ( link . getDstNode ( ) . equals ( nodeId ) ) && ( link . getDstPort ( ) . equals ( portId ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertThat ( target . onInPacketAddedPre ( org . o3project . odenos . component . aggregator . AggregatorTest . ORIGINAL_NW_ID , msg ) , org . hamcrest . CoreMatchers . is ( false ) )