input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testStartRemovedAsParent ( ) { final org . apache . oozie . fluentjob . api . dag . Start instance = getInstance ( "instance" ) ; final org . apache . oozie . fluentjob . api . dag . NodeBase child = new org . apache . oozie . fluentjob . api . dag . ExplicitNode ( "child" , null ) ; child . addParent ( instance ) ; child . removeParent ( instance ) ; "<AssertPlaceHolder>" ; } getChild ( ) { return child ; }
org . junit . Assert . assertEquals ( null , instance . getChild ( ) )
testWhereNotInEmpty ( ) { try ( final io . vertigo . commons . transaction . VTransactionWritable transaction = transactionManager . createCurrentTransaction ( ) ) { final io . vertigo . dynamo . task . metamodel . TaskDefinition taskDefinition = registerTaskList ( "TK_WHERE_ID_TEST" , "select<sp>*<sp>from<sp>SUPER_HERO<sp>where<sp>ID<sp>not<sp>in<sp>(#DTC_SUPER_HERO_IN.ROWNUM.ID#)" ) ; final io . vertigo . dynamo . domain . model . DtList < io . vertigo . dynamo . task . data . domain . SuperHero > ids = new io . vertigo . dynamo . domain . model . DtList ( io . vertigo . dynamo . task . data . domain . SuperHero . class ) ; final io . vertigo . dynamo . task . model . Task task = io . vertigo . dynamo . task . model . Task . builder ( taskDefinition ) . addValue ( io . vertigo . dynamo . task . x . TaskEngineSelectDynamicTest . DTC_SUPER_HERO_IN , ids ) . build ( ) ; final io . vertigo . dynamo . domain . model . DtList < io . vertigo . dynamo . task . data . domain . SuperHero > resultList = taskManager . execute ( task ) . getResult ( ) ; "<AssertPlaceHolder>" ; } } size ( ) { return lines . size ( ) ; }
org . junit . Assert . assertEquals ( 10 , resultList . size ( ) )
test_systemException_BAD_PARAM ( ) { try { org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaRequest request = new org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaRequest ( org . apache . tuscany . sca . binding . corba . testing . CorbaTypesTestCase . refCalcObject , "div" ) ; request . setOutputType ( org . apache . tuscany . sca . binding . corba . testing . Double . class ) ; request . addArgument ( 3.0 ) ; request . invoke ( ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { if ( e instanceof org . apache . tuscany . sca . binding . corba . provider . exceptions . CorbaException ) { "<AssertPlaceHolder>" ; } else { e . printStackTrace ( ) ; org . junit . Assert . fail ( ) ; } } } invoke ( ) { org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaResponse response = new org . apache . tuscany . sca . binding . corba . provider . reference . DynaCorbaResponse ( ) ; java . lang . String finalOperationName = getFinalOperationName ( ) ; org . omg . CORBA . portable . OutputStream outputStream = ( ( org . omg . CORBA . portable . ObjectImpl ) ( remoteObject ) ) . _request ( finalOperationName , true ) ; passArguments ( outputStream ) ; try { inputStream = remoteObject . _invoke ( outputStream ) ; if ( ( ( inputStream ) != null ) && ( ( returnTree ) != null ) ) { response . setContent ( org . apache . tuscany . sca . binding . corba . provider . types . util . TypeHelpersProxy . read ( returnTree . getRootNode ( ) , inputStream ) ) ; } } catch ( org . omg . CORBA . portable . ApplicationException ae ) { handleApplicationException ( ae ) ; } catch ( org . omg . CORBA . SystemException se ) { handleSystemException ( se ) ; } catch ( java . lang . Exception e ) { throw e ; } finally { release ( ) ; } return response ; }
org . junit . Assert . assertTrue ( true )
testFilterSelection ( ) { japicmp . cmp . JarArchiveComparatorOptions options = new japicmp . cmp . JarArchiveComparatorOptions ( ) ; options . getFilters ( ) . getIncludes ( ) . add ( new japicmp . filter . AnnotationClassFilter ( "@japicmp.test.annotation.filter.PublicAPI" ) ) ; japicmp . cmp . JarArchiveComparator jarArchiveComparator = new japicmp . cmp . JarArchiveComparator ( options ) ; java . util . List < japicmp . model . JApiClass > jApiClasses = jarArchiveComparator . compare ( getArchive ( "japicmp-test-v1.jar" ) , getArchive ( "japicmp-test-v2.jar" ) ) ; getJApiClass ( jApiClasses , japicmp . test . annotation . filter . AnnotatedClass . class . getName ( ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertThat ( jApiClasses . size ( ) , org . hamcrest . CoreMatchers . is ( 3 ) )
UmlLinkType_Inherits ( ) { java . lang . String fromClass = "domain.direct.violating.InheritanceExtends" ; java . lang . String toClass = "technology.direct.dao.HistoryDAO" ; java . lang . String fromAttribute = "" ; boolean isComposite = false ; java . lang . String typeToFind = "Inherits" ; "<AssertPlaceHolder>" ; } isUmlLinkDetectedViaClass ( java . lang . String , java . lang . String , java . lang . String , boolean , java . lang . String ) { boolean umlLinkDetected = false ; husaccttest . analyse . Java_AccuracyTestDependencyDetection . analyseService = husacct . ServiceProvider . getInstance ( ) . getAnalyseService ( ) ; husacct . common . dto . UmlLinkDTO [ ] umlLinkDTOs = husaccttest . analyse . Java_AccuracyTestDependencyDetection . analyseService . getUmlLinksFromClassToToClass ( classFrom , classTo ) ; for ( husacct . common . dto . UmlLinkDTO linkDTO : umlLinkDTOs ) { if ( ( ( ( ( linkDTO . from . equals ( classFrom ) ) && ( linkDTO . to . equals ( classTo ) ) ) && ( linkDTO . attributeFrom . equals ( attributeFrom ) ) ) && ( ( linkDTO . isComposite ) == isComposite ) ) && ( linkDTO . type . equals ( linkType ) ) ) { umlLinkDetected = true ; } } return umlLinkDetected ; }
org . junit . Assert . assertTrue ( isUmlLinkDetectedViaClass ( fromClass , toClass , fromAttribute , isComposite , typeToFind ) )
registerOrganizationWithTenant ( ) { final long tenantKey = 1234L ; prepareForRegisterOrganization ( ) ; org . oscm . domobjects . Marketplace marketplace = createMarketplace ( marketplaceId ) ; org . oscm . domobjects . Tenant tenant = new org . oscm . domobjects . Tenant ( ) ; tenant . setTenantId ( "12345678" ) ; tenant . setKey ( tenantKey ) ; marketplace . setTenant ( tenant ) ; doReturn ( marketplace ) . when ( marketplaceService ) . getMarketplaceForId ( anyString ( ) ) ; doReturn ( marketplace ) . when ( dm ) . getReferenceByBusinessKey ( any ( org . oscm . domobjects . Marketplace . class ) ) ; org . oscm . domobjects . Organization mockedOrg = new org . oscm . domobjects . Organization ( ) ; mockedOrg . setTenant ( tenant ) ; doReturn ( mockedOrg ) . when ( accountServiceMock ) . registerOrganization ( any ( org . oscm . domobjects . Organization . class ) , any ( org . oscm . domobjects . ImageResource . class ) , any ( org . oscm . internal . vo . VOUserDetails . class ) , any ( java . util . Properties . class ) , anyString ( ) , ( ( java . lang . String ) ( eq ( marketplaceId ) ) ) , anyString ( ) ) ; org . oscm . internal . vo . VOOrganization org = operatorServiceBean . registerOrganization ( organization , null , userDetails , null , marketplaceId ) ; verify ( accountServiceMock , times ( 1 ) ) . registerOrganization ( any ( org . oscm . domobjects . Organization . class ) , any ( org . oscm . domobjects . ImageResource . class ) , any ( org . oscm . internal . vo . VOUserDetails . class ) , any ( java . util . Properties . class ) , anyString ( ) , ( ( java . lang . String ) ( eq ( marketplaceId ) ) ) , anyString ( ) ) ; "<AssertPlaceHolder>" ; } getTenant ( ) { return tenant ; }
org . junit . Assert . assertTrue ( ( ( mockedOrg . getTenant ( ) . getKey ( ) ) == tenantKey ) )
testSerialization ( ) { org . jfree . data . time . Year y1 = new org . jfree . data . time . Year ( 1999 ) ; org . jfree . data . time . Year y2 = ( ( org . jfree . data . time . Year ) ( org . jfree . chart . TestUtils . serialised ( y1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
org . junit . Assert . assertEquals ( y1 , y2 )
testMultithreadedRandom1 ( ) { final java . util . List < org . nd4j . linalg . api . ndarray . INDArray > holder = new java . util . ArrayList ( ) ; final java . util . concurrent . atomic . AtomicLong failures = new java . util . concurrent . atomic . AtomicLong ( 0 ) ; java . lang . Thread thread = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . nd4j . jita . memory . impl . Override public void run ( ) { holder . add ( org . nd4j . linalg . factory . Nd4j . ones ( 10 ) ) ; } } ) ; org . nd4j . linalg . factory . Nd4j . getAffinityManager ( ) . attachThreadToDevice ( thread , 1 ) ; thread . start ( ) ; thread . join ( ) ; java . lang . Thread [ ] threads = new java . lang . Thread [ 100 ] ; for ( int x = 0 ; x < ( threads . length ) ; x ++ ) { threads [ x ] = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . nd4j . jita . memory . impl . Override public void run ( ) { try { org . nd4j . linalg . api . ndarray . INDArray array = holder . get ( 0 ) . dup ( ) ; } catch ( java . lang . Exception e ) { failures . incrementAndGet ( ) ; throw new java . lang . RuntimeException ( e ) ; } } } ) ; threads [ x ] . start ( ) ; } for ( int x = 0 ; x < ( threads . length ) ; x ++ ) { threads [ x ] . join ( ) ; } "<AssertPlaceHolder>" ; } get ( ) { if ( ! ( isPresent ( ) ) ) { throw new java . util . NoSuchElementException ( "Optional<sp>is<sp>empty" ) ; } return value ; }
org . junit . Assert . assertEquals ( 0 , failures . get ( ) )
testIsMyIsolationMethod ( ) { "<AssertPlaceHolder>" ; } isMyIsolationMethod ( com . cloud . network . PhysicalNetwork ) { if ( physicalNetwork == null ) { return false ; } java . util . List < java . lang . String > methods = new java . util . ArrayList < java . lang . String > ( ) ; for ( final java . lang . String method : physicalNetwork . getIsolationMethods ( ) ) { methods . add ( method . toLowerCase ( ) ) ; } if ( methods . isEmpty ( ) ) { com . cloud . network . guru . GuestNetworkGuru . s_logger . debug ( ( "Empty<sp>physical<sp>isolation<sp>type<sp>for<sp>physical<sp>network<sp>" + ( physicalNetwork . getUuid ( ) ) ) ) ; methods = new java . util . ArrayList < java . lang . String > ( 1 ) ; methods . add ( "VLAN" . toLowerCase ( ) ) ; } for ( final com . cloud . network . PhysicalNetwork . IsolationMethod m : _isolationMethods ) { if ( methods . contains ( m . toString ( ) . toLowerCase ( ) ) ) { return true ; } } return false ; }
org . junit . Assert . assertTrue ( guru . isMyIsolationMethod ( physicalNetwork ) )
showBillingDataStep_NOTforBroker ( ) { model . setBillingSharesResultTypes ( java . util . Arrays . asList ( BillingSharesResultType . BROKER ) ) ; boolean result = ctrl . isShowBillingTypeSelectStep ( ) ; "<AssertPlaceHolder>" ; } isShowBillingTypeSelectStep ( ) { if ( ( model . getBillingSharesResultTypes ( ) ) == null ) return false ; if ( model . getBillingSharesResultTypes ( ) . contains ( BillingSharesResultType . RESELLER ) ) return true ; if ( model . getBillingSharesResultTypes ( ) . contains ( BillingSharesResultType . SUPPLIER ) ) return true ; if ( model . isPlatformOperator ( ) ) return false ; if ( model . getBillingSharesResultTypes ( ) . contains ( BillingSharesResultType . BROKER ) ) return false ; else return false ; }
org . junit . Assert . assertFalse ( result )
testProxyGetDatanodeStorageReport ( ) { org . apache . hadoop . hdfs . server . protocol . DatanodeStorageReport [ ] combinedData = routerProtocol . getDatanodeStorageReport ( DatanodeReportType . ALL ) ; java . util . Set < java . lang . String > individualData = new java . util . HashSet ( ) ; for ( java . lang . String nameservice : org . apache . hadoop . hdfs . server . federation . router . TestRouterRpc . cluster . getNameservices ( ) ) { org . apache . hadoop . hdfs . server . federation . MiniRouterDFSCluster . NamenodeContext n = org . apache . hadoop . hdfs . server . federation . router . TestRouterRpc . cluster . getNamenode ( nameservice , null ) ; org . apache . hadoop . hdfs . DFSClient client = n . getClient ( ) ; org . apache . hadoop . hdfs . protocol . ClientProtocol clientProtocol = client . getNamenode ( ) ; org . apache . hadoop . hdfs . server . protocol . DatanodeStorageReport [ ] data = clientProtocol . getDatanodeStorageReport ( DatanodeReportType . ALL ) ; for ( org . apache . hadoop . hdfs . server . protocol . DatanodeStorageReport report : data ) { org . apache . hadoop . hdfs . protocol . DatanodeInfo dn = report . getDatanodeInfo ( ) ; individualData . add ( dn . toString ( ) ) ; } } "<AssertPlaceHolder>" ; } size ( ) { return loggers . size ( ) ; }
org . junit . Assert . assertEquals ( combinedData . length , individualData . size ( ) )
testNotNodeModifyRight ( ) { final java . lang . String drl = ( ( ( ( ( ( ( ( ( ( ( ( ( ( "import<sp>" + ( org . drools . testcoverage . common . model . Cheese . class . getCanonicalName ( ) ) ) + ";\n" ) + "import<sp>" ) + ( org . drools . testcoverage . common . model . Person . class . getCanonicalName ( ) ) ) + ";\n" ) + "rule<sp>R1<sp>salience<sp>10<sp>when\n" ) + "<sp>Person(<sp>$age<sp>:<sp>age<sp>)\n" ) + "rule<sp>R1<sp>salience<sp>10<sp>when\n" 1 ) + "then\n" ) + "rule<sp>R1<sp>salience<sp>10<sp>when\n" 3 ) + "rule<sp>R3<sp>salience<sp>5<sp>when\n" ) + "<sp>$c<sp>:<sp>Cheese(<sp>price<sp>==<sp>8<sp>)\n" ) + "then\n" ) + "rule<sp>R1<sp>salience<sp>10<sp>when\n" 0 ) + "rule<sp>R1<sp>salience<sp>10<sp>when\n" 3 ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "indexing-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . runtime . KieSession ksession = kbase . newKieSession ( ) ; try { ksession . insert ( new org . drools . testcoverage . common . model . Person ( "A" , 10 ) ) ; ksession . insert ( new org . drools . testcoverage . common . model . Cheese ( "rule<sp>R1<sp>salience<sp>10<sp>when\n" 2 , 20 ) ) ; ksession . insert ( new org . drools . testcoverage . common . model . Cheese ( "C2" , 8 ) ) ; "<AssertPlaceHolder>" ; } finally { ksession . dispose ( ) ; } } fireAllRules ( ) { return 0 ; }
org . junit . Assert . assertEquals ( 2 , ksession . fireAllRules ( ) )
resolveException ( ) { when ( dirContext . getAttributes ( com . hazelcast . kubernetes . DnsEndpointResolverTest . SERVICE_DNS , new java . lang . String [ ] { "SRV" } ) ) . thenThrow ( new javax . naming . NameNotFoundException ( ) ) ; com . hazelcast . kubernetes . DnsEndpointResolver dnsEndpointResolver = new com . hazelcast . kubernetes . DnsEndpointResolver ( com . hazelcast . kubernetes . DnsEndpointResolverTest . LOGGER , com . hazelcast . kubernetes . DnsEndpointResolverTest . SERVICE_DNS , com . hazelcast . kubernetes . DnsEndpointResolverTest . UNSET_PORT , dirContext ) ; java . util . List < com . hazelcast . spi . discovery . DiscoveryNode > result = dnsEndpointResolver . resolve ( ) ; "<AssertPlaceHolder>" ; } resolve ( ) { if ( ( ( serviceName ) != null ) && ( ! ( serviceName . isEmpty ( ) ) ) ) { return getSimpleDiscoveryNodes ( client . endpointsByName ( serviceName ) ) ; } else if ( ( ( serviceLabel ) != null ) && ( ! ( serviceLabel . isEmpty ( ) ) ) ) { return getSimpleDiscoveryNodes ( client . endpointsByLabel ( serviceLabel , serviceLabelValue ) ) ; } return getSimpleDiscoveryNodes ( client . endpoints ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
getListOfSTPs ( ) { java . util . List < java . lang . String > stps = stm . getHousekeeping ( ) . getListOfSTPs ( "test/stps" ) ; "<AssertPlaceHolder>" ; for ( java . lang . String stp : stps ) { System . out . println ( stp ) ; } } getListOfSTPs ( java . lang . String ) { java . io . File f = new java . io . File ( pathToSTPs ) ; if ( ! ( f . exists ( ) ) ) { f . mkdir ( ) ; } if ( f . isDirectory ( ) ) { return java . util . Arrays . asList ( f . list ( ) ) ; } else { System . out . println ( "The<sp>defined<sp>path<sp>to<sp>the<sp>STPs<sp>is<sp>not<sp>a<sp>directory!" ) ; java . lang . System . exit ( 1 ) ; return null ; } }
org . junit . Assert . assertNotNull ( stps )
test_LocalDate_adjustToSymmetry010Date ( ) { org . threeten . extra . chrono . Symmetry010Date sym010 = org . threeten . extra . chrono . Symmetry010Date . of ( 2012 , 7 , 19 ) ; java . time . LocalDate test = LocalDate . MIN . with ( sym010 ) ; "<AssertPlaceHolder>" ; } of ( int , int , int ) { org . threeten . extra . chrono . YEAR . checkValidValue ( prolepticYear ) ; PaxChronology . MONTH_OF_YEAR_RANGE . checkValidValue ( month , org . threeten . extra . chrono . MONTH_OF_YEAR ) ; PaxChronology . DAY_OF_MONTH_RANGE . checkValidValue ( dayOfMonth , org . threeten . extra . chrono . DAY_OF_MONTH ) ; if ( ( month == ( ( org . threeten . extra . chrono . PaxChronology . MONTHS_IN_YEAR ) + 1 ) ) && ( ! ( PaxChronology . INSTANCE . isLeapYear ( prolepticYear ) ) ) ) { throw new java . time . DateTimeException ( ( ( "Invalid<sp>month<sp>14<sp>as<sp>" + prolepticYear ) + "is<sp>not<sp>a<sp>leap<sp>year" ) ) ; } if ( ( ( dayOfMonth > ( org . threeten . extra . chrono . PaxChronology . DAYS_IN_WEEK ) ) && ( month == ( org . threeten . extra . chrono . PaxChronology . MONTHS_IN_YEAR ) ) ) && ( PaxChronology . INSTANCE . isLeapYear ( prolepticYear ) ) ) { throw new java . time . DateTimeException ( ( ( "Invalid<sp>date<sp>during<sp>Pax<sp>as<sp>" + prolepticYear ) + "<sp>is<sp>a<sp>leap<sp>year" ) ) ; } return new org . threeten . extra . chrono . PaxDate ( prolepticYear , month , dayOfMonth ) ; }
org . junit . Assert . assertEquals ( java . time . LocalDate . of ( 2012 , 7 , 20 ) , test )
shouldFlushInnerWhenFlushTimeRecords ( ) { inner . flush ( ) ; expectLastCall ( ) . once ( ) ; init ( ) ; metered . flush ( ) ; final org . apache . kafka . common . metrics . KafkaMetric metric = metric ( "flush-rate" ) ; "<AssertPlaceHolder>" ; verify ( inner ) ; } metricValue ( ) { long now = time . milliseconds ( ) ; synchronized ( this . lock ) { if ( ( this . metricValueProvider ) instanceof org . apache . kafka . common . metrics . Measurable ) return ( ( org . apache . kafka . common . metrics . Measurable ) ( metricValueProvider ) ) . measure ( config , now ) ; else if ( ( this . metricValueProvider ) instanceof org . apache . kafka . common . metrics . Gauge ) return ( ( org . apache . kafka . common . metrics . Gauge < ? > ) ( metricValueProvider ) ) . value ( config , now ) ; else throw new java . lang . IllegalStateException ( ( "Not<sp>a<sp>valid<sp>metric:<sp>" + ( this . metricValueProvider . getClass ( ) ) ) ) ; } }
org . junit . Assert . assertTrue ( ( ( ( java . lang . Double ) ( metric . metricValue ( ) ) ) > 0 ) )
testSqueezedHexa ( ) { org . hipparchus . geometry . euclidean . twod . PolygonsSet set = new org . hipparchus . geometry . euclidean . twod . PolygonsSet ( 1.0E-10 , new org . hipparchus . geometry . euclidean . twod . Vector2D ( ( - 6 ) , ( - 4 ) ) , new org . hipparchus . geometry . euclidean . twod . Vector2D ( ( - 8 ) , ( - 8 ) ) , new org . hipparchus . geometry . euclidean . twod . Vector2D ( 8 , ( - 8 ) ) , new org . hipparchus . geometry . euclidean . twod . Vector2D ( 6 , ( - 4 ) ) , new org . hipparchus . geometry . euclidean . twod . Vector2D ( 10 , 4 ) , new org . hipparchus . geometry . euclidean . twod . Vector2D ( ( - 10 ) , 4 ) ) ; "<AssertPlaceHolder>" ; } checkPoint ( double , double ) { if ( ( point < ( ( lower ) - tolerance ) ) || ( point > ( ( upper ) + tolerance ) ) ) { return org . hipparchus . geometry . partitioning . Region . Location . OUTSIDE ; } else if ( ( point > ( ( lower ) + tolerance ) ) && ( point < ( ( upper ) - tolerance ) ) ) { return org . hipparchus . geometry . partitioning . Region . Location . INSIDE ; } else { return org . hipparchus . geometry . partitioning . Region . Location . BOUNDARY ; } }
org . junit . Assert . assertEquals ( Location . OUTSIDE , set . checkPoint ( new org . hipparchus . geometry . euclidean . twod . Vector2D ( 0 , 6 ) ) )
testBasic ( ) { java . lang . String s = "<sp>bde<sp>cde<sp>def<sp>abc<sp>efg<sp>f<sp>f<sp>f<sp>f<sp>ghijklmnop<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>a<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b<sp>b" ; org . apache . tika . eval . tokens . TokenCounter counter = new org . apache . tika . eval . tokens . TokenCounter ( org . apache . tika . eval . tokens . TokenCounterTest . analyzerManager . getGeneralAnalyzer ( ) ) ; counter . add ( org . apache . tika . eval . tokens . TokenCounterTest . FIELD , s ) ; org . apache . tika . eval . tokens . TokenStatistics simpleTokenStatistics = counter . getTokenStatistics ( org . apache . tika . eval . tokens . TokenCounterTest . FIELD ) ; org . apache . tika . eval . tokens . LuceneTokenCounter tokenCounter = new org . apache . tika . eval . tokens . LuceneTokenCounter ( org . apache . tika . eval . tokens . TokenCounterTest . analyzerManager . getGeneralAnalyzer ( ) ) ; tokenCounter . add ( org . apache . tika . eval . tokens . TokenCounterTest . FIELD , s ) ; "<AssertPlaceHolder>" ; } getTokenStatistics ( java . lang . String ) { org . apache . tika . eval . tokens . TokenStatistics tokenStat = tokenStatistics . get ( field ) ; if ( tokenStat == null ) { return NULL_TOKEN_STAT ; } return tokenStat ; }
org . junit . Assert . assertEquals ( simpleTokenStatistics , tokenCounter . getTokenStatistics ( org . apache . tika . eval . tokens . TokenCounterTest . FIELD ) )
testEndpointRemoveNotification ( ) { hub . sendUpdate ( org . ow2 . chameleon . pubsubhubbub . test . clients . HUB_SUBSCRIPTION_UPDATE_ENDPOINT_ADDED , publisherCallBackUrl , endp , json ) ; waitForIt ( org . ow2 . chameleon . pubsubhubbub . test . clients . SubscriberTest . WAIT_TIME ) ; hub . sendUpdate ( org . ow2 . chameleon . pubsubhubbub . test . clients . HUB_SUBSCRIPTION_UPDATE_ENDPOINT_REMOVED , publisherCallBackUrl , endp , json ) ; "<AssertPlaceHolder>" ; } containsRemote ( org . ow2 . chameleon . rose . internal . EndpointDescription ) { return importReg . contains ( desc ) ; }
org . junit . Assert . assertFalse ( rose . containsRemote ( endp ) )
testFromEbXML ( ) { transformer . toEbXML ( query , ebXML ) ; org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetRelatedDocumentsQuery result = new org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetRelatedDocumentsQuery ( ) ; transformer . fromEbXML ( result , ebXML ) ; "<AssertPlaceHolder>" ; } fromEbXML ( org . openehealth . ipf . commons . ihe . xds . core . requests . query . GetAllQuery , org . openehealth . ipf . commons . ihe . xds . core . ebxml . EbXMLAdhocQueryRequest ) { if ( ( query == null ) || ( ebXML == null ) ) { return ; } org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . QuerySlotHelper slots = new org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . QuerySlotHelper ( ebXML ) ; java . lang . String patientId = slots . toString ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . PATIENT_ID ) ; query . setPatientId ( org . openehealth . ipf . commons . ihe . xds . core . metadata . Hl7v2Based . parse ( patientId , org . openehealth . ipf . commons . ihe . xds . core . metadata . Identifiable . class ) ) ; query . setStatusDocuments ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_STATUS ) ) ; query . setStatusFolders ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . FOLDER_STATUS ) ) ; query . setStatusSubmissionSets ( slots . toStatus ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . SUBMISSION_SET_STATUS ) ) ; query . setConfidentialityCodes ( slots . toCodeQueryList ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_CONFIDENTIALITY_CODE , org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_CONFIDENTIALITY_CODE_SCHEME ) ) ; query . setFormatCodes ( slots . toCodeList ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_FORMAT_CODE ) ) ; query . setHomeCommunityId ( ebXML . getHome ( ) ) ; query . setDocumentEntryTypes ( slots . toDocumentEntryType ( org . openehealth . ipf . commons . ihe . xds . core . transform . requests . query . DOC_ENTRY_TYPE ) ) ; }
org . junit . Assert . assertEquals ( query , result )
setPropertyValueChained_ThirdLevel ( ) { com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptor descriptor = new com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptor ( com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptorTest . Container . class , "container.container.value" , false , 0 , null , null , destBeanCreator ) ; com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptorTest . Container bean = new com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptorTest . Container ( "X" ) ; bean . container = new com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptorTest . Container ( "X" ) ; bean . container . container = new com . github . dozermapper . core . propertydescriptor . FieldPropertyDescriptorTest . Container ( "X" ) ; descriptor . setPropertyValue ( bean , "Y" , mock ( com . github . dozermapper . core . fieldmap . FieldMap . class ) ) ; "<AssertPlaceHolder>" ; } setPropertyValue ( java . lang . Object , java . lang . Object , com . github . dozermapper . core . fieldmap . FieldMap ) { if ( com . github . dozermapper . core . util . MappingUtils . isDeepMapping ( fieldName ) ) { writeDeepDestinationValue ( bean , value , fieldMap ) ; } else { if ( ( ! ( getPropertyType ( ) . isPrimitive ( ) ) ) || ( value != null ) ) { try { if ( ( value != null ) && ( ( getPropertyValue ( bean ) ) == value ) ) { return ; } } catch ( java . lang . Exception e ) { } invokeWriteMethod ( bean , value ) ; } } }
org . junit . Assert . assertEquals ( "Y" , bean . container . container . value )
shouldNotCrashOnNullBufferInput ( ) { byte [ ] bytes = de . slackspace . openkeepass . util . ByteUtils . hexStringToByteArray ( "af66b1" ) ; java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( bytes ) ; int read = de . slackspace . openkeepass . util . StreamUtils . read ( stream , null ) ; "<AssertPlaceHolder>" ; } read ( java . io . InputStream , byte [ ] ) { if ( ( input == null ) || ( buffer == null ) ) { return - 1 ; } int remaining = buffer . length ; while ( remaining > 0 ) { int location = ( buffer . length ) - remaining ; int count = input . read ( buffer , ( 0 + location ) , remaining ) ; if ( ( de . slackspace . openkeepass . util . StreamUtils . EOF ) == count ) { break ; } remaining -= count ; } return ( buffer . length ) - remaining ; }
org . junit . Assert . assertEquals ( ( - 1 ) , read )
testExact ( ) { org . xwiki . model . reference . EntityReference wikiReference = new org . xwiki . model . reference . RegexEntityReference ( java . util . regex . Pattern . compile ( org . xwiki . model . reference . RegexEntityReferenceTest . REFERENCETOMATCH . getWikiReference ( ) . getName ( ) , Pattern . LITERAL ) , org . xwiki . model . EntityType . WIKI ) ; org . xwiki . model . reference . EntityReference spaceReference = new org . xwiki . model . reference . RegexEntityReference ( java . util . regex . Pattern . compile ( org . xwiki . model . reference . RegexEntityReferenceTest . REFERENCETOMATCH . getLastSpaceReference ( ) . getName ( ) , Pattern . LITERAL ) , org . xwiki . model . EntityType . SPACE , wikiReference ) ; org . xwiki . model . reference . EntityReference reference = new org . xwiki . model . reference . RegexEntityReference ( java . util . regex . Pattern . compile ( org . xwiki . model . reference . RegexEntityReferenceTest . REFERENCETOMATCH . getName ( ) , Pattern . LITERAL ) , org . xwiki . model . EntityType . DOCUMENT , spaceReference ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof org . xwiki . model . reference . EntityReference ) ) { return false ; } org . xwiki . model . reference . EntityReference ref = ( ( org . xwiki . model . reference . EntityReference ) ( obj ) ) ; return ( ( ( name . equals ( ref . name ) ) && ( type . equals ( ref . type ) ) ) && ( ( parent ) == null ? ( ref . parent ) == null : parent . equals ( ref . parent ) ) ) && ( ( parameters ) == null ? ( ref . parameters ) == null : parameters . equals ( ref . parameters ) ) ; }
org . junit . Assert . assertTrue ( reference . equals ( org . xwiki . model . reference . RegexEntityReferenceTest . REFERENCETOMATCH ) )