input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testValidAndEmptyIdModifiesRoot ( ) { try { testGroup . addMembers ( getTestUser ( ) . getID ( ) , "" ) ; } catch ( javax . jcr . nodetype . ConstraintViolationException e ) { } "<AssertPlaceHolder>" ; } hasPendingChanges ( ) { return base . hasPendingChanges ( ) ; }
org . junit . Assert . assertFalse ( root . hasPendingChanges ( ) )
testRemoveCStringReducesBuffer ( ) { buffer = org . smpp . util . ByteBufferTest . bufferOf ( org . smpp . util . ByteBufferTest . A , org . smpp . util . ByteBufferTest . B , org . smpp . util . ByteBufferTest . NULL , org . smpp . util . ByteBufferTest . C , org . smpp . util . ByteBufferTest . NULL ) ; buffer . removeCString ( ) ; "<AssertPlaceHolder>" ; } length ( ) { if ( ( buffer ) == null ) { return 0 ; } else { return buffer . length ; } }
org . junit . Assert . assertEquals ( 2 , buffer . length ( ) )
testAppendFilename ( ) { com . nextdoor . bender . aws . TestContext context = new com . nextdoor . bender . aws . TestContext ( ) ; context . setAwsRequestId ( "req_id" ) ; com . nextdoor . bender . handler . s3 . S3InternalEvent ievent = new com . nextdoor . bender . handler . s3 . S3InternalEvent ( "foo" , new com . nextdoor . bender . LambdaContext ( context ) , 0 , "file" , "bucket" , "v1" ) ; ievent . setEventObj ( null ) ; java . util . Map < java . lang . String , java . lang . String > expected = new java . util . HashMap < java . lang . String , java . lang . String > ( 1 ) ; expected . put ( S3InternalEvent . FILENAME_PARTITION , org . apache . commons . codec . digest . DigestUtils . sha1Hex ( "file" ) ) ; "<AssertPlaceHolder>" ; } getPartitions ( ) { java . util . LinkedHashMap < java . lang . String , java . lang . String > partitions = super . getPartitions ( ) ; if ( partitions == null ) { partitions = new java . util . LinkedHashMap < java . lang . String , java . lang . String > ( 1 ) ; super . setPartitions ( partitions ) ; } partitions . put ( com . nextdoor . bender . handler . dynamodb . DynamodbInternalEvent . DYNAMODB_KEYS , this . stringKeys ) ; return partitions ; }
org . junit . Assert . assertEquals ( expected , ievent . getPartitions ( ) )
testHelpCommand ( ) { int rc = run ( "help" , "test" ) ; verify ( console ) . info ( "\nUsage:<sp>{}<sp>[general<sp>options]<sp>{}<sp>{}<sp>[command<sp>options]" , new java . lang . Object [ ] { Main . DEFAULT_PROGRAM_NAME , "test" , "<test<sp>dataset<sp>names>" } ) ; verify ( console ) . info ( contains ( "Description" ) ) ; verify ( console ) . info ( anyString ( ) , contains ( "Test<sp>description" ) ) ; verify ( console ) . info ( contains ( "Command<sp>options" ) ) ; verify ( console ) . info ( contains ( "Examples" ) ) ; verify ( console ) . info ( anyString ( ) , contains ( "#<sp>this<sp>is<sp>a<sp>comment" ) ) ; verify ( console ) . info ( anyString ( ) , eq ( new java . lang . Object [ ] { Main . DEFAULT_PROGRAM_NAME , "test" , "test<sp>dataset-name" } ) ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { return new org . kitesdk . data . spi . predicates . TestRegisteredPredicateToFromString . Contains < java . lang . String > ( contained ) ; }
org . junit . Assert . assertEquals ( 0 , rc )
testMapDouble ( ) { java . util . Map < java . lang . String , java . lang . Object > aMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > exMap = new java . util . HashMap < java . lang . String , com . amazonaws . services . dynamodbv2 . model . AttributeValue > ( ) ; org . apache . hadoop . hive . serde2 . lazy . LazyDouble ld1 = new org . apache . hadoop . hive . serde2 . lazy . LazyDouble ( LAZY_DOUBLE_OBJECT_INSPECTOR ) ; org . apache . hadoop . hive . dynamodb . HiveDynamoDBTypeUtilTest . initLazyObject ( ld1 , "1.0" . getBytes ( ) , 0 , "1.0" . length ( ) ) ; aMap . put ( "A" , ld1 ) ; exMap . put ( "A" , new com . amazonaws . services . dynamodbv2 . model . AttributeValue ( ) . withN ( "1.0" ) ) ; org . apache . hadoop . hive . serde2 . lazy . LazyDouble ld2 = new org . apache . hadoop . hive . serde2 . lazy . LazyDouble ( LAZY_DOUBLE_OBJECT_INSPECTOR ) ; org . apache . hadoop . hive . dynamodb . HiveDynamoDBTypeUtilTest . initLazyObject ( ld2 , "2" . getBytes ( ) , 0 , "2" . length ( ) ) ; aMap . put ( "B" , ld2 ) ; exMap . put ( "B" , new com . amazonaws . services . dynamodbv2 . model . AttributeValue ( ) . withN ( "2.0" ) ) ; com . amazonaws . services . dynamodbv2 . model . AttributeValue expected = new com . amazonaws . services . dynamodbv2 . model . AttributeValue ( ) . withM ( exMap ) ; com . amazonaws . services . dynamodbv2 . model . AttributeValue actual = org . apache . hadoop . hive . dynamodb . type . HiveDynamoDBTypeUtil . parseObject ( aMap ) ; "<AssertPlaceHolder>" ; } parseObject ( java . lang . Object ) { if ( ( o instanceof java . lang . String ) || ( o instanceof org . apache . hadoop . io . Text ) ) { return new com . amazonaws . services . dynamodbv2 . model . AttributeValue ( ) . withS ( o . toString ( ) ) ; } else if ( o instanceof org . apache . hadoop . hive . serde2 . lazy . LazyDouble ) { return new com . amazonaws . services . dynamodbv2 . model . AttributeValue ( ) . withN ( o . toString ( ) ) ; } else if ( o instanceof java . util . Map ) { return org . apache . hadoop . hive . dynamodb . type . HiveDynamoDBTypeUtil . parseMap ( o ) ; } else { throw new java . lang . RuntimeException ( ( "Unsupported<sp>type:<sp>" + ( o . getClass ( ) . getName ( ) ) ) ) ; } }
org . junit . Assert . assertEquals ( expected , actual )
calculateEmptyList ( ) { cucumber . runtime . formatter . UsageFormatter . AverageUsageStatisticStrategy averageUsageStatisticStrategy = new cucumber . runtime . formatter . UsageFormatter . AverageUsageStatisticStrategy ( ) ; java . lang . Long result = averageUsageStatisticStrategy . calculate ( java . util . Collections . < java . lang . Long > emptyList ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( result , java . lang . Long . valueOf ( 0 ) )
testIsLastSubscription_ZeroSubscriptions ( ) { runTX ( new java . util . concurrent . Callable < org . oscm . domobjects . TechnicalProduct > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . TechnicalProduct call ( ) throws org . oscm . domobjects . Exception { supplier = org . oscm . test . data . Organizations . createOrganization ( mgr , OrganizationRoleType . TECHNOLOGY_PROVIDER , OrganizationRoleType . SUPPLIER ) ; org . oscm . domobjects . TechnicalProduct tProd = org . oscm . test . data . TechnicalProducts . createTechnicalProduct ( mgr , supplier , "service" , false , ServiceAccessType . LOGIN ) ; tProd . setAllowingOnBehalfActing ( true ) ; return tProd ; } } ) ; runTX ( new java . util . concurrent . Callable < java . lang . Void > ( ) { @ org . oscm . domobjects . Override public org . oscm . domobjects . Void call ( ) throws org . oscm . domobjects . Exception { javax . persistence . Query query = mgr . createNamedQuery ( "Subscription.hasSubscriptionsBasedOnOnBehalfServicesForTp" ) ; query . setParameter ( "tpOrgKey" , java . lang . Long . valueOf ( supplier . getKey ( ) ) ) ; java . lang . Object result = query . getSingleResult ( ) ; "<AssertPlaceHolder>" ; return null ; } } ) ; } getSingleResult ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 0 ) , result )
defaultVersionInRefTest ( ) { com . redhat . lightblue . metadata . EntityMetadata md = getMd ( "composite/A_def.json" ) ; com . redhat . lightblue . metadata . CompositeMetadata a = com . redhat . lightblue . metadata . CompositeMetadata . buildCompositeMetadata ( md , new com . redhat . lightblue . metadata . CompositeMetadataTest . SimpleGMD ( ) ) ; com . redhat . lightblue . metadata . ResolvedReferenceField ref = ( ( com . redhat . lightblue . metadata . ResolvedReferenceField ) ( a . resolve ( new com . redhat . lightblue . util . Path ( "obj1.c" ) ) ) ) ; "<AssertPlaceHolder>" ; } resolve ( com . redhat . lightblue . util . Path ) { com . redhat . lightblue . metadata . FieldTreeNode fieldNode = ( ( ref ) == null ) ? root . resolve ( field ) : ref . getElement ( ) . resolve ( field ) ; if ( fieldNode == null ) { throw com . redhat . lightblue . util . Error . get ( AssocConstants . ERR_CANNOT_FIND_FIELD , field . toString ( ) ) ; } return fieldNode ; }
org . junit . Assert . assertNotNull ( ref )
testGetStageCreatesStage ( ) { try { final java . lang . reflect . Field field = net . sf . latexdraw . instrument . ExceptionsManager . class . getDeclaredField ( "stageEx" ) ; field . setAccessible ( true ) ; field . set ( manager , null ) ; } catch ( java . lang . IllegalAccessException | java . lang . NoSuchFieldException ex ) { org . junit . Assert . fail ( ex . getMessage ( ) ) ; } javafx . application . Platform . runLater ( ( ) -> manager . getStageEx ( ) ) ; org . testfx . util . WaitForAsyncUtils . waitForFxEvents ( ) ; "<AssertPlaceHolder>" ; } getStageEx ( ) { if ( ( stageEx ) == null ) { try { final javafx . scene . Parent root = javafx . fxml . FXMLLoader . load ( getClass ( ) . getResource ( "/fxml/Badaboom.fxml" ) , lang , injector . getInstance ( javafx . util . BuilderFactory . class ) , ( cl ) -> injector . getInstance ( cl ) ) ; final javafx . scene . Scene scene = new javafx . scene . Scene ( root ) ; stageEx = new javafx . stage . Stage ( javafx . stage . StageStyle . UTILITY ) ; stageEx . setScene ( scene ) ; stageEx . centerOnScreen ( ) ; } catch ( final java . io . IOException ex ) { BadaboomCollector . INSTANCE . add ( ex ) ; } } return stageEx ; }
org . junit . Assert . assertNotNull ( manager . getStageEx ( ) )
testGetHttpReasonPhrase ( ) { javax . ws . rs . core . MediaType contentType = new javax . ws . rs . core . MediaType ( ) ; byte [ ] content = new byte [ ] { 48 , 49 } ; com . intel . mtwilson . ApiResponse response = new com . intel . mtwilson . ApiResponse ( 404 , "Not<sp>Found" , contentType , content ) ; com . intel . mtwilson . ApiException apiexception = new com . intel . mtwilson . ApiException ( response , "error!" ) ; "<AssertPlaceHolder>" ; } getHttpReasonPhrase ( ) { if ( ( response ) != null ) { return response . httpReasonPhrase ; } else { return null ; } }
org . junit . Assert . assertEquals ( "Not<sp>Found" , apiexception . getHttpReasonPhrase ( ) )
testDescribeRegions ( ) { try { com . fit2cloud . aliyun . Response response = client . describeRegions ( ) ; System . out . println ( ( "testdDescribeRegions<sp>::<sp>" + ( new com . google . gson . Gson ( ) . toJson ( response ) ) ) ) ; "<AssertPlaceHolder>" ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( e . getMessage ( ) ) ; } } describeRegions ( ) { return gson . fromJson ( request . execute ( "DescribeRegions" , null ) , com . fit2cloud . aliyun . rds . model . response . DescribeRegionsResponse . class ) ; }
org . junit . Assert . assertTrue ( true )
testToArray ( ) { java . lang . Integer [ ] collect = java . util . stream . Stream . of ( 1 , 2 , 3 ) . collect ( io . datakernel . util . CollectorsEx . toArray ( io . datakernel . util . Integer . class ) ) ; "<AssertPlaceHolder>" ; } toArray ( java . lang . Class ) { return java . util . stream . Collector . of ( ArrayList :: new , List :: add , ( left , right ) -> { left . addAll ( right ) ; return left ; } , ( a ) -> a . toArray ( ( ( io . datakernel . util . T [ ] ) ( java . lang . reflect . Array . newInstance ( type , a . size ( ) ) ) ) ) ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 } , collect )
testExitThrowsException ( ) { brown . tracingplane . baggageprotocol . BaggageReader reader = makeBaggage ( ) ; "<AssertPlaceHolder>" ; exception . expect ( brown . tracingplane . baggageprotocol . BaggageLayerException . BaggageLayerRuntimeException . class ) ; reader . exit ( ) ; } hasData ( ) { return ( ( nextAtom ) != null ) && ( nextAtomPrefix . isData ( ) ) ; }
org . junit . Assert . assertTrue ( reader . hasData ( ) )
testGetAllBooksLike ( ) { java . util . List < org . integrallis . bookstore . domain . Book > books = bookDAO . findByPropertyLike ( org . integrallis . bookstore . dao . BookDAO . TITLE , "Beginning" ) ; for ( java . util . Iterator < org . integrallis . bookstore . domain . Book > iterator = books . iterator ( ) ; iterator . hasNext ( ) ; ) { org . integrallis . bookstore . domain . Book book = ( ( org . integrallis . bookstore . domain . Book ) ( iterator . next ( ) ) ) ; org . integrallis . bookstore . dao . BookDAOTest . logger . info ( ( "retrieved<sp>Book<sp>" + book ) ) ; "<AssertPlaceHolder>" ; } } getTitle ( ) { return title ; }
org . junit . Assert . assertTrue ( book . getTitle ( ) . contains ( "Beginning" ) )
testRepackAfterTextSizeDetermination ( ) { grid . setHeaderVisible ( true ) ; column . setText ( "foo" ) ; column . pack ( ) ; int packedWidth = column . getWidth ( ) ; markTemporaryResize ( true ) ; grid . setSize ( 1000 , 1000 ) ; column . setText ( "foo<sp>bar" ) ; markTemporaryResize ( false ) ; grid . setSize ( 100 , 100 ) ; int repackedWidth = column . getWidth ( ) ; "<AssertPlaceHolder>" ; } getWidth ( ) { checkWidget ( ) ; return width ; }
org . junit . Assert . assertTrue ( ( repackedWidth > packedWidth ) )
testSequentialMismatchUnequivalent ( ) { final org . openbel . framework . common . model . Namespace hgnc = new org . openbel . framework . common . model . Namespace ( "HGNC" , "http://resource.belframework.org/belframework/1.0/namespace/hgnc-approved-symbols.belns" ) ; final org . openbel . framework . common . model . Namespace egid = new org . openbel . framework . common . model . Namespace ( "EGID" , "http://resource.belframework.org/belframework/1.0/namespace/entrez-gene-ids-hmr.belns" ) ; for ( final org . openbel . framework . common . enums . FunctionEnum f : values ( ) ) { if ( f . isSequential ( ) ) { org . openbel . framework . core . equivalence . EquivalentParameter param1 = new org . openbel . framework . core . equivalence . EquivalentParameter ( hgnc , "AKT1" , org . openbel . framework . common . protonetwork . model . SkinnyUUID . fromString ( "a32fd1cb-7d97-44ee-a0d0-db16c2a93b3f" ) ) ; org . openbel . framework . core . equivalence . EquivalentParameter param2 = new org . openbel . framework . core . equivalence . EquivalentParameter ( hgnc , "AKT2" , org . openbel . framework . common . protonetwork . model . SkinnyUUID . fromString ( "9be88c14-6311-4452-a911-9f02abcf6a1e" ) ) ; org . openbel . framework . core . equivalence . EquivalentTerm term1 = new org . openbel . framework . core . equivalence . EquivalentTerm ( f , java . util . Arrays . asList ( ( ( org . openbel . framework . common . model . BELObject ) ( param1 ) ) , ( ( org . openbel . framework . common . model . BELObject ) ( param2 ) ) ) ) ; org . openbel . framework . core . equivalence . EquivalentParameter param3 = new org . openbel . framework . core . equivalence . EquivalentParameter ( egid , "208" , org . openbel . framework . common . protonetwork . model . SkinnyUUID . fromString ( "9be88c14-6311-4452-a911-9f02abcf6a1e" ) ) ; org . openbel . framework . core . equivalence . EquivalentParameter param4 = new org . openbel . framework . core . equivalence . EquivalentParameter ( egid , "207" , org . openbel . framework . common . protonetwork . model . SkinnyUUID . fromString ( "a32fd1cb-7d97-44ee-a0d0-db16c2a93b3f" ) ) ; org . openbel . framework . core . equivalence . EquivalentTerm term2 = new org . openbel . framework . core . equivalence . EquivalentTerm ( f , java . util . Arrays . asList ( ( ( org . openbel . framework . common . model . BELObject ) ( param3 ) ) , ( ( org . openbel . framework . common . model . BELObject ) ( param4 ) ) ) ) ; "<AssertPlaceHolder>" ; } } } equals ( java . lang . Object ) { if ( ( this ) == obj ) { return true ; } else if ( obj == null ) { return false ; } else if ( ! ( obj instanceof org . openbel . framework . api . CitationFilterCriteria ) ) { return false ; } else { org . openbel . framework . api . CitationFilterCriteria other = ( ( org . openbel . framework . api . CitationFilterCriteria ) ( obj ) ) ; return ( ( isInclude ( ) ) == ( other . isInclude ( ) ) ) && ( valueSet . equals ( other . valueSet ) ) ; } }
org . junit . Assert . assertThat ( term1 . equals ( term2 ) , org . hamcrest . CoreMatchers . is ( false ) )
testContinueAfterStartAndNotSameType ( ) { final java . lang . String outcome = opennlp . tools . namefind . NameFinderSequenceValidatorTest . CONTINUE_B ; java . lang . String [ ] inputSequence = new java . lang . String [ ] { "PersonA" , "LocationA" , "something" } ; java . lang . String [ ] outcomesSequence = new java . lang . String [ ] { opennlp . tools . namefind . NameFinderSequenceValidatorTest . START_A } ; "<AssertPlaceHolder>" ; } validSequence ( int , java . lang . String [ ] , java . lang . String [ ] , java . lang . String ) { if ( outcome . endsWith ( BioCodec . CONTINUE ) ) { int li = ( outcomesSequence . length ) - 1 ; if ( li == ( - 1 ) ) { return false ; } else if ( outcomesSequence [ li ] . endsWith ( BioCodec . OTHER ) ) { return false ; } else if ( ( outcomesSequence [ li ] . endsWith ( BioCodec . CONTINUE ) ) || ( outcomesSequence [ li ] . endsWith ( BioCodec . START ) ) ) { java . lang . String previousNameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcomesSequence [ li ] ) ; java . lang . String nameType = opennlp . tools . namefind . NameFinderME . extractNameType ( outcome ) ; if ( ( previousNameType != null ) || ( nameType != null ) ) { if ( nameType != null ) { if ( nameType . equals ( previousNameType ) ) { return true ; } } return false ; } } } return true ; }
org . junit . Assert . assertFalse ( opennlp . tools . namefind . NameFinderSequenceValidatorTest . validator . validSequence ( 1 , inputSequence , outcomesSequence , outcome ) )
testNotifyUserString ( ) { world . bentobox . bentobox . api . user . User user = mock ( world . bentobox . bentobox . api . user . User . class ) ; java . lang . String message = "a<sp>message" ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( user ) . sendRawMessage ( message ) ; } notify ( java . lang . String , java . lang . String [ ] ) { java . lang . String message = getTranslation ( reference , variables ) ; if ( ( ! ( org . bukkit . ChatColor . stripColor ( message ) . trim ( ) . isEmpty ( ) ) ) && ( ( sender ) != null ) ) { world . bentobox . bentobox . api . user . User . plugin . getNotifier ( ) . notify ( this , message ) ; } }
org . junit . Assert . assertTrue ( n . notify ( user , message ) )
test_shouldNotMountVolumeOnApplicationVolumeNameEmpty ( ) { createApplication ( ) ; try { org . springframework . shell . core . CommandResult result = mountVolume ( "/cloudunit/" , "" ) ; "<AssertPlaceHolder>" ; } finally { removeApplication ( ) ; } } isFailedCommand ( ) { return new fr . treeptik . cloudunit . cli . integration . ShellMatchers . CommandStatusMatcher ( false ) ; }
org . junit . Assert . assertThat ( result , isFailedCommand ( ) )
testSearchNotExistingSuperiorNoReferralAncestor ( ) { javax . naming . directory . Attributes attrs = new javax . naming . directory . BasicAttributes ( "ObjectClass" , "top" , true ) ; try { MNNCtx . search ( "cn=nobody" , attrs ) ; org . junit . Assert . fail ( ) ; } catch ( javax . naming . NameNotFoundException nnfe ) { "<AssertPlaceHolder>" ; } } search ( org . apache . directory . api . ldap . model . name . Dn , java . lang . String ) { return search ( dn , filter , true ) ; }
org . junit . Assert . assertTrue ( true )
testUnnestList ( ) { com . dremio . dac . model . job . JobDataFragment data = testConvert ( "flatten(b)<sp>as<sp>foo" , new com . dremio . dac . proto . model . dataset . FieldUnnestList ( ) , "b" , "cp.\"json/nested.json\"" ) ; "<AssertPlaceHolder>" ; } getReturnedRowCount ( ) { return recordBatches . getSize ( ) ; }
org . junit . Assert . assertEquals ( 6 , data . getReturnedRowCount ( ) )
testQuery_14_10_16 ( ) { javax . jdo . PersistenceManager pm = org . zoodb . test . testutil . TestTools . openPM ( ) ; pm . currentTransaction ( ) . begin ( ) ; javax . jdo . Query q = pm . newQuery ( org . zoodb . test . jdo . test_071 . Employee . class , "salary<sp>><sp>sal" ) ; q . declareParameters ( "Float<sp>sal" ) ; q . setResultClass ( org . zoodb . test . jdo . test_071 . EmpInfo . class ) ; java . util . Collection < org . zoodb . test . jdo . test_071 . EmpInfo > infos = ( ( java . util . Collection < org . zoodb . test . jdo . test_071 . EmpInfo > ) ( q . execute ( new java . lang . Float ( 30000.0 ) ) ) ) ; java . util . Iterator < org . zoodb . test . jdo . test_071 . EmpInfo > it = infos . iterator ( ) ; while ( it . hasNext ( ) ) { org . zoodb . test . jdo . test_071 . EmpInfo info = it . next ( ) ; org . zoodb . test . jdo . test_071 . Employee e = info . getWorker ( ) ; org . junit . Assert . fail ( "TODO" ) ; "<AssertPlaceHolder>" ; } org . zoodb . test . testutil . TestTools . closePM ( pm ) ; } getWorker ( ) { return worker ; }
org . junit . Assert . assertNotNull ( e )
cacheLoaderClosesClassLoaders ( ) { java . lang . ClassLoader cl ; try ( com . facebook . buck . util . ClassLoaderCache clc = new com . facebook . buck . util . ClassLoaderCache ( ) ) { java . lang . ClassLoader dummyParent = java . lang . ClassLoader . getSystemClassLoader ( ) ; com . google . common . collect . ImmutableList < java . net . URL > dummyClassPath = com . google . common . collect . ImmutableList . of ( fooDir . toURI ( ) . toURL ( ) , barDir . toURI ( ) . toURL ( ) ) ; cl = clc . getClassLoaderForClassPath ( dummyParent , dummyClassPath ) ; org . junit . Assume . assumeThat ( cl . getResource ( "baz" ) , org . hamcrest . Matchers . equalTo ( bazFile . toURI ( ) . toURL ( ) ) ) ; } "<AssertPlaceHolder>" ; } equalTo ( com . facebook . buck . query . QueryEnvironment$Argument ) { return ( ( ( type . equals ( other . type ) ) && ( ( integer ) == ( other . integer ) ) ) && ( java . util . Objects . equals ( expression , other . expression ) ) ) && ( java . util . Objects . equals ( word , other . word ) ) ; }
org . junit . Assert . assertNull ( cl . getResource ( "baz" ) )
test_validateCreateWBUri_wrongUriFirstCharacter ( ) { errorsContainer . put ( "uri" , WPBErrors . ERROR_URI_START_CHAR ) ; wburi . setHttpOperation ( "GET" ) ; wburi . setUri ( "test" ) ; wburi . setResourceType ( WPBUri . RESOURCE_TYPE_FILE ) ; wburi . setResourceExternalKey ( "123" ) ; wburi . setEnabled ( 1 ) ; java . util . Map < java . lang . String , java . lang . String > errors = uriValidator . validateCreate ( wburi ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { boolean result = false ; if ( other instanceof com . webpagebytes . cms . template . FreeMarkerTemplateObject ) { com . webpagebytes . cms . template . FreeMarkerTemplateObject that = ( ( com . webpagebytes . cms . template . FreeMarkerTemplateObject ) ( other ) ) ; result = ( ( ( this . lastModified ) == ( that . lastModified ) ) && ( this . externalKey . equals ( that . externalKey ) ) ) && ( this . type . equals ( that . type ) ) ; } return result ; }
org . junit . Assert . assertTrue ( errorsContainer . equals ( errors ) )
trimLabelsNanoseconds2 ( ) { java . util . List < java . lang . String > input = java . util . Arrays . asList ( "2014/11/26<sp>09:01:00.000000000" , "2014/11/26<sp>09:02:00.000200000" , "2014/11/26<sp>09:03:00.000400000" , "2014/11/26<sp>09:04:00.000600000" , "2014/11/26<sp>09:05:00.000800000" ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "2014/11/26<sp>09:01:00.0000" , "09:02:00.0002" , "09:03:00.0004" , "09:04:00.0006" , "09:05:00.0008" ) ; java . util . List < java . lang . String > found = org . diirt . graphene . TimeScales . trimLabels ( input ) ; "<AssertPlaceHolder>" ; } trimLabels ( java . util . List ) { if ( ( labels . size ( ) ) <= 1 ) { return labels ; } int greatestChangingPrecision = org . diirt . graphene . TimeScales . calculateGreatestChangingField ( labels ) ; java . util . ArrayList < java . lang . String > rtn = new java . util . ArrayList < java . lang . String > ( labels . size ( ) ) ; org . diirt . graphene . TimeScales . DateTrimmer firstDate = new org . diirt . graphene . TimeScales . DateTrimmer ( labels . get ( 0 ) ) ; rtn . add ( firstDate . getCompactForm ( org . diirt . graphene . TimeScales . DateTrimmer . NO_PRECISION , greatestChangingPrecision ) ) ; for ( int i = 1 ; i < ( labels . size ( ) ) ; i ++ ) { java . lang . String prevLabel = labels . get ( ( i - 1 ) ) ; java . lang . String nextLabel = labels . get ( i ) ; int redundancePrecision = org . diirt . graphene . TimeScales . greatestRedundancePrecision ( prevLabel , nextLabel ) ; org . diirt . graphene . TimeScales . DateTrimmer f = new org . diirt . graphene . TimeScales . DateTrimmer ( nextLabel ) ; java . lang . String trimmedLabel = f . getCompactForm ( redundancePrecision , greatestChangingPrecision ) ; rtn . add ( trimmedLabel ) ; } return rtn ; }
org . junit . Assert . assertThat ( found , equalTo ( expected ) )
initModelData_RenderOrgSectionNoAdmin ( ) { doReturn ( Boolean . FALSE ) . when ( ctrl . identitySvc ) . isCallerOrganizationAdmin ( ) ; ctrl . initModelData ( profile ) ; org . oscm . ui . profile . EditProfileModel model = ctrl . model ; "<AssertPlaceHolder>" ; } isRenderOrganizationSection ( ) { return renderOrganizationSection ; }
org . junit . Assert . assertFalse ( model . isRenderOrganizationSection ( ) )
testDeleteCommand ( ) { final org . kie . workbench . common . widgets . metadata . client . TestDocument document = createTestDocument ( ) ; final org . uberfire . backend . vfs . ObservablePath path = document . getLatestPath ( ) ; editor . setupMenuBar ( ) ; registerDocument ( document ) ; final org . mockito . ArgumentCaptor < org . uberfire . mvp . Command > deleteCommandCaptor = org . mockito . ArgumentCaptor . forClass ( org . uberfire . mvp . Command . class ) ; verify ( path , times ( 1 ) ) . onDelete ( deleteCommandCaptor . capture ( ) ) ; final org . uberfire . mvp . Command deleteCommand = deleteCommandCaptor . getValue ( ) ; "<AssertPlaceHolder>" ; deleteCommand . execute ( ) ; verify ( editor , times ( 1 ) ) . enableMenus ( eq ( false ) ) ; verify ( editor , times ( 4 ) ) . enableMenuItem ( eq ( false ) , any ( org . uberfire . ext . editor . commons . client . menu . MenuItems . class ) ) ; verify ( saveMenuItem , times ( 1 ) ) . setEnabled ( eq ( false ) ) ; verify ( versionManagerMenuItem , times ( 1 ) ) . setEnabled ( eq ( false ) ) ; verify ( editor , times ( 1 ) ) . removeDocument ( eq ( document ) ) ; verify ( registeredDocumentsMenuBuilder , times ( 1 ) ) . deregisterDocument ( document ) ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertNotNull ( deleteCommand )
getEventsAcceptsNullFilters ( ) { org . phenotips . security . audit . AuditEvent template = new org . phenotips . security . audit . AuditEvent ( null , null , null , null , null , null ) ; when ( this . store . getEvents ( template , null , null , 0 , 0 ) ) . thenReturn ( this . events ) ; when ( this . auth . hasAccess ( this . user , Right . ADMIN , this . xwikiPreferences ) ) . thenReturn ( true ) ; java . util . List < org . phenotips . security . audit . AuditEvent > result = this . scriptService . getEvents ( 0 , 0 , null , null , null , null , null , null ) ; org . mockito . Mockito . verify ( this . store ) . getEvents ( template , null , null , 0 , 0 ) ; "<AssertPlaceHolder>" ; } getEvents ( org . phenotips . security . audit . AuditEvent , java . util . Calendar , java . util . Calendar , int , int ) { try { org . hibernate . Session session = this . sessionFactory . getSessionFactory ( ) . openSession ( ) ; org . hibernate . Criteria c = session . createCriteria ( org . phenotips . security . audit . AuditEvent . class ) ; if ( eventTemplate != null ) { c . add ( org . hibernate . criterion . Example . create ( eventTemplate ) ) ; } setTimeInterval ( c , fromTime , toTime ) ; c . addOrder ( org . hibernate . criterion . Order . desc ( org . phenotips . security . audit . internal . HibernateAuditStore . TIME_FIELD_NAME ) ) ; if ( start > 0 ) { c . setFirstResult ( start ) ; } if ( maxResults > 0 ) { c . setMaxResults ( maxResults ) ; } c . setReadOnly ( true ) ; @ org . phenotips . security . audit . internal . SuppressWarnings ( "unchecked" ) java . util . List < org . phenotips . security . audit . AuditEvent > foundEntries = c . list ( ) ; return foundEntries ; } catch ( org . hibernate . HibernateException ex ) { this . logger . error ( "Failed<sp>to<sp>load<sp>audit<sp>event<sp>documents:<sp>{}" , ex . getMessage ( ) , ex ) ; } return java . util . Collections . emptyList ( ) ; }
org . junit . Assert . assertSame ( this . events , result )
shouldCountCustomMethodWithNearBox ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity . setId ( documentId ) ; sampleEntity . setType ( "test" ) ; sampleEntity . setRate ( 10 ) ; sampleEntity . setMessage ( "foo" ) ; sampleEntity . setLocation ( new org . springframework . data . elasticsearch . core . geo . GeoPoint ( 45.7806 , 3.0875 ) ) ; repository . save ( sampleEntity ) ; documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity2 = new org . springframework . data . elasticsearch . entities . SampleEntity ( ) ; sampleEntity2 . setId ( documentId ) ; sampleEntity2 . setType ( "test2" ) ; sampleEntity2 . setRate ( 10 ) ; sampleEntity2 . setMessage ( "foo" ) ; sampleEntity2 . setLocation ( new org . springframework . data . elasticsearch . core . geo . GeoPoint ( 30.7806 , 0.0875 ) ) ; repository . save ( sampleEntity2 ) ; long count = repository . countByLocationNear ( new org . springframework . data . geo . Box ( new org . springframework . data . geo . Point ( 46.0 , 3.0 ) , new org . springframework . data . geo . Point ( 45.0 , 4.0 ) ) ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Object ) { queryCriteria . add ( new org . springframework . data . elasticsearch . core . query . Criteria . CriteriaEntry ( org . springframework . data . elasticsearch . core . query . Criteria . OperationKey . EQUALS , o ) ) ; return this ; }
org . junit . Assert . assertThat ( count , is ( equalTo ( 1L ) ) )
testEquals ( ) { org . jfree . data . time . Day day1 = new org . jfree . data . time . Day ( 29 , org . jfree . chart . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour1 = new org . jfree . data . time . Hour ( 15 , day1 ) ; org . jfree . data . time . Minute minute1 = new org . jfree . data . time . Minute ( 15 , hour1 ) ; org . jfree . data . time . Second second1 = new org . jfree . data . time . Second ( 34 , minute1 ) ; org . jfree . data . time . Millisecond milli1 = new org . jfree . data . time . Millisecond ( 999 , second1 ) ; org . jfree . data . time . Day day2 = new org . jfree . data . time . Day ( 29 , org . jfree . chart . date . MonthConstants . MARCH , 2002 ) ; org . jfree . data . time . Hour hour2 = new org . jfree . data . time . Hour ( 15 , day2 ) ; org . jfree . data . time . Minute minute2 = new org . jfree . data . time . Minute ( 15 , hour2 ) ; org . jfree . data . time . Second second2 = new org . jfree . data . time . Second ( 34 , minute2 ) ; org . jfree . data . time . Millisecond milli2 = new org . jfree . data . time . Millisecond ( 999 , second2 ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( milli1 , milli2 )
testComputeCacheKeyWithDifferentPostAgg ( ) { final org . apache . druid . query . topn . TopNQuery query1 = new org . apache . druid . query . topn . TopNQuery ( new org . apache . druid . query . TableDataSource ( "dummy" ) , org . apache . druid . segment . VirtualColumns . EMPTY , new org . apache . druid . query . dimension . DefaultDimensionSpec ( "test" , "test" ) , new org . apache . druid . query . topn . NumericTopNMetricSpec ( "post" ) , 3 , new org . apache . druid . query . spec . MultipleIntervalSegmentSpec ( com . google . common . collect . ImmutableList . of ( org . apache . druid . java . util . common . Intervals . of ( "2015-01-01/2015-01-02" ) ) ) , null , org . apache . druid . java . util . common . granularity . Granularities . ALL , com . google . common . collect . ImmutableList . of ( new org . apache . druid . query . aggregation . CountAggregatorFactory ( "metric1" ) ) , com . google . common . collect . ImmutableList . of ( new org . apache . druid . query . aggregation . post . ConstantPostAggregator ( "post" , 10 ) ) , null ) ; final org . apache . druid . query . topn . TopNQuery query2 = new org . apache . druid . query . topn . TopNQuery ( new org . apache . druid . query . TableDataSource ( "dummy" ) , org . apache . druid . segment . VirtualColumns . EMPTY , new org . apache . druid . query . dimension . DefaultDimensionSpec ( "test" , "test" ) , new org . apache . druid . query . topn . NumericTopNMetricSpec ( "post" ) , 3 , new org . apache . druid . query . spec . MultipleIntervalSegmentSpec ( com . google . common . collect . ImmutableList . of ( org . apache . druid . java . util . common . Intervals . of ( "2015-01-01/2015-01-02" ) ) ) , null , org . apache . druid . java . util . common . granularity . Granularities . ALL , com . google . common . collect . ImmutableList . of ( new org . apache . druid . query . aggregation . CountAggregatorFactory ( "metric1" ) ) , com . google . common . collect . ImmutableList . of ( new org . apache . druid . query . aggregation . post . ArithmeticPostAggregator ( "post" , "+" , com . google . common . collect . ImmutableList . of ( new org . apache . druid . query . aggregation . post . FieldAccessPostAggregator ( null , "metric1" ) , new org . apache . druid . query . aggregation . post . FieldAccessPostAggregator ( null , "metric1" ) ) ) ) , null ) ; final org . apache . druid . query . CacheStrategy < org . apache . druid . query . Result < org . apache . druid . query . topn . TopNResultValue > , java . lang . Object , org . apache . druid . query . topn . TopNQuery > strategy1 = new org . apache . druid . query . topn . TopNQueryQueryToolChest ( null , null ) . getCacheStrategy ( query1 ) ; final org . apache . druid . query . CacheStrategy < org . apache . druid . query . Result < org . apache . druid . query . topn . TopNResultValue > , java . lang . Object , org . apache . druid . query . topn . TopNQuery > strategy2 = new org . apache . druid . query . topn . TopNQueryQueryToolChest ( null , null ) . getCacheStrategy ( query2 ) ; "<AssertPlaceHolder>" ; } computeCacheKey ( org . apache . druid . query . metadata . metadata . SegmentMetadataQuery ) { org . apache . druid . query . metadata . metadata . SegmentMetadataQuery updatedQuery = query . withFinalizedAnalysisTypes ( config ) ; byte [ ] includerBytes = updatedQuery . getToInclude ( ) . getCacheKey ( ) ; byte [ ] analysisTypesBytes = updatedQuery . getAnalysisTypesCacheKey ( ) ; return java . nio . ByteBuffer . allocate ( ( ( 1 + ( includerBytes . length ) ) + ( analysisTypesBytes . length ) ) ) . put ( org . apache . druid . query . metadata . SegmentMetadataQueryQueryToolChest . SEGMENT_METADATA_CACHE_PREFIX ) . put ( includerBytes ) . put ( analysisTypesBytes ) . array ( ) ; }
org . junit . Assert . assertFalse ( java . util . Arrays . equals ( strategy1 . computeCacheKey ( query1 ) , strategy2 . computeCacheKey ( query2 ) ) )
similarity ( ) { System . out . println ( "simpleLS" ) ; org . aksw . limes . core . io . ls . LinkSpecification ls = new org . aksw . limes . core . io . ls . LinkSpecification ( "tmp_during(x.beginsAtDateTime|endsAtDateTime,y.b|e)" , 1.0 ) ; org . aksw . limes . core . execution . planning . planner . DynamicPlanner p = new org . aksw . limes . core . execution . planning . planner . DynamicPlanner ( source , target ) ; org . aksw . limes . core . execution . engine . ExecutionEngine e = new org . aksw . limes . core . execution . engine . SimpleExecutionEngine ( source , target , "?x" , "?y" ) ; org . aksw . limes . core . io . mapping . AMapping m = e . execute ( ls , p ) ; System . out . println ( m ) ; org . aksw . limes . core . io . mapping . AMapping m2 = org . aksw . limes . core . io . mapping . MappingFactory . createDefaultMapping ( ) ; for ( org . aksw . limes . core . io . cache . Instance s : source . getAllInstances ( ) ) { for ( org . aksw . limes . core . io . cache . Instance t : target . getAllInstances ( ) ) { org . aksw . limes . core . measures . measure . temporal . allenAlgebra . DuringMeasure measure = new org . aksw . limes . core . measures . measure . temporal . allenAlgebra . DuringMeasure ( ) ; double sim = measure . getSimilarity ( s , t , "beginsAtDateTime|endsAtDateTime" , "b|e" ) ; if ( sim != 0 ) m2 . add ( s . getUri ( ) , t . getUri ( ) , sim ) ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj instanceof org . aksw . limes . core . io . cache . MemoryCache ) { final org . aksw . limes . core . io . cache . MemoryCache other = ( ( org . aksw . limes . core . io . cache . MemoryCache ) ( obj ) ) ; return java . util . Objects . equals ( instanceMap , other . instanceMap ) ; } else { return false ; } }
org . junit . Assert . assertTrue ( m . equals ( m2 ) )
testOverrun ( ) { com . streamsets . pipeline . api . ext . io . OverrunReader reader = new com . streamsets . pipeline . api . ext . io . OverrunReader ( new java . io . StringReader ( createTextLines ( 1000 , 20 , 5000 ) ) , ( 2 * 1000 ) , true , false ) ; int lines = 0 ; try ( com . streamsets . pipeline . lib . parser . DataParser parser = new com . streamsets . pipeline . lib . parser . text . TextCharDataParser ( getContext ( ) , "id" , false , false , "" , false , reader , 0 , 3 , "text" , "truncated" , getStringBuilderPool ( ) ) ) { while ( ( parser . parse ( ) ) != null ) { lines ++ ; } } finally { "<AssertPlaceHolder>" ; } } parse ( ) { com . streamsets . pipeline . api . Record record = null ; long offset = parser . getReaderPosition ( ) ; java . lang . String [ ] columns = parser . read ( ) ; if ( columns != null ) { record = createRecord ( offset , columns ) ; } else { eof = true ; } return record ; }
org . junit . Assert . assertEquals ( 20 , lines )
removeIf ( ) { final int nearlyTheSameTime = 50 ; holder . hold ( alertEntity ( ) ) ; holder . removeIf ( ( alertEntity ) -> ( ( java . lang . System . currentTimeMillis ( ) ) - ( alertEntity . getDate ( ) . getTime ( ) ) ) <= nearlyTheSameTime ) ; "<AssertPlaceHolder>" ; } hasAlerts ( ) { }
org . junit . Assert . assertFalse ( holder . hasAlerts ( ) )
testFindServiceById ( ) { org . hyperic . hq . product . ServiceTypeInfo sinfo = new org . hyperic . hq . product . ServiceTypeInfo ( ) ; sinfo . setDescription ( "Test<sp>ServiceType<sp>Desc" ) ; sinfo . setInternal ( false ) ; sinfo . setName ( "Test<sp>ServiceType<sp>Name" ) ; org . hyperic . hq . appdef . server . session . ServiceType serviceType = serviceManager . createServiceType ( sinfo , "Test<sp>Service<sp>Plugin" , testServerType ) ; org . hyperic . hq . appdef . server . session . Service service = serviceManager . createService ( subject , testServers . get ( 0 ) . getId ( ) , serviceType . getId ( ) , "Test<sp>Service<sp>Name" , "Test<sp>Service<sp>Desc" , "my<sp>computer" ) ; "<AssertPlaceHolder>" ; } findServiceById ( java . lang . Integer ) { org . hyperic . hq . appdef . server . session . Service service = getServiceById ( id ) ; if ( service == null ) { throw new org . hyperic . hq . appdef . shared . ServiceNotFoundException ( id ) ; } return service ; }
org . junit . Assert . assertEquals ( service , serviceManager . findServiceById ( service . getId ( ) ) )
testParseSuccess ( ) { actions = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "edge_node" , "node_01" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowActionCopyTtlInQuery ( actions ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExactly ( this . actions , new java . lang . String [ ] { } ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( true ) )
testGetDrugGroupByName ( ) { java . lang . String name = "TestDrugGroup1" ; java . lang . String result = dao . getDrugGroupByName ( name ) . get ( 0 ) . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , result )
whenSettingOneDimValue_valueMustBeCorrect ( ) { com . graphhopper . jsprit . core . problem . Capacity . Builder capBuilder = Capacity . Builder . newInstance ( ) ; capBuilder . addDimension ( 0 , 4 ) ; com . graphhopper . jsprit . core . problem . Capacity cap = capBuilder . build ( ) ; "<AssertPlaceHolder>" ; } get ( com . graphhopper . jsprit . core . problem . solution . route . VehicleRoute ) { return com . graphhopper . jsprit . core . algorithm . state . Arrays . asList ( route . getVehicle ( ) ) ; }
org . junit . Assert . assertEquals ( 4 , cap . get ( 0 ) )
testCreateSingle ( ) { cityService . createCity ( ) ; java . util . List < net . neoremind . fountain . test . po . City > cities = cityService . getAll ( ) ; "<AssertPlaceHolder>" ; } getAll ( ) { return cityDao . getAll ( ) ; }
org . junit . Assert . assertThat ( cities . size ( ) , org . hamcrest . Matchers . is ( 1 ) )
testIsNotEmptyWithEmptyMap ( ) { final java . util . Map < java . lang . Object , java . lang . Object > map = new java . util . HashMap ( ) ; "<AssertPlaceHolder>" ; } isNotEmpty ( java . util . Map ) { return ! ( org . apache . commons . collections4 . MapUtils . isEmpty ( map ) ) ; }
org . junit . Assert . assertEquals ( false , org . apache . commons . collections4 . MapUtils . isNotEmpty ( map ) )
testLog10Power ( ) { double [ ] epsilon = new double [ ] { 3.0E-16 , 3.0E-16 , 9.0E-16 , 6.0E-15 , 6.0E-14 } ; for ( int maxOrder = 0 ; maxOrder < 5 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org . apache . commons . math4 . analysis . differentiation . DerivativeStructure ( 1 , maxOrder , 0 , x ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure rebuiltX = new org . apache . commons . math4 . analysis . differentiation . DerivativeStructure ( 1 , maxOrder , 10.0 ) . pow ( dsX ) . log10 ( ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure zero = rebuiltX . subtract ( dsX ) ; for ( int n = 0 ; n <= maxOrder ; ++ n ) { "<AssertPlaceHolder>" ; } } } } getPartialDerivative ( int [ ] ) { return data [ compiler . getPartialDerivativeIndex ( orders ) ] ; }
org . junit . Assert . assertEquals ( 0 , zero . getPartialDerivative ( n ) , epsilon [ n ] )
testMultiLayerIndex ( ) { de . vandermeer . svg2vector . applications . is . Svg2Vector_IS app = new de . vandermeer . svg2vector . applications . is . Svg2Vector_IS ( ) ; java . lang . String [ ] args = org . apache . commons . lang3 . ArrayUtils . addAll ( de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_PDF . STD_OPTIONS , "-f" , "src/test/resources/svg-files/time-interval-based.svgz" , "-d" , ( ( de . vandermeer . svg2vector . applications . is . Test_Svg2Vector_IS_PDF . OUT_DIR_PREFIX ) + "layers-index" ) , "-l" , "-i" ) ; "<AssertPlaceHolder>" ; } executeApplication ( java . lang . String [ ] ) { int ret = super . executeApplication ( args ) ; if ( ret != 0 ) { return ret ; } de . vandermeer . svg2vector . applications . base . SvgTargets target = this . getProps ( ) . getTarget ( ) ; java . lang . String fn = this . optionInkscapeExec . getValue ( ) ; if ( ( ret = this . checkIsExecutable ( fn ) ) < 0 ) { return ret ; } this . printDetailMessage ( ( "Inkscape<sp>exec:<sp>" + fn ) ) ; this . setWarnings ( target ) ; de . vandermeer . svg2vector . applications . is . IsCmd isCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , target , this . getProps ( ) ) ; isCmd . appendTargetSettings ( target , this . optionExpDpi , this . optionExpPdfver , this . optionExpPslevel ) ; de . vandermeer . svg2vector . applications . is . IsCmd isTmpCmd = new de . vandermeer . svg2vector . applications . is . IsCmd ( fn , de . vandermeer . svg2vector . applications . base . SvgTargets . svg , this . getProps ( ) ) ; if ( this . optionSvgFirst . inCli ( ) ) { this . printProgressMessage ( "converting<sp>to<sp>temporary<sp>SVG<sp>first" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd<sp>tmp:<sp>" + isTmpCmd ) ) ; } else { this . printProgressMessage ( "converting<sp>directly<sp>to<sp>target" ) ; this . printDetailMessage ( ( "Inkscape<sp>cmd:<sp>" + isCmd ) ) ; } ret = this . createTempArtifacts ( isTmpCmd ) ; if ( ret < 0 ) { return ret ; } ret = this . convertInput ( isCmd , target ) ; if ( ret < 0 ) { return ret ; } this . removeTempArtifacts ( ) ; this . printProgressMessage ( "finished<sp>successfully" ) ; return 0 ; }
org . junit . Assert . assertEquals ( 0 , app . executeApplication ( args ) )
testReverse ( ) { System . out . println ( "Testing<sp>Reverse..." ) ; edu . cmu . sphinx . fst . Fst fst = edu . cmu . sphinx . fst . openfst . Convert . importFst ( "src/test/edu/cmu/sphinx/fst/data/tests/algorithms/reverse/A" , new edu . cmu . sphinx . fst . semiring . TropicalSemiring ( ) ) ; edu . cmu . sphinx . fst . Fst fstB = edu . cmu . sphinx . fst . Fst . loadModel ( "src/test/edu/cmu/sphinx/fst/data/tests/algorithms/reverse/fstreverse.fst.ser" ) ; edu . cmu . sphinx . fst . Fst fstReversed = edu . cmu . sphinx . fst . operations . Reverse . get ( fst ) ; "<AssertPlaceHolder>" ; System . out . println ( "Testing<sp>Reverse<sp>Completed!\n" ) ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; edu . cmu . sphinx . fst . Fst other = ( ( edu . cmu . sphinx . fst . Fst ) ( obj ) ) ; if ( ! ( java . util . Arrays . equals ( isyms , other . isyms ) ) ) return false ; if ( ! ( java . util . Arrays . equals ( osyms , other . osyms ) ) ) return false ; if ( ( start ) == null ) { if ( ( other . start ) != null ) return false ; } else if ( ! ( start . equals ( other . start ) ) ) return false ; if ( ( states ) == null ) { if ( ( other . states ) != null ) return false ; } else if ( ! ( states . equals ( other . states ) ) ) return false ; if ( ( semiring ) == null ) { if ( ( other . semiring ) != null ) return false ; } else if ( ! ( semiring . equals ( other . semiring ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( fstB . equals ( fstReversed ) )
testInitialAttach ( ) { java . util . concurrent . atomic . AtomicBoolean initialAttach = new java . util . concurrent . atomic . AtomicBoolean ( false ) ; com . vaadin . flow . component . ComponentTest . TestComponent c = new com . vaadin . flow . component . ComponentTest . TestComponent ( ) ; c . addAttachListener ( ( e ) -> { initialAttach . set ( e . isInitialAttach ( ) ) ; } ) ; com . vaadin . flow . component . UI ui = new com . vaadin . flow . component . UI ( ) ; ui . add ( c ) ; "<AssertPlaceHolder>" ; } get ( ) { return com . vaadin . flow . dom . impl . BasicTextElementStateProvider . INSTANCE ; }
org . junit . Assert . assertTrue ( initialAttach . get ( ) )
test_LocalDateTime_adjustToSymmetry454Date ( ) { org . threeten . extra . chrono . Symmetry454Date sym454 = org . threeten . extra . chrono . Symmetry454Date . of ( 2012 , 7 , 19 ) ; java . time . LocalDateTime test = LocalDateTime . MIN . with ( sym454 ) ; "<AssertPlaceHolder>" ; } with ( java . time . temporal . TemporalAdjuster ) { return ( ( org . threeten . extra . YearQuarter ) ( adjuster . adjustInto ( this ) ) ) ; }
org . junit . Assert . assertEquals ( java . time . LocalDateTime . of ( 2012 , 7 , 20 , 0 , 0 ) , test )
testBasicArrowFunctionsWork ( ) { java . lang . Object result = manifold . js . demo . ArrowFunctionClass . arrowFilterStatement ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 3 , result )
shouldNotBeValidIfHasWarningFacesMessage ( ) { java . util . List < javax . faces . component . UIComponent > components = createComponentWithFacesMessage ( FacesMessage . SEVERITY_WARN ) ; org . springframework . springfaces . template . ui . ComponentInfo info = new org . springframework . springfaces . template . ui . DefaultComponentInfo ( this . context , components ) ; "<AssertPlaceHolder>" ; } isValid ( ) { for ( javax . faces . component . UIComponent component : this . components ) { if ( ! ( isValid ( component ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertThat ( info . isValid ( ) , org . hamcrest . Matchers . is ( false ) )
testGetTrustBundlesByDomain_unknownDomain_assertException ( ) { boolean exceptionOccured = false ; try { tbDao . getTrustBundlesByDomain ( 1234 ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException e ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( exceptionOccured )
testString ( ) { java . lang . String result = executeBackAndForth ( "360buy.com" , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getKey ( ) ) + "=" ) + ( getValue ( ) ) ; }
org . junit . Assert . assertEquals ( "360buy.com" , result . toString ( ) )
testMissingFile ( ) { org . kitesdk . data . spi . AbstractDatasetReader < java . lang . String > reader = new org . kitesdk . data . spi . filesystem . FileSystemDatasetReader < java . lang . String > ( fileSystem , new org . apache . hadoop . fs . Path ( "/tmp/does-not-exist.avro" ) , STRING_SCHEMA , java . lang . String . class ) ; "<AssertPlaceHolder>" ; reader . initialize ( ) ; }
org . junit . Assert . assertNotNull ( reader )
unrecognized_attr ( ) { final java . util . Map < com . groupon . lex . metrics . MetricName , com . groupon . lex . metrics . MetricValue > result = com . groupon . lex . metrics . AttributeConverter . resolve_property ( com . groupon . lex . metrics . AttributeConverterTest . ROOT , new java . lang . Object ( ) ) . collect ( java . util . stream . Collectors . toMap ( Entry :: getKey , Entry :: getValue ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( begin ) == ( end ) ; }
org . junit . Assert . assertTrue ( result . isEmpty ( ) )
testRangeFunc ( ) { java . util . List < org . decaywood . entity . Stock > stocks = mapperTest . TestCaseGenerator . generateStocks ( ) ; org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper mapper = new org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper ( ) ; int count1 = stocks . stream ( ) . map ( mapper . andThen ( Stock :: getShareHoldersTrend ) . andThen ( Trend :: getHistory ) ) . mapToInt ( List :: size ) . reduce ( Integer :: sum ) . getAsInt ( ) ; java . util . Calendar calendar = java . util . Calendar . getInstance ( ) ; calendar . set ( 2014 , Calendar . AUGUST , 5 ) ; java . util . Date since = calendar . getTime ( ) ; calendar . set ( 2015 , Calendar . MAY , 28 ) ; java . util . Date until = calendar . getTime ( ) ; org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper rangeMapper = null ; try { rangeMapper = new org . decaywood . mapper . stockFirst . StockToStockWithShareHolderTrendMapper ( since , until ) ; } catch ( java . rmi . RemoteException e ) { e . printStackTrace ( ) ; } int count2 = stocks . stream ( ) . map ( rangeMapper . andThen ( Stock :: getShareHoldersTrend ) . andThen ( Trend :: getHistory ) ) . mapToInt ( List :: size ) . reduce ( Integer :: sum ) . getAsInt ( ) ; "<AssertPlaceHolder>" ; } getTime ( ) { return time ; }
org . junit . Assert . assertTrue ( ( count2 < count1 ) )
txn_readpromote_promote_commit ( ) { unit . begin ( TxnType . READ_PROMOTE ) ; boolean b = unit . promote ( ) ; "<AssertPlaceHolder>" ; unit . commit ( ) ; unit . end ( ) ; checkClear ( ) ; } promote ( ) { if ( bpTree . getNodeManager ( ) . isWritable ( this . getId ( ) ) ) return false ; boolean promoteInPlace = bpTree . state ( ) . modifiableNodeBlock ( getId ( ) ) ; if ( promoteInPlace ) { bpTree . getNodeManager ( ) . promoteInPlace ( this ) ; return false ; } else { org . apache . jena . dboe . base . block . Block oldBlock = block ; boolean b = bpTree . getNodeManager ( ) . promoteDuplicate ( this ) ; if ( b ) { bpTree . getNodeManager ( ) . getBlockMgr ( ) . release ( oldBlock ) ; } return b ; } }
org . junit . Assert . assertTrue ( b )
parse_doesNotFailWithManyEmptyObjects ( ) { com . eclipsesource . json . JsonArray array = new com . eclipsesource . json . JsonArray ( ) ; for ( int i = 0 ; i < 1001 ; i ++ ) { array . add ( new com . eclipsesource . json . JsonObject ( ) ) ; } final java . lang . String input = array . toString ( ) ; com . eclipsesource . json . JsonValue result = com . eclipsesource . json . Json . parse ( input ) ; "<AssertPlaceHolder>" ; } isArray ( ) { return false ; }
org . junit . Assert . assertTrue ( result . isArray ( ) )
testForbiddenReplacementWrongPriorities ( ) { "<AssertPlaceHolder>" ; } getReplacedField ( ) { org . nuxeo . ecm . core . schema . types . SchemaImpl nuxeo = new org . nuxeo . ecm . core . schema . types . SchemaImpl ( "testSchema" , new org . nuxeo . ecm . core . schema . Namespace ( "hhtp://test.com/schema/test" , "tst" ) ) ; nuxeo . addField ( "test-test" , StringType . INSTANCE , null , 0 , null ) ; return service . createSchema ( nuxeo ) . getField ( "test__dash__test" ) ; }
org . junit . Assert . assertNull ( getReplacedField ( ) )
override_marshaller ( ) { biweekly . ICalendar ical = new biweekly . ICalendar ( ) ; ical . addProperty ( new biweekly . property . Version ( "2.0" ) ) ; ical . setProductId ( "prodid" ) ; java . io . StringWriter sw = new java . io . StringWriter ( ) ; biweekly . io . json . JCalWriter writer = new biweekly . io . json . JCalWriter ( sw ) ; writer . registerScribe ( new biweekly . io . json . JCalWriterTest . MyVersionMarshaller ( ) ) ; writer . write ( ical ) ; writer . close ( ) ; java . lang . String expected = "[\"vcalendar\"," + ( ( ( ( ( ( "[" + "[\"version\",{},\"text\",\"2.0<sp>(beta)\"]," ) + "[\"prodid\",{},\"text\",\"prodid\"]" ) + "]," ) + "[" ) + "]" ) + "]" ) ; java . lang . String actual = sw . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return getValue ( ICalVersion . V2_0 ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testHasNodeFiltering ( ) { java . util . SortedMap < java . lang . String , java . util . SortedMap < java . lang . String , org . batfish . datamodel . GenericRib < org . batfish . datamodel . AbstractRouteDecorator > > > ribs = com . google . common . collect . ImmutableSortedMap . of ( "n1" , com . google . common . collect . ImmutableSortedMap . of ( Configuration . DEFAULT_VRF_NAME , new org . batfish . question . routes . RoutesAnswererTest . MockRib ( com . google . common . collect . ImmutableSet . of ( org . batfish . datamodel . StaticRoute . builder ( ) . setAdministrativeCost ( 1 ) . setNetwork ( org . batfish . datamodel . Prefix . parse ( "1.1.1.0/24" ) ) . setNextHopInterface ( "Null" ) . build ( ) ) ) ) ) ; com . google . common . collect . Multiset < org . batfish . datamodel . table . Row > actual = org . batfish . question . routes . RoutesAnswererUtil . getMainRibRoutes ( ribs , com . google . common . collect . ImmutableSet . of ( "differentNode" ) , null , RoutingProtocolSpecifier . ALL_PROTOCOLS_SPECIFIER , ".*" , null ) ; "<AssertPlaceHolder>" ; } hasSize ( org . hamcrest . Matcher ) { return new org . batfish . datamodel . matchers . RowsMatchersImpl . HasSize ( subMatcher ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . hasSize ( 0 ) )
addNull ( ) { "<AssertPlaceHolder>" ; } add ( com . amazonaws . metrics . MetricType ) { return type == null ? false : com . amazonaws . metrics . AwsSdkMetrics . REGISTRY . addMetricType ( type ) ; }
org . junit . Assert . assertFalse ( com . amazonaws . metrics . AwsSdkMetrics . add ( null ) )
shouldSucceedIfAPermissionCheckIsDoneWithoutContextAndPermissionIsGrantedToRoleOnSpecificContext ( ) { ch . puzzle . itc . mobiliar . business . security . control . ResourceTypeEntity resourceType = new ch . puzzle . itc . mobiliar . business . integration . entity . util . ResourceTypeEntityBuilder ( ) . id ( 7 ) . build ( ) ; ch . puzzle . itc . mobiliar . business . security . control . ResourceGroupEntity resourceGroup = new ch . puzzle . itc . mobiliar . business . security . control . ResourceGroupEntity ( ) ; resourceGroup . setId ( 23 ) ; resourceGroup . setResourceType ( resourceType ) ; when ( sessionContext . isCallerInRole ( ch . puzzle . itc . mobiliar . business . security . control . PermissionServiceTest . CONFIG_ADMIN ) ) . thenReturn ( true ) ; when ( sessionContext . getCallerPrincipal ( ) ) . thenReturn ( principal ) ; myRoles = new ch . puzzle . itc . mobiliar . business . security . control . HashMap ( ) ; ch . puzzle . itc . mobiliar . business . security . control . RestrictionEntity res = new ch . puzzle . itc . mobiliar . business . security . control . RestrictionEntity ( ) ; res . setAction ( Action . UPDATE ) ; res . setContext ( envC ) ; myRoles . put ( ch . puzzle . itc . mobiliar . business . security . control . PermissionServiceTest . CONFIG_ADMIN , ch . puzzle . itc . mobiliar . business . security . control . Arrays . asList ( new ch . puzzle . itc . mobiliar . builders . RestrictionDTOBuilder ( ) . mockRestrictionDTO ( Permission . RESOURCE , res ) ) ) ; permissionService . rolesWithRestrictions = myRoles ; boolean result = permissionService . hasPermission ( Permission . RESOURCE , null , Action . UPDATE , resourceGroup , null ) ; "<AssertPlaceHolder>" ; } hasPermission ( ch . puzzle . itc . mobiliar . business . security . control . Permission , ch . puzzle . itc . mobiliar . business . environment . entity . ContextEntity , ch . puzzle . itc . mobiliar . business . security . control . Action , ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceGroupEntity , ch . puzzle . itc . mobiliar . business . resourcegroup . entity . ResourceTypeEntity ) { return ( hasRole ( permission . name ( ) , context , action , resourceGroup , resourceType ) ) || ( hasUserRestriction ( permission . name ( ) , context , action , resourceGroup , resourceType ) ) ; }
org . junit . Assert . assertTrue ( result )
testDefaultSort03 ( ) { java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > input = new java . util . LinkedHashSet ( ) ; input . add ( Cipher . TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; input . add ( Cipher . TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 ) ; java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > result = org . apache . tomcat . util . net . jsse . openssl . OpenSSLCipherConfigurationParser . defaultSort ( input ) ; java . util . LinkedHashSet < org . apache . tomcat . util . net . jsse . openssl . Cipher > expected = new java . util . LinkedHashSet ( ) ; expected . add ( Cipher . TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 ) ; expected . add ( Cipher . TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuffer buf = new java . lang . StringBuffer ( org . apache . tomcat . jdbc . pool . interceptor . StatementDecoratorInterceptor . StatementProxy . class . getName ( ) ) ; buf . append ( "[Proxy=" ) ; buf . append ( java . lang . System . identityHashCode ( this ) ) ; buf . append ( ";<sp>Sql=" ) ; buf . append ( getSql ( ) ) ; buf . append ( ";<sp>Delegate=" ) ; buf . append ( getDelegate ( ) ) ; buf . append ( ";<sp>Connection=" ) ; buf . append ( getConnection ( ) ) ; buf . append ( "]" ) ; return buf . toString ( ) ; }
org . junit . Assert . assertEquals ( expected . toString ( ) , result . toString ( ) )
AccessInstanceVariableIndirect_MethodVar ( ) { java . lang . String fromClass = "Domain.Indirect.ViolatingFrom.AccessInstanceVariableIndirect_MethodVar" ; java . lang . String toClass = "Domain.Indirect.IndirectTo.ServiceOne" ; java . util . ArrayList < java . lang . String > typesToFind = new java . util . ArrayList < java . lang . String > ( ) ; typesToFind . add ( "Access" ) ; "<AssertPlaceHolder>" ; } areDependencyTypesDetected ( java . lang . String , java . lang . String , java . util . ArrayList , boolean ) { return areDependencyTypesDetected ( classFrom , classTo , dependencyTypes , "" , isIndirect ) ; }
org . junit . Assert . assertTrue ( areDependencyTypesDetected ( fromClass , toClass , typesToFind , true ) )
flatMapPrecedence ( ) { com . jnape . palatable . lambda . adt . hlist . Tuple3 < java . lang . String , java . lang . Integer , java . lang . Integer > a = com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 2 ) ; java . util . function . Function < java . lang . Integer , com . jnape . palatable . lambda . adt . hlist . Tuple3 < java . lang . String , java . lang . Integer , java . lang . Integer > > b = ( x ) -> tuple ( "bar" , 2 , ( x + 1 ) ) ; "<AssertPlaceHolder>" ; } flatMap ( java . util . function . Function ) { return new testsupport . EquatableM ( ma . flatMap ( f . andThen ( ( x ) -> x . < EquatableM < testsupport . M , testsupport . B > > coerce ( ) . ma ) ) , equatable ) ; }
org . junit . Assert . assertEquals ( com . jnape . palatable . lambda . adt . hlist . HList . tuple ( "foo" , 1 , 3 ) , a . flatMap ( b ) )
testGetViaAlternateCase ( ) { final io . swagger . client . ApiClient webClientUser2 = getWebClient ( io . dockstore . client . cli . USER_2_USERNAME ) ; io . swagger . client . api . OrganizationsApi organisationsApiUser2 = new io . swagger . client . api . OrganizationsApi ( webClientUser2 ) ; io . swagger . client . model . Organization organisation = stubOrgObject ( ) ; final io . swagger . client . model . Organization createdOrg = organisationsApiUser2 . createOrganization ( organisation ) ; java . lang . String alternateName = organisation . getName ( ) . toUpperCase ( ) ; final io . swagger . client . model . Organization organisationByName = organisationsApiUser2 . getOrganizationByName ( alternateName ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( organisationByName . getId ( ) , createdOrg . getId ( ) )
Should_getConstructedAndStoreAttributes ( ) { info . smart_tools . smartactors . email . email_actor . exception . SendFailureException exception = new info . smart_tools . smartactors . email . email_actor . exception . SendFailureException ( ) ; exception . addEmail ( "some_email" ) ; "<AssertPlaceHolder>" ; } getEmails ( ) { return emails ; }
org . junit . Assert . assertEquals ( exception . getEmails ( ) , java . util . Collections . singletonList ( "some_email" ) )
testMqttClientIsMemoized ( ) { org . powermock . api . mockito . PowerMockito . mockStatic ( org . pentaho . di . trans . step . mqtt . MQTTClientBuilder . class ) ; org . pentaho . di . trans . step . mqtt . MQTTClientBuilder clientBuilder = spy ( org . pentaho . di . trans . step . mqtt . MQTTClientBuilder . class ) ; org . eclipse . paho . client . mqttv3 . MqttClient mqttClient = mock ( org . eclipse . paho . client . mqttv3 . MqttClient . class ) ; doReturn ( mqttClient ) . when ( clientBuilder ) . buildAndConnect ( ) ; org . powermock . api . mockito . PowerMockito . when ( org . pentaho . di . trans . step . mqtt . MQTTClientBuilder . builder ( ) ) . thenReturn ( clientBuilder ) ; trans . startThreads ( ) ; trans . waitUntilFinished ( ) ; org . pentaho . di . trans . step . StepMetaDataCombi combi = trans . getSteps ( ) . get ( 1 ) ; org . pentaho . di . trans . step . mqtt . MQTTProducer step = ( ( org . pentaho . di . trans . step . mqtt . MQTTProducer ) ( combi . step ) ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( org . pentaho . di . core . util . Utils . isEmpty ( transMeta . getVariable ( "engine" ) ) ) { log . logBasic ( "Using<sp>legacy<sp>execution<sp>engine" ) ; return fallbackSupplier . get ( ) ; } org . pentaho . di . core . variables . Variables variables = new org . pentaho . di . core . variables . Variables ( ) ; variables . initializeVariablesFrom ( null ) ; java . lang . String protocol = transMeta . getVariable ( "engine.protocol" ) ; java . lang . String host = transMeta . getVariable ( "engine.host" ) ; java . lang . String port = transMeta . getVariable ( "engine.port" ) ; boolean ssl = ( "https" . equalsIgnoreCase ( protocol ) ) || ( "wss" . equalsIgnoreCase ( protocol ) ) ; return new org . pentaho . di . trans . ael . websocket . TransWebSocketEngineAdapter ( transMeta , host , port , ssl ) ; }
org . junit . Assert . assertEquals ( step . client . get ( ) , step . client . get ( ) )
testDetermineConstructor ( ) { java . lang . reflect . Constructor < java . lang . Integer > constructor = findConstructor ( at . ac . tuwien . infosys . jcloudscale . test . unit . Integer . class , new java . lang . Class < ? > [ ] { null } ) ; "<AssertPlaceHolder>" ; } findConstructor ( java . lang . Class , at . ac . tuwien . infosys . jcloudscale . utility . Class [ ] ) { java . lang . reflect . Constructor < T > constructor = null ; if ( ! ( org . apache . commons . lang . ArrayUtils . contains ( clazzes , null ) ) ) { try { constructor = type . getDeclaredConstructor ( clazzes ) ; } catch ( java . lang . NoSuchMethodException e ) { } } if ( constructor == null ) { java . util . List < java . lang . reflect . Constructor < T > > candidates = new java . util . ArrayList ( 1 ) ; for ( java . lang . reflect . Constructor < T > declaredConstructor : ( ( java . lang . reflect . Constructor < T > [ ] ) ( type . getDeclaredConstructors ( ) ) ) ) { if ( org . apache . commons . lang . ClassUtils . isAssignable ( clazzes , declaredConstructor . getParameterTypes ( ) ) ) { for ( int i = 0 ; i < ( candidates . size ( ) ) ; i ++ ) { java . lang . reflect . Constructor < T > candidate = candidates . get ( i ) ; if ( org . apache . commons . lang . ClassUtils . isAssignable ( declaredConstructor . getParameterTypes ( ) , candidate . getParameterTypes ( ) ) ) { candidates . remove ( candidate ) ; i -- ; } else if ( org . apache . commons . lang . ClassUtils . isAssignable ( candidate . getParameterTypes ( ) , declaredConstructor . getParameterTypes ( ) ) ) { declaredConstructor = null ; break ; } } if ( declaredConstructor != null ) { candidates . add ( declaredConstructor ) ; } } } if ( ( candidates . size ( ) ) != 1 ) { throw new java . lang . NoSuchMethodException ( java . lang . String . format ( "Cannot<sp>find<sp>distinct<sp>constructor<sp>for<sp>type<sp>'%s'<sp>with<sp>parameter<sp>types<sp>%s" , type , java . util . Arrays . toString ( clazzes ) ) ) ; } constructor = candidates . get ( 0 ) ; } if ( ( constructor != null ) && ( ! ( constructor . isAccessible ( ) ) ) ) constructor . setAccessible ( true ) ; return constructor ; }
org . junit . Assert . assertEquals ( at . ac . tuwien . infosys . jcloudscale . test . unit . Integer . class . getDeclaredConstructor ( java . lang . String . class ) , constructor )
testSetProvider ( ) { final java . lang . String name = "success-test" ; org . eclipse . microprofile . health . spi . HealthCheckResponseProvider provider = new com . ibm . ws . microprofile . health . spi . impl . HealthCheckResponseProviderImpl ( ) ; org . eclipse . microprofile . health . HealthCheckResponse . setResponseProvider ( provider ) ; org . eclipse . microprofile . health . HealthCheckResponseBuilder builder = provider . createResponseBuilder ( ) ; builder . name ( name ) ; org . eclipse . microprofile . health . HealthCheckResponse response = builder . build ( ) ; java . lang . String testName = response . getName ( ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( name , testName )
testHBaseConfigurationClassLoaderSetToAppContextClassLoader ( ) { java . lang . ClassLoader expectedClassLoader = org . apache . camel . component . hbase . HBaseComponentTest . class . getClassLoader ( ) ; org . apache . camel . CamelContext camelContext = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelContext . setApplicationContextClassLoader ( expectedClassLoader ) ; org . apache . camel . component . hbase . HBaseComponent component = new org . apache . camel . component . hbase . HBaseComponent ( new org . apache . camel . impl . DefaultCamelContext ( ) ) ; component . doStart ( ) ; component . doStop ( ) ; java . lang . ClassLoader actualClassLoader = component . getConfiguration ( ) . getClassLoader ( ) ; "<AssertPlaceHolder>" ; } getClassLoader ( ) { java . util . Set < java . net . URL > classpathURLs = new java . util . LinkedHashSet ( ) ; this . addRelevantProjectDependenciesToClasspath ( classpathURLs ) ; this . addExtraPluginDependenciesToClasspath ( classpathURLs ) ; this . addRelevantPluginDependenciesToClasspath ( classpathURLs ) ; if ( logClasspath ) { getLog ( ) . info ( "Classpath:" ) ; for ( java . net . URL url : classpathURLs ) { getLog ( ) . info ( ( "<sp>" + ( url . getFile ( ) . toString ( ) ) ) ) ; } } return new java . net . URLClassLoader ( classpathURLs . toArray ( new java . net . URL [ classpathURLs . size ( ) ] ) ) ; }
org . junit . Assert . assertSame ( expectedClassLoader , actualClassLoader )
shouldInstrumentIgnoringBranches ( ) { java . lang . String source = ( ( CommentsHandler . EXCL_BR_START ) + "\nvar<sp>x<sp>=<sp>x<sp>||<sp>7;" ) + ( CommentsHandler . EXCL_BR_STOP ) ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[2]++;\nvar<sp>x<sp>=<sp>x<sp>||<sp>7;\n" ; "<AssertPlaceHolder>" ; } instrumentSource ( java . lang . String ) { return instrumentSource ( uri , source ) ; }
org . junit . Assert . assertEquals ( expectedSource , instrumentedSource )
asyncTransaction ( ) { org . kurento . client . Transaction tx = kurentoClient . beginTransaction ( ) ; org . kurento . client . MediaPipeline pipeline = kurentoClient . createMediaPipeline ( ) ; org . kurento . client . PlayerEndpoint player = new org . kurento . client . PlayerEndpoint . Builder ( pipeline , ( ( "http://" + ( getTestFilesHttpPath ( ) ) ) + "/video/format/small.webm" ) ) . build ( ) ; org . kurento . client . HttpPostEndpoint httpEndpoint = new org . kurento . client . HttpPostEndpoint . Builder ( pipeline ) . build ( ) ; player . connect ( httpEndpoint ) ; org . kurento . client . test . util . AsyncResultManager < java . lang . Void > async = new org . kurento . client . test . util . AsyncResultManager ( "async<sp>start" ) ; tx . commit ( async . getContinuation ( ) ) ; async . waitForResult ( ) ; "<AssertPlaceHolder>" ; } isCommited ( ) { return ( objectStatus ) == ( org . kurento . client . internal . client . RemoteObject . ObjectStatus . CREATED ) ; }
org . junit . Assert . assertThat ( pipeline . isCommited ( ) , org . hamcrest . CoreMatchers . is ( true ) )
getZigBeeLinkKey ( ) { com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit transport = org . mockito . Mockito . mock ( com . zsmartsystems . zigbee . transport . ZigBeeTransportTransmit . class ) ; com . zsmartsystems . zigbee . ZigBeeNetworkManager manager = new com . zsmartsystems . zigbee . ZigBeeNetworkManager ( transport ) ; com . zsmartsystems . zigbee . security . ZigBeeKey key = new com . zsmartsystems . zigbee . security . ZigBeeKey ( ) ; org . mockito . Mockito . when ( transport . getTcLinkKey ( ) ) . thenReturn ( key ) ; "<AssertPlaceHolder>" ; } getZigBeeLinkKey ( ) { return transport . getTcLinkKey ( ) ; }
org . junit . Assert . assertEquals ( key , manager . getZigBeeLinkKey ( ) )
testPopulate ( ) { D dto = ( ( D ) ( this . translator . populate ( this . source , this . dest ) ) ) ; "<AssertPlaceHolder>" ; this . verifyOutput ( this . source , this . dest , false ) ; } populate ( org . candlepin . model . Pool , org . candlepin . model . ProductCurator ) { if ( source == null ) { throw new java . lang . IllegalArgumentException ( "source<sp>is<sp>null" ) ; } super . populate ( source ) ; this . setId ( source . getSubscriptionId ( ) ) ; this . setOwner ( source . getOwner ( ) ) ; this . setStartDate ( source . getStartDate ( ) ) ; this . setEndDate ( source . getEndDate ( ) ) ; this . setModified ( source . getUpdated ( ) ) ; this . setUpstreamEntitlementId ( source . getUpstreamEntitlementId ( ) ) ; this . setCdn ( source . getCdn ( ) ) ; this . setCertificate ( source . getCertificate ( ) ) ; this . setContractNumber ( source . getContractNumber ( ) ) ; this . setAccountNumber ( source . getAccountNumber ( ) ) ; this . setOrderNumber ( source . getOrderNumber ( ) ) ; this . setUpstreamPoolId ( source . getUpstreamPoolId ( ) ) ; this . setUpstreamEntitlementId ( source . getUpstreamEntitlementId ( ) ) ; this . setUpstreamConsumerId ( source . getUpstreamConsumerId ( ) ) ; this . setBranding ( source . getBranding ( ) ) ; this . setQuantityFromPool ( source ) ; this . setProduct ( ( ( source . getProduct ( ) ) != null ? new org . candlepin . model . dto . ProductData ( source . getProduct ( ) ) : null ) ) ; this . setDerivedProduct ( ( ( source . getDerivedProduct ( ) ) != null ? new org . candlepin . model . dto . ProductData ( source . getDerivedProduct ( ) ) : null ) ) ; java . util . Collection < org . candlepin . model . Product > products = productCurator . getPoolProvidedProductsCached ( source ) ; if ( products != null ) { java . util . Collection < org . candlepin . model . dto . ProductData > pdata = new java . util . LinkedList ( ) ; for ( org . candlepin . model . Product product : products ) { pdata . add ( product . toDTO ( ) ) ; } this . setProvidedProducts ( pdata ) ; } else { this . setProvidedProducts ( null ) ; } products = productCurator . getPoolDerivedProvidedProductsCached ( source ) ; if ( products != null ) { java . util . Collection < org . candlepin . model . dto . ProductData > pdata = new java . util . LinkedList ( ) ; for ( org . candlepin . model . Product product : products ) { pdata . add ( product . toDTO ( ) ) ; } this . setDerivedProvidedProducts ( pdata ) ; } else { this . setDerivedProvidedProducts ( null ) ; } return this ; }
org . junit . Assert . assertSame ( dto , this . dest )
whenFileIsNotFreshlyAdded_isNewAttributeShouldBeFalse ( ) { initGitFileSystem ( "/some_file.txt" ) ; "<AssertPlaceHolder>" ; } isNew ( java . lang . String ) { return ( ( boolean ) ( readAttribute ( path , com . beijunyi . parallelgit . filesystem . io . IS_NEW ) ) ) ; }
org . junit . Assert . assertFalse ( isNew ( "/some_file.txt" ) )
testDeleteDrugInfo ( ) { org . raxa . module . raxacore . DrugInfo drugInfo = new org . raxa . module . raxacore . DrugInfo ( ) ; drugInfo . setId ( 2 ) ; org . openmrs . Drug drug = new org . openmrs . Drug ( ) ; drug . setId ( 5 ) ; drug . setDrugId ( 5 ) ; drugInfo . setDrugId ( 5 ) ; drugInfo . setDrug ( drug ) ; drugInfo . setName ( "TestDrugInfo2" ) ; drugInfo . setDescription ( "Second<sp>Test<sp>DrugInfo" ) ; drugInfo . setCreator ( org . openmrs . api . context . Context . getUserContext ( ) . getAuthenticatedUser ( ) ) ; drugInfo . setDateCreated ( new java . util . Date ( ) ) ; drugInfo . setUuid ( "68547121-1b70-465e-99ee-c9dfd95e7d30" ) ; drugInfo . setRetired ( Boolean . FALSE ) ; dao . deleteDrugInfo ( drugInfo ) ; org . raxa . module . raxacore . DrugInfo result = dao . getDrugInfo ( 2 ) ; "<AssertPlaceHolder>" ; } getDrugInfo ( java . lang . Integer ) { return ( ( org . raxa . module . raxacore . DrugInfo ) ( sessionFactory . getCurrentSession ( ) . get ( org . raxa . module . raxacore . DrugInfo . class , drugInfoId ) ) ) ; }
org . junit . Assert . assertEquals ( null , result )
testConvertWithNoRelations ( ) { java . lang . String name = "name" ; java . lang . String abbrName = "abbr<sp>name" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; department . setAbbrName ( abbrName ) ; department . setBegDate ( begDate ) ; department . setEndDate ( endDate ) ; department . setName ( name ) ; org . lnu . is . resource . department . DepartmentResource expected = new org . lnu . is . resource . department . DepartmentResource ( ) ; expected . setAbbrName ( abbrName ) ; expected . setBegDate ( begDate ) ; expected . setEndDate ( endDate ) ; expected . setName ( name ) ; org . lnu . is . resource . department . DepartmentResource actual = unit . convert ( department ) ; "<AssertPlaceHolder>" ; } convert ( org . lnu . is . domain . admin . unit . AdminUnit ) { return convert ( source , new org . lnu . is . resource . adminunit . AdminUnitResource ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testRefreshNone ( ) { test ( "refresh<sp>table<sp>metadata<sp>columns<sp>none<sp>dfs.`%s`" , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; checkForMetadataFile ( org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; java . lang . String query = java . lang . String . format ( ( "select<sp>dir0,<sp>dir1,<sp>o_custkey,<sp>o_orderdate<sp>from<sp>dfs.`%s`<sp>" + "<sp>where<sp>dir0=1994<sp>and<sp>dir1<sp>in<sp>('Q1',<sp>'Q2')" ) , org . apache . drill . exec . store . parquet . TestParquetMetadataCache . TABLE_NAME_1 ) ; int expectedRowCount = 20 ; int actualRowCount = testSql ( query ) ; "<AssertPlaceHolder>" ; } testSql ( java . lang . String ) { return org . apache . drill . test . BaseTestQuery . testRunAndPrint ( QueryType . SQL , query ) ; }
org . junit . Assert . assertEquals ( expectedRowCount , actualRowCount )
testIterator ( ) { org . pb . x12 . Segment s = new org . pb . x12 . Segment ( new org . pb . x12 . Context ( '~' , '*' , ':' ) ) ; s . addElements ( "ISA" , "ISA01" , "ISA02" , "ISA03" ) ; "<AssertPlaceHolder>" ; } iterator ( ) { return segments . iterator ( ) ; }
org . junit . Assert . assertNotNull ( s . iterator ( ) )
testBug1183 ( ) { org . eclipse . ceylon . common . tool . ToolModel < org . eclipse . ceylon . compiler . CeylonCompileTool > model = pluginLoader . loadToolModel ( "compile" ) ; "<AssertPlaceHolder>" ; org . eclipse . ceylon . compiler . CeylonCompileTool tool = pluginFactory . bindArguments ( model , getMainTool ( ) , toolOptions ( "--src=test/src" , "org.eclipse.ceylon.tools.test.bug1183" ) ) ; try { tool . run ( ) ; org . junit . Assert . fail ( "Tool<sp>should<sp>have<sp>thrown<sp>an<sp>exception" ) ; } catch ( org . eclipse . ceylon . compiler . CompilerErrorException e ) { } }
org . junit . Assert . assertNotNull ( model )
testDateFunctionInOrder ( ) { java . lang . String startDateString = "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String endDateString = "Wed<sp>Apr<sp>9<sp>10:30:57<sp>GMT<sp>2014" ; java . lang . String UPTIME = "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 3 ; java . lang . String dateFormat = "%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y" ; java . lang . String colName = ( ( ( "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 2 + UPTIME ) + "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 0 ) + dateFormat ) + "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 4 ; java . lang . String conditions = ( ( ( ( colName + "<sp>BETWEEN<sp>STR_TO_DATE('" ) + startDateString ) + "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 5 ) + endDateString ) + "',<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')" ; java . lang . String order = "STR_TO_DATE(`UPTIME.0`,<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')" ; java . lang . String sql = crq . generateSql ( "v" , null , conditions , null , ( ( ( order + "Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014" 1 ) + order ) + "<sp>ASC" ) , "me" , null ) ; java . lang . String want = "SELECT<sp>*<sp>FROM<sp>v<sp>WHERE<sp>_user_<sp>=<sp>'me'<sp>AND<sp>(STR_TO_DATE(`UPTIME.0`,<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')<sp>BETWEEN<sp>STR_TO_DATE('Tue<sp>Apr<sp>8<sp>10:30:57<sp>GMT<sp>2014',<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')<sp>AND<sp>STR_TO_DATE('Wed<sp>Apr<sp>9<sp>10:30:57<sp>GMT<sp>2014',<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y'))<sp>ORDER<sp>BY<sp>STR_TO_DATE(`UPTIME.0`,<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')<sp>DESC,STR_TO_DATE(`UPTIME.0`,<sp>'%a<sp>%b<sp>%e<sp>%H:%i:%s<sp>GMT<sp>%Y')<sp>ASC" ; "<AssertPlaceHolder>" ; } generateSql ( java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . lang . String , java . sql . Connection ) { datawave . webservice . results . cached . CachedResultsParameters . validate ( view ) ; java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; if ( org . apache . commons . lang . StringUtils . isEmpty ( org . apache . commons . lang . StringUtils . trimToNull ( fields ) ) ) fields = "*" ; if ( org . apache . commons . lang . StringUtils . isEmpty ( org . apache . commons . lang . StringUtils . trimToNull ( conditions ) ) ) conditions = null ; if ( org . apache . commons . lang . StringUtils . isEmpty ( org . apache . commons . lang . StringUtils . trimToNull ( order ) ) ) order = null ; if ( org . apache . commons . lang . StringUtils . isEmpty ( org . apache . commons . lang . StringUtils . trimToNull ( grouping ) ) ) grouping = null ; if ( null == ( this . viewColumnNames ) ) this . viewColumnNames = this . getViewColumnNames ( connection , view ) ; if ( ! ( fields . equals ( "*" ) ) ) { java . util . LinkedHashSet < java . lang . String > fieldSet = new java . util . LinkedHashSet ( ) ; java . lang . String [ ] result = datawave . webservice . results . cached . CachedRunningQuery . tokenizeOutsideParens ( fields , ',' ) ; java . util . LinkedHashSet < java . lang . String > requestedFieldSet = new java . util . LinkedHashSet ( ) ; for ( java . lang . String s : result ) { s = s . replace ( "`" , "" ) . trim ( ) ; s = quoteField ( s ) ; requestedFieldSet . add ( s ) ; } if ( ( requestedFieldSet . contains ( "*" ) ) == true ) { requestedFieldSet . remove ( "*" ) ; fieldSet . add ( "*" ) ; } else { fieldSet . addAll ( datawave . webservice . query . cachedresults . CacheableQueryRow . getFixedColumnSet ( ) ) ; } fieldSet . addAll ( requestedFieldSet ) ; fields = org . apache . commons . lang . StringUtils . join ( fieldSet , "'<sp>AND<sp>(" 4 ) ; } if ( null != conditions ) { java . lang . StringBuilder newConditions = new java . lang . StringBuilder ( ) ; java . lang . String [ ] conditionsSplit = conditions . split ( "<sp>" ) ; for ( java . lang . String s : conditionsSplit ) { java . lang . String field = s . replace ( "`" , "" ) . trim ( ) ; if ( ( variableFields . contains ( field ) ) || ( isFunction ( field ) ) ) { newConditions . append ( quoteField ( field ) ) . append ( datawave . webservice . results . cached . CachedRunningQuery . SPACE ) ; } else { newConditions . append ( s ) . append ( datawave . webservice . results . cached . CachedRunningQuery . SPACE ) ; } } if ( newConditions . toString ( ) . trim ( ) . isEmpty ( ) ) { conditions = null ; } else { conditions = newConditions . toString ( ) . trim ( ) ; } } order = buildOrderClause ( order ) ; if ( null != grouping ) { java . util . List < java . lang . String > newGroup = new java . util . ArrayList ( ) ; java . lang . String [ ] groupSplit = grouping . split ( "'<sp>AND<sp>(" 4 ) ; for ( java . lang . String s : groupSplit ) { s = s . replace ( "`" , "" ) . trim ( ) ; newGroup . add ( quoteField ( s ) ) ; } if ( newGroup . isEmpty ( ) ) { grouping = null ; } else { grouping = org . apache . commons . lang . StringUtils . join ( newGroup , "'<sp>AND<sp>(" 4 ) ; } } if ( ( conditions == null ) || ( conditions . isEmpty ( ) ) ) { conditions = ( "'<sp>AND<sp>(" 3 + user ) + "'" ; } else { conditions = ( ( ( "'<sp>AND<sp>(" 3 + user ) + "'<sp>AND<sp>(" ) + conditions ) + ")" ; } buf . append ( "'<sp>AND<sp>(" 2 ) . append ( fields ) . append ( "'<sp>AND<sp>(" 5 ) . append ( view ) ; if ( null != conditions ) buf . append ( "<sp>WHERE<sp>" ) . append ( conditions ) ; if
org . junit . Assert . assertEquals ( want , sql )
testHonorSystemProxyIsFalseByDefault ( ) { "<AssertPlaceHolder>" ; } honorSystemProxy ( ) { return honorSystemProxy ; }
org . junit . Assert . assertFalse ( configuration . honorSystemProxy ( ) )
serializationRoundTripWithJackson ( ) { com . fasterxml . jackson . databind . ObjectMapper objectMapper = new com . fasterxml . jackson . databind . ObjectMapper ( ) ; objectMapper . disable ( com . fasterxml . jackson . databind . DeserializationFeature . UNWRAP_ROOT_VALUE ) ; objectMapper . disable ( com . fasterxml . jackson . databind . SerializationFeature . WRAP_ROOT_VALUE ) ; com . yubico . u2f . data . DeviceRegistration input = getDeviceRegistration ( ) ; java . lang . String json = objectMapper . writeValueAsString ( input ) ; com . yubico . u2f . data . DeviceRegistration output = objectMapper . readValue ( json , com . yubico . u2f . data . DeviceRegistration . class ) ; "<AssertPlaceHolder>" ; } getDeviceRegistration ( ) { com . yubico . u2f . data . messages . key . Client client = new com . yubico . u2f . data . messages . key . Client ( new com . yubico . u2f . softkey . SoftKey ( ) ) ; return client . register ( ) ; }
org . junit . Assert . assertEquals ( input , output )
testLoopedReplication ( ) { org . apache . hadoop . hbase . replication . TestMasterReplication . LOG . info ( "testLoopedReplication" ) ; startMiniClusters ( 1 ) ; createTableOnClusters ( table ) ; addPeer ( "1" , 0 , 0 ) ; java . lang . Thread . sleep ( org . apache . hadoop . hbase . replication . TestMasterReplication . SLEEP_TIME ) ; final org . apache . hadoop . hbase . ServerName rsName = utilities [ 0 ] . getHBaseCluster ( ) . getRegionServer ( 0 ) . getServerName ( ) ; org . apache . hadoop . hbase . Waiter . waitFor ( baseConfiguration , 10000 , new org . apache . hadoop . hbase . Waiter . Predicate < java . lang . Exception > ( ) { @ java . lang . Override public boolean evaluate ( ) throws java . lang . Exception { org . apache . hadoop . hbase . ClusterMetrics clusterStatus = utilities [ 0 ] . getAdmin ( ) . getClusterMetrics ( java . util . EnumSet . of ( ClusterMetrics . Option . LIVE_SERVERS ) ) ; org . apache . hadoop . hbase . ServerMetrics serverLoad = clusterStatus . getLiveServerMetrics ( ) . get ( rsName ) ; List < org . apache . hadoop . hbase . replication . ReplicationLoadSource > replicationLoadSourceList = serverLoad . getReplicationLoadSourceList ( ) ; return replicationLoadSourceList . isEmpty ( ) ; } } ) ; org . apache . hadoop . hbase . client . Table [ ] htables = getHTablesOnClusters ( org . apache . hadoop . hbase . replication . TestMasterReplication . tableName ) ; putAndWait ( org . apache . hadoop . hbase . replication . TestMasterReplication . row , org . apache . hadoop . hbase . replication . TestMasterReplication . famName , htables [ 0 ] , htables [ 0 ] ) ; rollWALAndWait ( utilities [ 0 ] , table . getTableName ( ) , org . apache . hadoop . hbase . replication . TestMasterReplication . row ) ; org . apache . hadoop . hbase . zookeeper . ZKWatcher zkw = utilities [ 0 ] . getZooKeeperWatcher ( ) ; java . lang . String queuesZnode = org . apache . hadoop . hbase . zookeeper . ZNodePaths . joinZNode ( zkw . getZNodePaths ( ) . baseZNode , org . apache . hadoop . hbase . zookeeper . ZNodePaths . joinZNode ( "replication" , "rs" ) ) ; java . util . List < java . lang . String > listChildrenNoWatch = org . apache . hadoop . hbase . zookeeper . ZKUtil . listChildrenNoWatch ( zkw , org . apache . hadoop . hbase . zookeeper . ZNodePaths . joinZNode ( queuesZnode , rsName . toString ( ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 0 , listChildrenNoWatch . size ( ) )
testCacheFetchOffsetAndLimit ( ) { org . apache . cayenne . map . EntityResolver resolver = runtime . getDataDomain ( ) . getEntityResolver ( ) ; org . apache . cayenne . query . ProcedureQuery q1 = new org . apache . cayenne . query . ProcedureQuery ( "ABC" , org . apache . cayenne . testdo . testmap . Artist . class ) ; q1 . setCacheStrategy ( QueryCacheStrategy . SHARED_CACHE ) ; q1 . setFetchOffset ( 5 ) ; q1 . setFetchLimit ( 3 ) ; org . apache . cayenne . query . ProcedureQuery q2 = new org . apache . cayenne . query . ProcedureQuery ( "ABC" , org . apache . cayenne . testdo . testmap . Artist . class ) ; q2 . setCacheStrategy ( QueryCacheStrategy . SHARED_CACHE ) ; q2 . setFetchOffset ( 5 ) ; q2 . setFetchLimit ( 3 ) ; "<AssertPlaceHolder>" ; } getMetaData ( org . apache . cayenne . map . EntityResolver ) { final org . apache . cayenne . query . QueryMetadata metadata = query . getMetaData ( resolver ) ; return new org . apache . cayenne . query . QueryMetadataProxy ( metadata ) { public org . apache . cayenne . query . Query getOriginatingQuery ( ) { return null ; } public org . apache . cayenne . remote . String getCacheKey ( ) { return cacheKey ; } } ; }
org . junit . Assert . assertEquals ( q1 . getMetaData ( resolver ) . getCacheKey ( ) , q2 . getMetaData ( resolver ) . getCacheKey ( ) )
testSetBoundResetsOffset ( ) { builder . setLimit ( 25 , ( - 1 ) ) ; builder . setLimit ( v , ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getOffset ( ) { return offset ; }
org . junit . Assert . assertEquals ( 0 , builder . getOffset ( ) )
testObtainsClientIpFrom_WL_Proxy_Client_IP ( ) { request . setHeader ( "WL-Proxy-Client-IP" , "12.34.56.78" ) ; com . eclipsesource . tabris . tracking . TrackingInfo info = com . eclipsesource . tabris . tracking . internal . TrackingInfoFactory . createInfo ( ui . getDisplay ( ) ) ; java . lang . String ip = info . getClientIp ( ) ; "<AssertPlaceHolder>" ; } getClientIp ( ) { return clientIp ; }
org . junit . Assert . assertEquals ( "12.34.56.78" , ip )
testDeleteNetwork_Null ( ) { org . easymock . EasyMock . expect ( computeRpcMock . deleteNetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . NETWORK_ID . getNetwork ( ) , com . google . cloud . compute . deprecated . ComputeImplTest . EMPTY_RPC_OPTIONS ) ) . andReturn ( null ) ; org . easymock . EasyMock . replay ( computeRpcMock ) ; compute = options . getService ( ) ; "<AssertPlaceHolder>" ; } deleteNetwork ( com . google . cloud . compute . v1 . ProjectGlobalNetworkName ) { com . google . cloud . compute . v1 . DeleteNetworkHttpRequest request = com . google . cloud . compute . v1 . DeleteNetworkHttpRequest . newBuilder ( ) . setNetwork ( ( network == null ? null : network . toString ( ) ) ) . build ( ) ; return deleteNetwork ( request ) ; }
org . junit . Assert . assertNull ( compute . deleteNetwork ( com . google . cloud . compute . deprecated . ComputeImplTest . NETWORK_ID ) )
matchRequiredVersions_shouldAllowSingleEntryForRequiredVersion ( ) { java . lang . String openmrsVersion = "1.4.3" ; java . lang . String requiredOpenmrsVersion = "1.4.2" ; "<AssertPlaceHolder>" ; } matchRequiredVersions ( java . lang . String , java . lang . String ) { if ( org . apache . commons . lang3 . StringUtils . isNotEmpty ( versionRange ) ) { java . lang . String [ ] ranges = versionRange . split ( "^\\s?\\d+[\\.\\d+\\*?|\\.\\*]+" 1 ) ; for ( java . lang . String range : ranges ) { java . lang . String separator = "-" ; if ( ( ( range . indexOf ( "*" ) ) > 0 ) || ( ( ( range . indexOf ( separator ) ) > 0 ) && ( ! ( org . openmrs . module . ModuleUtil . isVersionWithQualifier ( range ) ) ) ) ) { java . lang . String lowerBound = range ; java . lang . String upperBound = range ; int indexOfSeparator = range . indexOf ( separator ) ; while ( indexOfSeparator > 0 ) { lowerBound = range . substring ( 0 , indexOfSeparator ) ; upperBound = range . substring ( ( indexOfSeparator + 1 ) ) ; if ( upperBound . matches ( "^\\s?\\d+[\\.\\d+\\*?|\\.\\*]+" 0 ) ) { break ; } indexOfSeparator = range . indexOf ( separator , ( indexOfSeparator + 1 ) ) ; } lowerBound = org . apache . commons . lang3 . StringUtils . remove ( lowerBound , lowerBound . replaceAll ( "^\\s?\\d+[\\.\\d+\\*?|\\.\\*]+" , "" ) ) ; upperBound = org . apache . commons . lang3 . StringUtils . remove ( upperBound , upperBound . replaceAll ( "^\\s?\\d+[\\.\\d+\\*?|\\.\\*]+" , "" ) ) ; if ( ( lowerBound . indexOf ( "*" ) ) > 0 ) { lowerBound = lowerBound . replaceAll ( "\\*" , "0" ) ; } if ( ( upperBound . indexOf ( "*" ) ) > 0 ) { upperBound = upperBound . replaceAll ( "\\*" , java . lang . Integer . toString ( Integer . MAX_VALUE ) ) ; } int lowerReturn = org . openmrs . module . ModuleUtil . compareVersion ( version , lowerBound ) ; int upperReturn = org . openmrs . module . ModuleUtil . compareVersion ( version , upperBound ) ; if ( ( lowerReturn < 0 ) || ( upperReturn > 0 ) ) { org . openmrs . module . ModuleUtil . log . debug ( ( ( ( ( ( "Version<sp>" + version ) + "<sp>is<sp>not<sp>between<sp>" ) + lowerBound ) + "<sp>and<sp>" ) + upperBound ) ) ; } else { return true ; } } else { if ( ( org . openmrs . module . ModuleUtil . compareVersion ( version , range ) ) < 0 ) { org . openmrs . module . ModuleUtil . log . debug ( ( ( ( "Version<sp>" + version ) + "<sp>is<sp>below<sp>" ) + range ) ) ; } else { return true ; } } } } else { return true ; } return false ; }
org . junit . Assert . assertTrue ( org . openmrs . module . ModuleUtil . matchRequiredVersions ( openmrsVersion , requiredOpenmrsVersion ) )
stringReturnMethodTest ( ) { "<AssertPlaceHolder>" ; } methodReturnsString ( ) { return "XXXX" ; }
org . junit . Assert . assertEquals ( obj . methodReturnsString ( ) , "XXXX" )
ComplexTypeProperty ( ) { java . lang . String testENTITY = "testEntity" ; org . odata4j . edm . EdmEntityType . Builder entityType = EntityType ( testENTITY ) ; java . util . List < org . odata4j . edm . EdmComplexType . Builder > cpBuilderList = new java . util . ArrayList < org . odata4j . edm . EdmComplexType . Builder > ( ) ; org . odata4j . edm . EdmComplexType . Builder ctBuilder = EntityTypecomplexProperty1 ( "newComplexType" , entityType ) ; cpBuilderList . add ( ctBuilder ) ; EntityTypesimpleProperty ( 84 , entityType ) ; org . odata4j . edm . EdmDataServices . Builder builder = org . odata4j . edm . EdmDataServices . newBuilder ( ) ; ComplexTypesimpleProperty ( 49 , ctBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder = ComplexTypecomplexProperty ( 5 , "newComplexType2" , ctBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder ) ; ComplexTypesimpleProperty ( 30 , targetComplexTypeBuilder ) ; org . odata4j . edm . EdmComplexType . Builder targetComplexTypeBuilder2 = ComplexTypecomplexProperty ( 2 , "newComplexType3" , targetComplexTypeBuilder ) ; cpBuilderList . add ( targetComplexTypeBuilder2 ) ; ComplexTypesimpleProperty ( 10 , targetComplexTypeBuilder2 ) ; org . odata4j . edm . EdmSchema . Builder schema = org . odata4j . edm . EdmSchema . newBuilder ( ) . addEntityTypes ( entityType ) . setNamespace ( com . fujitsu . dc . test . unit . core . model . impl . es . odata . PropertyLimitCheckerTest . NS ) . addComplexTypes ( cpBuilderList ) ; org . odata4j . edm . EdmDataServices metadata = builder . addSchemas ( schema ) . build ( ) ; com . fujitsu . dc . core . model . impl . es . doc . PropertyDocHandler handler = new com . fujitsu . dc . core . model . impl . es . doc . ComplexTypePropertyDocHandler ( ) ; org . json . simple . JSONObject staticFields = new org . json . simple . JSONObject ( ) ; staticFields . put ( "Type" , "Edm.String" ) ; handler . setStaticFields ( staticFields ) ; java . util . Map < java . lang . String , java . lang . String > entityTypeMap = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; entityTypeMap . put ( "_ComplexType.Name_uniqueKey" , "newComplexType" ) ; handler . setEntityTypeMap ( entityTypeMap ) ; handler . setEntityTypeId ( "_uniqueKey" ) ; java . util . Map < java . lang . String , java . lang . Object > manyToOneKindMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; manyToOneKindMap . put ( ComplexType . EDM_TYPE_NAME , "_uniqueKey" ) ; handler . setManyToOnelinkId ( manyToOneKindMap ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker checker = new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker ( metadata , handler ) ; java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > errors = checker . checkPropertyLimits ( ) ; "<AssertPlaceHolder>" ; } checkPropertyLimits ( ) { java . util . List < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > result = new java . util . ArrayList < com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError > ( ) ; if ( null == ( metadata ) ) { return result ; } java . util . Iterator < org . odata4j . edm . EdmEntityType > iter = metadata . getEntityTypes ( ) . iterator ( ) ; while ( iter . hasNext ( ) ) { org . odata4j . edm . EdmEntityType target = iter . next ( ) ; checkPropertyLimitsForEntityTypeInternal ( result , target ) ; } java . util . Iterator < org . odata4j . edm . EdmComplexType > complexTypeIter = metadata . getComplexTypes ( ) . iterator ( ) ; while ( complexTypeIter . hasNext ( ) ) { int simplePropCount = 0 ; int complexPropCount = 0 ; org . odata4j . edm . EdmComplexType complexType = complexTypeIter . next ( ) ; for ( org . odata4j . edm . EdmProperty prop : complexType . getProperties ( ) ) { if ( prop . getName ( ) . startsWith ( "_" ) ) { continue ; } if ( prop . getType ( ) . isSimple ( ) ) { simplePropCount ++ ; } else { complexPropCount ++ ; } } if ( ( simpleMaxForOverAllLayers ) < simplePropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , simpleMaxForOverAllLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) ) ; } if ( ( complexMaxForOverallLayers ) < complexPropCount ) { java . lang . String message = java . lang . String . format ( "Total<sp>property[%s]<sp>count<sp>exceeds<sp>the<sp>limit[%d]." , complexType . getName ( ) , complexMaxForOverallLayers ) ; com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . log . info ( message ) ; result . add ( new com . fujitsu . dc . core . model . impl . es . odata . PropertyLimitChecker . CheckError ( complexType . getName ( ) , message ) )
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
searchBadWordsTestTraditionalInvalid ( ) { final java . lang . String src = "" ; "<AssertPlaceHolder>" ; } searchBadWords ( java . lang . String ) { source = source . replaceAll ( "\\s" , "" ) ; for ( java . lang . String badWord : org . mewx . wenku8 . global . api . Wenku8API . badWords ) { if ( source . contains ( badWord ) ) { return badWord ; } } return null ; }
org . junit . Assert . assertEquals ( "" , org . mewx . wenku8 . global . api . Wenku8API . searchBadWords ( src ) )
testCreateComment ( ) { org . eclipse . vorto . repository . comment . Comment comment = new org . eclipse . vorto . repository . comment . Comment ( org . eclipse . vorto . model . ModelId . fromReference ( "org.eclipse.vorto.examples.type.Color" , "1.0.0" ) , "erle" , "test<sp>comment" ) ; org . eclipse . vorto . repository . comment . Comment dto = org . eclipse . vorto . repository . web . core . ModelDtoFactory . createDto ( comment , org . eclipse . vorto . repository . core . impl . UserContext . user ( "anon" ) ) ; "<AssertPlaceHolder>" ; } getAuthor ( ) { return this . author ; }
org . junit . Assert . assertEquals ( "erle" , dto . getAuthor ( ) )
canSerializeBytes ( ) { java . lang . String field = "{<sp>\"name\":\"bytes1\",<sp>\"type\":\"bytes\"<sp>}" ; java . nio . ByteBuffer bb = java . nio . ByteBuffer . wrap ( "easy<sp>as<sp>one<sp>two<sp>three" . getBytes ( ) ) ; bb . rewind ( ) ; org . apache . avro . generic . GenericRecord r = serializeAndDeserialize ( field , "bytes1" , bb ) ; "<AssertPlaceHolder>" ; } serializeAndDeserialize ( java . lang . String , java . lang . String , java . lang . Object ) { org . apache . avro . Schema s = buildSchema ( recordValue ) ; org . apache . avro . generic . GenericData . Record r = new org . apache . avro . generic . GenericData . Record ( s ) ; r . put ( fieldName , fieldValue ) ; com . linkedin . haivvreo . AvroSerializer as = new com . linkedin . haivvreo . AvroSerializer ( ) ; com . linkedin . haivvreo . AvroDeserializer ad = new com . linkedin . haivvreo . AvroDeserializer ( ) ; com . linkedin . haivvreo . AvroObjectInspectorGenerator aoig = new com . linkedin . haivvreo . AvroObjectInspectorGenerator ( s ) ; org . apache . hadoop . hive . serde2 . objectinspector . ObjectInspector oi = aoig . getObjectInspector ( ) ; com . linkedin . haivvreo . List < java . lang . String > columnNames = aoig . getColumnNames ( ) ; com . linkedin . haivvreo . List < org . apache . hadoop . hive . serde2 . typeinfo . TypeInfo > columnTypes = aoig . getColumnTypes ( ) ; com . linkedin . haivvreo . AvroGenericRecordWritable agrw = com . linkedin . haivvreo . Utils . serializeAndDeserializeRecord ( r ) ; java . lang . Object obj = ad . deserialize ( columnNames , columnTypes , agrw , s ) ; org . apache . hadoop . io . Writable result = as . serialize ( obj , oi , columnNames , columnTypes , s ) ; org . junit . Assert . assertTrue ( ( result instanceof com . linkedin . haivvreo . AvroGenericRecordWritable ) ) ; org . apache . avro . generic . GenericRecord r2 = ( ( com . linkedin . haivvreo . AvroGenericRecordWritable ) ( result ) ) . getRecord ( ) ; org . junit . Assert . assertEquals ( s , r2 . getSchema ( ) ) ; return r2 ; }
org . junit . Assert . assertEquals ( bb , r . get ( "bytes1" ) )
testInvalidField ( ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . getDocument ( new org . nuxeo . ecm . core . api . PathRef ( "/folder/doc1" ) ) ; java . lang . String jsonDoc = getDocumentAsJson ( doc , "vocabularies_invalid_field" ) ; org . codehaus . jackson . JsonNode node = parseJson ( jsonDoc ) ; org . codehaus . jackson . JsonNode vocabs = node . get ( "contextParameters" ) . get ( "vocabularies_invalid_field" ) ; "<AssertPlaceHolder>" ; } size ( ) { return vars . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , vocabs . size ( ) )
testImageServerMultipart ( ) { com . mashape . unirest . http . JsonNode jsonNode = com . mashape . unirest . http . Unirest . post ( "http://localhost:9060/transformimage" ) . header ( "accept" , "application/json" ) . field ( "file1" , new org . nd4j . linalg . io . ClassPathResource ( "testimages/class0/0.jpg" ) . getFile ( ) ) . field ( "file2" , new org . nd4j . linalg . io . ClassPathResource ( "testimages/class0/1.png" ) . getFile ( ) ) . field ( "file3" , new org . nd4j . linalg . io . ClassPathResource ( "testimages/class0/2.jpg" ) . getFile ( ) ) . asJson ( ) . getBody ( ) ; org . nd4j . linalg . api . ndarray . INDArray batchResult = getNDArray ( jsonNode ) ; "<AssertPlaceHolder>" ; System . out . println ( batchResult ) ; } getNDArray ( com . mashape . unirest . http . JsonNode ) { return org . nd4j . serde . base64 . Nd4jBase64 . fromBase64 ( node . getObject ( ) . getString ( "ndarray" ) ) ; }
org . junit . Assert . assertEquals ( 3 , batchResult . size ( 0 ) )
validate_shouldFailValidationIfPatientIdentifierTypeNameAlreadyExist ( ) { org . openmrs . PatientIdentifierType type = new org . openmrs . PatientIdentifierType ( ) ; type . setName ( "OpenMRS<sp>Identification<sp>Number" ) ; type . setDescription ( "helps" ) ; java . lang . String valid50charInput = "12345678901234567890123456789012345678901234567890" ; type . setFormat ( valid50charInput ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( type , "type" ) ; new org . openmrs . validator . PatientIdentifierTypeValidator ( ) . validate ( type , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertTrue ( errors . hasErrors ( ) )
testSize ( ) { boolean expResult = true ; javax . xml . xpath . XPathExpression expr = xpath . compile ( "//xs:element[@name='sizeField']//xs:minLength/@value<sp>=<sp>7<sp>and<sp>//xs:element[@name='sizeField']//xs:maxLength/@value<sp>=<sp>8" ) ; boolean result = ( ( java . lang . Boolean ) ( expr . evaluate ( schemaDocument , XPathConstants . BOOLEAN ) ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expResult , result )
illegalCharInCookieNameMakesStrictEncoderThrowsException ( ) { java . util . Set < java . lang . Character > illegalChars = new java . util . HashSet < java . lang . Character > ( ) ; for ( int i = 0 ; i <= 31 ; i ++ ) { illegalChars . add ( ( ( char ) ( i ) ) ) ; } illegalChars . add ( ( ( char ) ( 127 ) ) ) ; for ( char c : new char [ ] { '(' , ')' , '<' , '>' , '@' , ',' , ';' , ':' , '\\' , '"' , '/' , '[' , ']' , '?' , '=' , '{' , '}' , '<sp>' , '\t' } ) { illegalChars . add ( c ) ; } int exceptions = 0 ; for ( char c : illegalChars ) { try { ServerCookieEncoder . STRICT . encode ( new io . netty . handler . codec . http . cookie . DefaultCookie ( ( ( "foo" + c ) + "bar" ) , "value" ) ) ; } catch ( java . lang . IllegalArgumentException e ) { exceptions ++ ; } } "<AssertPlaceHolder>" ; } size ( ) { return size ; }
org . junit . Assert . assertEquals ( illegalChars . size ( ) , exceptions )
testStringWithoutWildcard ( ) { java . util . Collection < java . lang . String > serverPaths = new java . util . ArrayList ( ) ; serverPaths . add ( "/home/joseph/test/hi-lib-dal-mongo/somefile.java" ) ; java . util . Collection < java . lang . String > filters = new java . util . ArrayList ( ) ; filters . add ( "hi-lib-dal" ) ; "<AssertPlaceHolder>" ; } changesMatchFilter ( java . util . Collection , java . util . Collection ) { if ( org . apache . commons . collections . CollectionUtils . isEmpty ( filters ) ) { return true ; } for ( java . lang . String path : serverPaths ) { path = hudson . plugins . accurev . CheckForChanges . sanitizeSlashes ( path ) ; for ( java . lang . String filter : filters ) { if ( hudson . plugins . accurev . CheckForChanges . pathMatcher ( path , filter ) ) { return true ; } } } return false ; }
org . junit . Assert . assertFalse ( hudson . plugins . accurev . CheckForChanges . changesMatchFilter ( serverPaths , filters ) )
extractSelectorsLuceneQuery1 ( ) { datawave . audit . DatawaveSelectorExtractor extractor = new datawave . audit . DatawaveSelectorExtractor ( ) ; datawave . webservice . query . QueryImpl q = new datawave . webservice . query . QueryImpl ( ) ; q . setQuery ( "FIELD1:selector1" ) ; java . util . List < java . lang . String > selectorList = extractor . extractSelectors ( q ) ; java . util . List < java . lang . String > expected = com . google . common . collect . Lists . newArrayList ( "selector1" ) ; "<AssertPlaceHolder>" ; } extractSelectors ( datawave . webservice . query . Query ) { java . util . List < java . lang . String > selectorList = new java . util . ArrayList ( ) ; java . util . List < org . apache . commons . jexl2 . parser . ASTEQNode > eqNodes = null ; datawave . query . language . tree . QueryNode node = null ; org . apache . commons . jexl2 . parser . ASTJexlScript jexlScript = null ; try { jexlScript = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( query . getQuery ( ) ) ; } catch ( java . lang . Throwable t1 ) { try { node = luceneToJexlParser . parse ( query . getQuery ( ) ) ; java . lang . String jexlQuery = node . getOriginalQuery ( ) ; jexlScript = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( jexlQuery ) ; } catch ( java . lang . Throwable t2 ) { } } if ( jexlScript != null ) { eqNodes = datawave . query . jexl . JexlASTHelper . getPositiveEQNodes ( jexlScript ) ; } for ( org . apache . commons . jexl2 . parser . ASTEQNode n : eqNodes ) { java . lang . Object literal = datawave . query . jexl . JexlASTHelper . getLiteralValue ( n ) ; if ( literal != null ) { selectorList . add ( literal . toString ( ) ) ; } } return selectorList ; }
org . junit . Assert . assertEquals ( expected , selectorList )
testAcceptExcludeMessage ( ) { com . ibm . websphere . logging . hpel . reader . LogQueryBean lqb = new com . ibm . websphere . logging . hpel . reader . LogQueryBean ( ) ; lqb . setExcludeMessages ( new java . lang . String [ ] { "*Hello*" } ) ; com . ibm . websphere . logging . hpel . reader . LogRecordFilter lrf = new com . ibm . websphere . logging . hpel . reader . filters . MultipleCriteriaFilter ( lqb ) ; com . ibm . ws . logging . object . hpel . RepositoryLogRecordImpl r = new com . ibm . ws . logging . object . hpel . RepositoryLogRecordImpl ( ) ; r . setMessage ( "Hello<sp>world!" ) ; "<AssertPlaceHolder>" ; } accept ( java . io . File ) { boolean accepted = pathname . getName ( ) . toLowerCase ( ) . endsWith ( ".cs" ) ; if ( accepted ) checksumFiles . add ( pathname ) ; return accepted ; }
org . junit . Assert . assertFalse ( lrf . accept ( r ) )