input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testQualifiedPair ( ) { org . apache . cxf . aegis . databinding . AegisDatabinding aegisBinding = new org . apache . cxf . aegis . databinding . AegisDatabinding ( ) ; org . apache . cxf . jaxws . JaxWsProxyFactoryBean proxyFactory = new org . apache . cxf . jaxws . JaxWsProxyFactoryBean ( ) ; proxyFactory . setDataBinding ( aegisBinding ) ; proxyFactory . setServiceClass ( org . apache . cxf . systest . aegis . SportsService . class ) ; proxyFactory . setAddress ( ( ( "http://localhost:" + ( org . apache . cxf . systest . aegis . AegisClientServerTest . PORT ) ) + "/jaxwsAndAegisSports" ) ) ; proxyFactory . getInInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingInInterceptor ( ) ) ; proxyFactory . getOutInterceptors ( ) . add ( new org . apache . cxf . ext . logging . LoggingOutInterceptor ( ) ) ; org . apache . cxf . systest . aegis . SportsService service = ( ( org . apache . cxf . systest . aegis . SportsService ) ( proxyFactory . create ( ) ) ) ; int ret = service . getQualifiedPair ( new org . apache . cxf . systest . aegis . SportsService . Pair < java . lang . Integer , java . lang . String > ( 111 , "ffang" ) ) ; "<AssertPlaceHolder>" ; } create ( ) { org . oasis_open . docs . wsn . b_2 . CreatePullPoint request = new org . oasis_open . docs . wsn . b_2 . CreatePullPoint ( ) ; org . oasis_open . docs . wsn . b_2 . CreatePullPointResponse response = createPullPoint . createPullPoint ( request ) ; return new org . apache . cxf . wsn . client . PullPoint ( response . getPullPoint ( ) ) ; }
|
org . junit . Assert . assertEquals ( 111 , ret )
|
testRulesSortingModeInsert ( ) { net . bobosse . gwt . rulesengine . client . impl . engines . SingleFactRulesEngine engine = new net . bobosse . gwt . rulesengine . client . impl . engines . SingleFactRulesEngine ( ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule first = new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule ( "first" , "[a-z]" , ( - 100 ) ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule second = new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule ( "second" , "[a-z]" , ( - 1 ) ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule third = new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule ( "third" , "[a-z]" , 10 ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule fourth = new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule ( "fourth" , "[a-z]" , 100 ) ; net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule fifth = new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule ( "fifth" , "[a-z]" , 10 ) ; java . util . List < net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule > mixed = java . util . Arrays . asList ( new net . bobosse . gwt . rulesengine . client . impl . rules . RegexRule [ ] { second , fourth , first , third , fifth } ) ; engine . addRule ( mixed . get ( 0 ) ) ; engine . addRule ( mixed . get ( 1 ) ) ; engine . addRule ( mixed . get ( 2 ) ) ; engine . addRule ( mixed . get ( 3 ) ) ; engine . addRule ( mixed . get ( 4 ) ) ; java . util . List < net . bobosse . gwt . rulesengine . client . Rule > sortedRules = engine . getRules ( OrderMode . INSERT ) ; "<AssertPlaceHolder>" ; } getRules ( net . bobosse . gwt . rulesengine . client . impl . engines . OrderMode ) { java . util . ArrayList < net . bobosse . gwt . rulesengine . client . Rule > rules = new java . util . ArrayList < net . bobosse . gwt . rulesengine . client . Rule > ( rulesMap . keySet ( ) . size ( ) ) ; for ( net . bobosse . gwt . rulesengine . client . RuleHandler rh : rulesMap . values ( ) ) { rules . add ( rh . getRule ( ) ) ; } if ( mode == ( OrderMode . SALIENCE ) ) { java . util . Collections . sort ( rules , new net . bobosse . gwt . rulesengine . client . impl . engines . AbstractRulesEngine . RuleSalienceComparator ( ) ) ; } return rules ; }
|
org . junit . Assert . assertEquals ( mixed , sortedRules )
|
shouldBeFalseWhenGivenTrueAndFalse ( ) { final org . pitest . functional . predicate . And < java . lang . Object > testee = and ( ( i ) -> true , ( i ) -> false ) ; "<AssertPlaceHolder>" ; } test ( java . lang . String ) { return this . includedClassPathElement . contains ( a ) ; }
|
org . junit . Assert . assertFalse ( testee . test ( null ) )
|
testBroadcastMult ( ) { org . nd4j . linalg . api . ndarray . INDArray num = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 , - 1.0 , - 2.0 , - 3.0 , - 4.0 , - 5.0 , - 6.0 , - 7.0 , - 8.0 } ) . reshape ( 2 , 8 ) ; org . nd4j . linalg . api . ndarray . INDArray denom = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1.0 , 2.0 , 3.0 , 4.0 , 5.0 , 6.0 , 7.0 , 8.0 } ) ; org . nd4j . linalg . api . ndarray . INDArray expected = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 4 , 9 , 16 , 25 , 36 , 49 , 64 , - 1 , - 4 , - 9 , - 16 , - 25 , - 36 , - 49 , - 64 } , new long [ ] { 2 , 8 } ) ; org . nd4j . linalg . api . ndarray . INDArray actual = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . BroadcastMulOp ( num , denom , num . dup ( ) , ( - 1 ) ) ) ; "<AssertPlaceHolder>" ; } dup ( ) { return sameDiff . var ( this ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testFindUncoveredHttpMethods01 ( ) { org . apache . tomcat . util . descriptor . web . SecurityConstraint [ ] result = org . apache . tomcat . util . descriptor . web . SecurityConstraint . findUncoveredHttpMethods ( new org . apache . tomcat . util . descriptor . web . SecurityConstraint [ ] { org . apache . tomcat . util . descriptor . web . TestSecurityConstraint . GET_ONLY } , false , org . apache . tomcat . util . descriptor . web . TestSecurityConstraint . DUMMY_LOG ) ; "<AssertPlaceHolder>" ; } findUncoveredHttpMethods ( org . apache . tomcat . util . descriptor . web . SecurityConstraint [ ] , boolean , org . apache . juli . logging . Log ) { java . util . Set < java . lang . String > coveredPatterns = new java . util . HashSet ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > urlMethodMap = new java . util . HashMap ( ) ; java . util . Map < java . lang . String , java . util . Set < java . lang . String > > urlOmittedMethodMap = new java . util . HashMap ( ) ; java . util . List < org . apache . tomcat . util . descriptor . web . SecurityConstraint > newConstraints = new java . util . ArrayList ( ) ; for ( org . apache . tomcat . util . descriptor . web . SecurityConstraint constraint : constraints ) { org . apache . tomcat . util . descriptor . web . SecurityCollection [ ] collections = constraint . findCollections ( ) ; for ( org . apache . tomcat . util . descriptor . web . SecurityCollection collection : collections ) { java . lang . String [ ] patterns = collection . findPatterns ( ) ; java . lang . String [ ] methods = collection . findMethods ( ) ; java . lang . String [ ] omittedMethods = collection . findOmittedMethods ( ) ; if ( ( ( methods . length ) == 0 ) && ( ( omittedMethods . length ) == 0 ) ) { for ( java . lang . String pattern : patterns ) { coveredPatterns . add ( pattern ) ; } continue ; } java . util . List < java . lang . String > omNew = null ; if ( ( omittedMethods . length ) != 0 ) { omNew = java . util . Arrays . asList ( omittedMethods ) ; } for ( java . lang . String pattern : patterns ) { if ( ! ( coveredPatterns . contains ( pattern ) ) ) { if ( ( methods . length ) == 0 ) { java . util . Set < java . lang . String > om = urlOmittedMethodMap . get ( pattern ) ; if ( om == null ) { om = new java . util . HashSet ( ) ; urlOmittedMethodMap . put ( pattern , om ) ; om . addAll ( omNew ) ; } else { om . retainAll ( omNew ) ; } } else { java . util . Set < java . lang . String > m = urlMethodMap . get ( pattern ) ; if ( m == null ) { m = new java . util . HashSet ( ) ; urlMethodMap . put ( pattern , m ) ; } for ( java . lang . String method : methods ) { m . add ( method ) ; } } } } } } for ( Map . Entry < java . lang . String , java . util . Set < java . lang . String > > entry : urlMethodMap . entrySet ( ) ) { java . lang . String pattern = entry . getKey ( ) ; if ( coveredPatterns . contains ( pattern ) ) { urlOmittedMethodMap . remove ( pattern ) ; continue ; } java . util . Set < java . lang . String > omittedMethods = urlOmittedMethodMap . remove ( pattern ) ; java . util . Set < java . lang . String > methods = entry . getValue ( ) ; if ( omittedMethods == null ) { java . lang . StringBuilder msg = new java . lang . StringBuilder ( ) ; for ( java . lang . String method : methods ) { msg . append ( method ) ; msg . append ( '<sp>' ) ; } if ( denyUncoveredHttpMethods ) { log . info ( org . apache . tomcat . util . descriptor . web . SecurityConstraint . sm . getString ( "securityConstraint.uncoveredHttpMethodFix" , pattern , msg . toString ( ) . trim ( ) ) ) ; org . apache . tomcat . util . descriptor . web . SecurityCollection collection = new org . apache . tomcat . util . descriptor . web . SecurityCollection ( ) ; for ( java . lang . String method : methods ) { collection . addOmittedMethod ( method ) ; } collection . addPatternDecoded ( pattern ) ; collection . setName ( "deny-uncovered-http-methods" ) ; org . apache . tomcat . util . descriptor . web . SecurityConstraint constraint = new org . apache . tomcat . util . descriptor . web . SecurityConstraint ( ) ; constraint . setAuthConstraint ( true ) ; constraint . addCollection ( collection ) ; newConstraints . add ( constraint ) ; } else { log . error ( org . apache . tomcat . util . descriptor . web . SecurityConstraint . sm . getString ( "securityConstraint.uncoveredHttpMethod" , pattern , msg . toString ( ) . trim ( ) ) ) ; } continue ; } omittedMethods . removeAll ( methods ) ; if ( ( omittedMethods
|
org . junit . Assert . assertEquals ( 0 , result . length )
|
testCreateAnnotationOnInitialization ( ) { org . eclipse . emf . ecore . EAnnotation annotation = EcoreFactory . eINSTANCE . createEAnnotation ( ) ; annotation . setSource ( "XTest" ) ; annotation . getDetails ( ) . put ( "Test" , "true" ) ; "<AssertPlaceHolder>" ; } getDetails ( ) { if ( ( details ) == null ) { details = new org . eclipse . emf . ecore . util . EcoreEMap < java . lang . String , java . lang . String > ( EcorePackage . Literals . ESTRING_TO_STRING_MAP_ENTRY , org . eclipse . emf . ecore . impl . EStringToStringMapEntryImpl . class , this , org . eclipse . emf . codegen . ecore . genmodel . GenModelPackage . GEN_ANNOTATION__DETAILS ) ; } return details ; }
|
org . junit . Assert . assertEquals ( "true" , annotation . getDetails ( ) . get ( "Test" ) )
|
libraryScion ( ) { org . json . JSONObject obj = getJSONObject ( "scion.json" ) ; "<AssertPlaceHolder>" ; } hasLibrary ( org . json . JSONObject ) { java . lang . Object o = description . opt ( net . sf . eclipsefp . haskell . core . cabalmodel . JSONDescriptionHelper . COND_LIBRARY ) ; return o instanceof org . json . JSONObject ; }
|
org . junit . Assert . assertTrue ( net . sf . eclipsefp . haskell . core . cabalmodel . JSONDescriptionHelper . hasLibrary ( obj ) )
|
testReplaceAllFinishes_165497_f ( ) { final java . util . Map < java . lang . String , java . lang . Object > props = new java . util . HashMap ( ) ; props . put ( EditorFindSupport . FIND_WHAT , "a" ) ; props . put ( EditorFindSupport . FIND_REPLACE_WITH , "A" ) ; props . put ( EditorFindSupport . FIND_HIGHLIGHT_SEARCH , Boolean . TRUE ) ; props . put ( EditorFindSupport . FIND_INC_SEARCH , Boolean . TRUE ) ; props . put ( EditorFindSupport . FIND_BACKWARD_SEARCH , Boolean . TRUE ) ; props . put ( EditorFindSupport . FIND_WRAP_SEARCH , Boolean . TRUE ) ; props . put ( EditorFindSupport . FIND_MATCH_CASE , Boolean . FALSE ) ; props . put ( EditorFindSupport . FIND_SMART_CASE , Boolean . FALSE ) ; props . put ( EditorFindSupport . FIND_WHOLE_WORDS , Boolean . FALSE ) ; props . put ( EditorFindSupport . FIND_REG_EXP , Boolean . FALSE ) ; props . put ( EditorFindSupport . FIND_HISTORY , new java . lang . Integer ( 30 ) ) ; final org . netbeans . modules . editor . search . EditorFindSupport instance = org . netbeans . modules . editor . search . EditorFindSupport . getInstance ( ) ; final boolean [ ] finished = new boolean [ 1 ] ; java . lang . Thread t = new java . lang . Thread ( new java . lang . Runnable ( ) { @ org . netbeans . modules . editor . search . Override public void run ( ) { javax . swing . JTextArea ta = new javax . swing . JTextArea ( "aaaa" ) ; instance . replaceAllImpl ( props , ta ) ; finished [ 0 ] = true ; } } ) ; t . start ( ) ; java . lang . Thread . sleep ( 2000 ) ; if ( ! ( finished [ 0 ] ) ) { t . stop ( ) ; } "<AssertPlaceHolder>" ; } stop ( ) { long delta = ( java . lang . System . currentTimeMillis ( ) ) - ( time ) ; org . netbeans . modules . sampler . Sampler ss = profiler ; profiler = null ; if ( ! ( profiling ) ) { return ; } try { java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream dos = new java . io . DataOutputStream ( out ) ; ss . stopAndWriteTo ( dos ) ; dos . close ( ) ; if ( ( dos . size ( ) ) > 0 ) { java . lang . Object [ ] params = new java . lang . Object [ ] { out . toByteArray ( ) , delta , "GoToType" } ; java . util . logging . Logger . getLogger ( "org.netbeans.ui.performance" ) . log ( Level . CONFIG , "Slowness<sp>detected" , params ) ; } else { org . netbeans . modules . jumpto . type . GoToTypeAction . LOGGER . log ( Level . WARNING , "no<sp>snapshot<sp>taken" ) ; } } catch ( java . lang . Exception ex ) { org . openide . util . Exceptions . printStackTrace ( ex ) ; } }
|
org . junit . Assert . assertTrue ( finished [ 0 ] )
|
testGetChildren_returnsSafeCopy ( ) { org . eclipse . swt . widgets . Button button = new org . eclipse . swt . widgets . Button ( composite , org . eclipse . swt . SWT . PUSH ) ; org . eclipse . swt . widgets . Control [ ] children = composite . getChildren ( ) ; children [ 0 ] = null ; "<AssertPlaceHolder>" ; } getChildren ( ) { return childCollections . toArray ( ) ; }
|
org . junit . Assert . assertArrayEquals ( new org . eclipse . swt . widgets . Control [ ] { button } , composite . getChildren ( ) )
|
createQuery2 ( ) { java . util . List < com . querydsl . core . Tuple > rows = query ( ) . from ( com . querydsl . jpa . HibernateBase . cat ) . select ( new com . querydsl . core . types . Expression [ ] { com . querydsl . jpa . HibernateBase . cat . id , com . querydsl . jpa . HibernateBase . cat . name } ) . createQuery ( ) . list ( ) ; for ( com . querydsl . core . Tuple row : rows ) { "<AssertPlaceHolder>" ; } } size ( ) { query ( store , store . products . size ( ) . gt ( 0 ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , row . size ( ) )
|
getDiskImages ( ) { prepareVdcClientWithDiskImages ( ) ; java . util . List < org . oscm . app . iaas . data . DiskImage > result = rorVSystemCommunication . getDiskImages ( properties ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , result . size ( ) )
|
testGetBusinessObjectDefinitionTagsByBusinessObjectDefinition ( ) { org . finra . herd . model . api . xml . BusinessObjectDefinitionKey businessObjectDefinitionKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ( BDEF_NAMESPACE , BDEF_NAME ) ; java . util . List < org . finra . herd . model . api . xml . TagKey > tagKeys = java . util . Arrays . asList ( new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) , new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE_2 , TAG_CODE_2 ) ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKey businessObjectDefinitionTagKey = new org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKey ( businessObjectDefinitionKey , new org . finra . herd . model . api . xml . TagKey ( TAG_TYPE , TAG_CODE ) ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKeys BusinessObjectDefinitionTagKeys = new org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKeys ( java . util . Arrays . asList ( businessObjectDefinitionTagKey ) ) ; when ( businessObjectDefinitionTagService . getBusinessObjectDefinitionTagsByBusinessObjectDefinition ( businessObjectDefinitionKey ) ) . thenReturn ( BusinessObjectDefinitionTagKeys ) ; org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKeys result = businessObjectDefinitionTagRestController . getBusinessObjectDefinitionTagsByBusinessObjectDefinition ( org . finra . herd . rest . BDEF_NAMESPACE , org . finra . herd . rest . BDEF_NAME ) ; verify ( businessObjectDefinitionTagService ) . getBusinessObjectDefinitionTagsByBusinessObjectDefinition ( businessObjectDefinitionKey ) ; verifyNoMoreInteractions ( businessObjectDefinitionTagService ) ; "<AssertPlaceHolder>" ; } getBusinessObjectDefinitionTagsByBusinessObjectDefinition ( org . finra . herd . model . api . xml . BusinessObjectDefinitionKey ) { businessObjectDefinitionHelper . validateBusinessObjectDefinitionKey ( businessObjectDefinitionKey ) ; org . finra . herd . model . jpa . BusinessObjectDefinitionEntity businessObjectDefinitionEntity = businessObjectDefinitionDaoHelper . getBusinessObjectDefinitionEntity ( businessObjectDefinitionKey ) ; return new org . finra . herd . model . api . xml . BusinessObjectDefinitionTagKeys ( businessObjectDefinitionTagDao . getBusinessObjectDefinitionTagsByBusinessObjectDefinitionEntity ( businessObjectDefinitionEntity ) ) ; }
|
org . junit . Assert . assertEquals ( BusinessObjectDefinitionTagKeys , result )
|
reduceLeft ( ) { com . jnape . palatable . lambda . monoid . Monoid < java . lang . Integer > sum = com . jnape . palatable . lambda . monoid . Monoid . monoid ( ( x , y ) -> x + y , 0 ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( ( ( java . lang . Integer ) ( 6 ) ) , sum . reduceLeft ( asList ( 1 , 2 , 3 ) ) )
|
testToString ( ) { com . thoughtworks . qdox . model . expression . AnnotationValue value = mock ( com . thoughtworks . qdox . model . expression . AnnotationValue . class ) ; when ( value . getParameterValue ( ) ) . thenReturn ( "index" ) ; com . thoughtworks . qdox . model . expression . PostIncrement expr = new com . thoughtworks . qdox . model . expression . PostIncrement ( value ) ; "<AssertPlaceHolder>" ; } toString ( ) { return "++" + ( getValue ( ) . toString ( ) ) ; }
|
org . junit . Assert . assertEquals ( ( ( value . toString ( ) ) + "++" ) , expr . toString ( ) )
|
testOptimize ( ) { org . hibernate . search . FullTextSession s = org . hibernate . search . Search . getFullTextSession ( openSession ( ) ) ; org . hibernate . Transaction tx = s . beginTransaction ( ) ; int loop = 2000 ; for ( int i = 0 ; i < loop ; i ++ ) { org . hibernate . search . test . session . Email email = new org . hibernate . search . test . session . Email ( ) ; email . setId ( ( ( ( long ) ( i ) ) + 1 ) ) ; email . setTitle ( "JBoss<sp>World<sp>Berlin" ) ; email . setBody ( "Meet<sp>the<sp>guys<sp>who<sp>wrote<sp>the<sp>software" ) ; s . persist ( email ) ; } tx . commit ( ) ; s . close ( ) ; s = org . hibernate . search . Search . getFullTextSession ( openSession ( ) ) ; tx = s . beginTransaction ( ) ; s . getSearchFactory ( ) . optimize ( org . hibernate . search . test . session . Email . class ) ; tx . commit ( ) ; s . close ( ) ; s = org . hibernate . search . Search . getFullTextSession ( openSession ( ) ) ; tx = s . beginTransaction ( ) ; org . apache . lucene . queryparser . classic . QueryParser parser = new org . apache . lucene . queryparser . classic . QueryParser ( "id" , org . hibernate . search . testsupport . TestConstants . stopAnalyzer ) ; int result = s . createFullTextQuery ( parser . parse ( "body:wrote" ) ) . getResultSize ( ) ; "<AssertPlaceHolder>" ; s . createQuery ( ( "delete<sp>" + ( org . hibernate . search . test . session . Email . class . getName ( ) ) ) ) . executeUpdate ( ) ; tx . commit ( ) ; s . close ( ) ; } getResultSize ( ) { try { return doGetResultSize ( ) ; } catch ( org . hibernate . HibernateException he ) { throw getExceptionConverter ( ) . convert ( he ) ; } }
|
org . junit . Assert . assertEquals ( 2000 , result )
|
convertJsonToDataNode ( ) { org . onosproject . restconf . utils . ObjectMapper mapper = new org . onosproject . restconf . utils . ObjectMapper ( ) ; org . onosproject . restconf . utils . ObjectNode compareNode = mapper . createObjectNode ( ) . put ( "alpha" , "abc" ) . put ( "beta" , 123 ) . put ( "gamma" , true ) ; org . onosproject . restconf . utils . ResourceData resourceData = org . onosproject . restconf . utils . ParseUtils . convertJsonToDataNode ( "/xyz" , compareNode ) ; org . onosproject . restconf . utils . ObjectNode testNode = org . onosproject . restconf . utils . ParseUtils . convertDataNodeToJson ( resourceData . resourceId ( ) , resourceData . dataNode ( ) ) ; "<AssertPlaceHolder>" ; } convertDataNodeToJson ( org . onosproject . yang . model . ResourceId , org . onosproject . yang . model . DataNode ) { org . onosproject . yang . runtime . RuntimeContext . Builder runtimeContextBuilder = org . onosproject . yang . runtime . DefaultRuntimeContext . builder ( ) ; runtimeContextBuilder . setDataFormat ( org . onosproject . restconf . utils . RestconfUtils . JSON_FORMAT ) ; org . onosproject . yang . runtime . RuntimeContext context = runtimeContextBuilder . build ( ) ; org . onosproject . yang . model . DefaultResourceData . Builder resourceDataBuilder = org . onosproject . yang . model . DefaultResourceData . builder ( ) ; resourceDataBuilder . addDataNode ( dataNode ) ; resourceDataBuilder . resourceId ( rid ) ; org . onosproject . yang . model . ResourceData resourceData = resourceDataBuilder . build ( ) ; org . onosproject . yang . runtime . DefaultCompositeData . Builder compositeDataBuilder = org . onosproject . yang . runtime . DefaultCompositeData . builder ( ) ; compositeDataBuilder . resourceData ( resourceData ) ; org . onosproject . yang . runtime . CompositeData compositeData = compositeDataBuilder . build ( ) ; com . fasterxml . jackson . databind . node . ObjectNode rootNode = null ; try { org . onosproject . yang . runtime . CompositeStream compositeStream = org . onosproject . restconf . utils . RestconfUtils . YANG_RUNTIME . encode ( compositeData , context ) ; java . io . InputStream inputStream = compositeStream . resourceData ( ) ; rootNode = org . onosproject . restconf . utils . RestconfUtils . convertInputStreamToObjectNode ( inputStream ) ; } catch ( java . lang . Exception ex ) { org . onosproject . restconf . utils . RestconfUtils . log . error ( "convertInputStreamToObjectNode<sp>failure:<sp>{}" , ex . getMessage ( ) ) ; org . onosproject . restconf . utils . RestconfUtils . log . debug ( "convertInputStreamToObjectNode<sp>failure" , ex ) ; } if ( rootNode == null ) { throw new org . onosproject . restconf . api . RestconfException ( "ERROR:<sp>InputStream<sp>can<sp>not<sp>be<sp>convert<sp>to<sp>ObjectNode" , null , RestconfError . ErrorTag . DATA_MISSING , CONFLICT , java . util . Optional . empty ( ) ) ; } return rootNode ; }
|
org . junit . Assert . assertEquals ( testNode , compareNode )
|
testGetRF1DifferentOrders ( ) { org . nd4j . linalg . api . ndarray . INDArray a = org . nd4j . linalg . factory . Nd4j . linspace ( 1 , 9 , 9 ) . reshape ( 3 , 3 ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.0 , 8.0 , 9.0 , 0.14285715 , 0.85714287 , 1.7142857 , 0.5714286 , 0.5 , 0.0 } , new int [ ] { 3 , 3 } , 'c' ) ; org . nd4j . linalg . api . ndarray . INDArray r = org . nd4j . linalg . factory . Nd4j . getNDArrayFactory ( ) . lapack ( ) . getrf ( a ) ; "<AssertPlaceHolder>" ; } getrf ( org . nd4j . linalg . api . ndarray . INDArray ) { if ( ( ( A . rows ( ) ) > ( Integer . MAX_VALUE ) ) || ( ( A . columns ( ) ) > ( Integer . MAX_VALUE ) ) ) throw new org . nd4j . linalg . exception . ND4JArraySizeException ( ) ; int m = ( ( int ) ( A . rows ( ) ) ) ; int n = ( ( int ) ( A . columns ( ) ) ) ; org . nd4j . linalg . api . ndarray . INDArray INFO = org . nd4j . linalg . factory . Nd4j . createArrayFromShapeBuffer ( org . nd4j . linalg . factory . Nd4j . getDataBufferFactory ( ) . createInt ( 1 ) , org . nd4j . linalg . factory . Nd4j . getShapeInfoProvider ( ) . createShapeInformation ( new int [ ] { 1 , 1 } ) . getFirst ( ) ) ; int mn = java . lang . Math . min ( m , n ) ; org . nd4j . linalg . api . ndarray . INDArray IPIV = org . nd4j . linalg . factory . Nd4j . createArrayFromShapeBuffer ( org . nd4j . linalg . factory . Nd4j . getDataBufferFactory ( ) . createInt ( mn ) , org . nd4j . linalg . factory . Nd4j . getShapeInfoProvider ( ) . createShapeInformation ( new int [ ] { 1 , mn } ) . getFirst ( ) ) ; if ( ( A . data ( ) . dataType ( ) ) == ( DataBuffer . Type . DOUBLE ) ) dgetrf ( m , n , A , IPIV , INFO ) ; else if ( ( A . data ( ) . dataType ( ) ) == ( DataBuffer . Type . FLOAT ) ) sgetrf ( m , n , A , IPIV , INFO ) ; else throw new java . lang . UnsupportedOperationException ( ) ; if ( ( INFO . getInt ( 0 ) ) < 0 ) { throw new java . lang . Error ( ( ( "Parameter<sp>#" + ( INFO . getInt ( 0 ) ) ) + "<sp>to<sp>getrf()<sp>was<sp>not<sp>valid" ) ) ; } else if ( ( INFO . getInt ( 0 ) ) > 0 ) { log . warn ( ( "The<sp>matrix<sp>is<sp>singular<sp>-<sp>cannot<sp>be<sp>used<sp>for<sp>inverse<sp>op.<sp>Check<sp>L<sp>matrix<sp>at<sp>row<sp>" + ( INFO . getInt ( 0 ) ) ) ) ; } return IPIV ; }
|
org . junit . Assert . assertEquals ( exp , a )
|
getZeroTimeout ( ) { io . trane . future . Future < java . lang . Integer > future = io . trane . future . Future . value ( 1 ) ; "<AssertPlaceHolder>" ; } get ( io . trane . future . Future ) { return future . get ( Duration . ZERO ) ; }
|
org . junit . Assert . assertEquals ( new java . lang . Integer ( 1 ) , future . get ( Duration . ZERO ) )
|
testHeapCacualtion_2 ( ) { tool = new org . teiid . sizing . Caculation ( 2 , 200 , true ) ; "<AssertPlaceHolder>" ; } heapCaculation ( ) { int sources = this . getSource_count ( ) ; int concurrent = this . getQueries_concurrent ( ) ; int total_in_mb = ( ( concurrent * 5 ) * sources ) + 300 ; int heap = ( total_in_mb / 1024 ) + 1 ; if ( ( heap < 16 ) && ( ! ( isRunOnCloud ) ) ) { heap = 16 ; } return heap ; }
|
org . junit . Assert . assertEquals ( 3 , tool . heapCaculation ( ) )
|
getPossibleUserIdsOfPendingTasks_should_return_users_mapped_through_his_groupid_in_actormember ( ) { final org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; final org . bonitasoft . engine . core . process . instance . model . SPendingActivityMapping addedPendingMapping = repository . add ( aPendingActivityMapping ( ) . withActorId ( actor . getId ( ) ) . build ( ) ) ; repository . add ( anActorMember ( ) . forActor ( actor ) . withGroupId ( org . bonitasoft . engine . core . process . instance . model . ProcessInstanceQueriesTest . aGroupId ) . build ( ) ) ; final org . bonitasoft . engine . identity . model . SUser expectedUser = repository . add ( aUser ( ) . withId ( 1L ) . build ( ) ) ; repository . add ( aUserMembership ( ) . forUser ( expectedUser ) . memberOf ( org . bonitasoft . engine . core . process . instance . model . ProcessInstanceQueriesTest . aGroupId , org . bonitasoft . engine . core . process . instance . model . ProcessInstanceQueriesTest . aRoleId ) . build ( ) ) ; final org . bonitasoft . engine . identity . model . SUser notExpectedUser = repository . add ( aUser ( ) . withId ( 2L ) . build ( ) ) ; repository . add ( aUserMembership ( ) . forUser ( notExpectedUser ) . memberOf ( org . bonitasoft . engine . core . process . instance . model . ProcessInstanceQueriesTest . anotherGroupId , org . bonitasoft . engine . core . process . instance . model . ProcessInstanceQueriesTest . aRoleId ) . build ( ) ) ; final java . util . List < java . lang . Long > userIds = repository . getPossibleUserIdsOfPendingTasks ( addedPendingMapping . getActivityId ( ) ) ; "<AssertPlaceHolder>" . containsOnly ( expectedUser . getId ( ) ) ; } getActivityId ( ) { return activityId ; }
|
org . junit . Assert . assertThat ( userIds )
|
testSmsMessageError ( ) { org . restcomm . connect . dao . entities . SmsMessage smsMessage = createSms ( ) ; final org . restcomm . connect . dao . SmsMessagesDao messages = org . restcomm . connect . dao . mybatis . SmsMessagesDaoTest . manager . getSmsMessagesDao ( ) ; messages . addSmsMessage ( smsMessage ) ; final org . restcomm . connect . dao . entities . SmsMessage . Builder builder2 = org . restcomm . connect . dao . entities . SmsMessage . builder ( ) ; builder2 . copyMessage ( smsMessage ) ; builder2 . setError ( MessageError . QUEUE_OVERFLOW ) ; messages . updateSmsMessage ( builder2 . build ( ) ) ; org . restcomm . connect . dao . entities . SmsMessage resultantSmsMessage = messages . getSmsMessage ( smsMessage . getSid ( ) ) ; "<AssertPlaceHolder>" ; } getError ( ) { return error ; }
|
org . junit . Assert . assertEquals ( MessageError . QUEUE_OVERFLOW , resultantSmsMessage . getError ( ) )
|
testDecode ( ) { java . lang . String original = "ein<sp>verr+++ckter<sp>text<sp>mit<sp>Leerzeichen,<sp>Plus<sp>und<sp>Umlauten" ; java . lang . String encoded = java . net . URLEncoder . encode ( original , "UTF-8" ) ; "<AssertPlaceHolder>" ; } decodeURIComponent ( java . lang . String , boolean ) { if ( s == null ) { return null ; } final int size = s . length ( ) ; boolean modified = false ; int i ; for ( i = 0 ; i < size ; i ++ ) { final char c = s . charAt ( i ) ; if ( ( c == '%' ) || ( plus && ( c == '+' ) ) ) { modified = true ; break ; } } if ( ! modified ) { return s ; } final byte [ ] buf = s . getBytes ( StandardCharsets . UTF_8 ) ; int pos = i ; for ( ; i < size ; i ++ ) { char c = s . charAt ( i ) ; if ( c == '%' ) { if ( i == ( size - 1 ) ) { throw new java . lang . IllegalArgumentException ( ( ( "unterminated<sp>escape" + "<sp>sequence<sp>at<sp>end<sp>of<sp>string:<sp>" ) + s ) ) ; } c = s . charAt ( ( ++ i ) ) ; if ( c == '%' ) { buf [ ( pos ++ ) ] = '%' ; break ; } if ( i >= ( size - 1 ) ) { throw new java . lang . IllegalArgumentException ( ( ( "partial<sp>escape" + "<sp>sequence<sp>at<sp>end<sp>of<sp>string:<sp>" ) + s ) ) ; } c = io . vertx . core . net . impl . URIDecoder . decodeHexNibble ( c ) ; final char c2 = io . vertx . core . net . impl . URIDecoder . decodeHexNibble ( s . charAt ( ( ++ i ) ) ) ; if ( ( c == ( Character . MAX_VALUE ) ) || ( c2 == ( Character . MAX_VALUE ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( "invalid<sp>escape<sp>sequence<sp>`%" + ( s . charAt ( ( i - 1 ) ) ) ) + ( s . charAt ( i ) ) ) + "'<sp>at<sp>index<sp>" ) + ( i - 2 ) ) + "<sp>of:<sp>" ) + s ) ) ; } c = ( ( char ) ( ( c * 16 ) + c2 ) ) ; buf [ ( pos ++ ) ] = ( ( byte ) ( c ) ) ; } else { buf [ ( pos ++ ) ] = ( ( byte ) ( ( plus && ( c == '+' ) ) ? '<sp>' : c ) ) ; } } return new java . lang . String ( buf , 0 , pos , java . nio . charset . StandardCharsets . UTF_8 ) ; }
|
org . junit . Assert . assertEquals ( original , io . vertx . core . net . impl . URIDecoder . decodeURIComponent ( encoded , true ) )
|
testGetLambdaClientConfig ( ) { com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables variables = new com . xti . jenkins . plugin . awslambda . upload . LambdaUploadVariables ( false , "ID" , hudson . util . Secret . fromString ( "SECRET}" ) , "30" 1 , "30" 3 , "description<sp>DESCRIPTION" , "FUNCTION" , "HANDLER" , "1024" , "ROLE" , "RUNTIME" , "30" , true , false , "30" 2 , null , false , "subnet1,<sp>subnet2" , "30" 0 ) ; variables . expandVariables ( new hudson . EnvVars ( ) ) ; com . xti . jenkins . plugin . awslambda . util . LambdaClientConfig lambdaClientConfig = variables . getLambdaClientConfig ( ) ; com . amazonaws . services . lambda . AWSLambda lambda = lambdaClientConfig . getClient ( ) ; "<AssertPlaceHolder>" ; } getClient ( ) { if ( useDefaultAWSCredentials ) { return new com . amazonaws . services . lambda . AWSLambdaClient ( new com . amazonaws . auth . DefaultAWSCredentialsProviderChain ( ) , getClientConfiguration ( ) ) . withRegion ( com . amazonaws . regions . Region . getRegion ( com . amazonaws . regions . Regions . fromName ( region ) ) ) ; } else { return new com . amazonaws . services . lambda . AWSLambdaClient ( new com . amazonaws . auth . BasicAWSCredentials ( accessKeyId , secretKey ) , getClientConfiguration ( ) ) . withRegion ( com . amazonaws . regions . Region . getRegion ( com . amazonaws . regions . Regions . fromName ( region ) ) ) ; } }
|
org . junit . Assert . assertNotNull ( lambda )
|
resetShouldClearBytes ( ) { container1 . bytesField . clear ( ) . append ( "value1" ) ; container2 . bytesField . clear ( ) . append ( "value2" ) ; net . openhft . chronicle . wire . Wires . reset ( container1 ) ; net . openhft . chronicle . wire . Wires . reset ( container2 ) ; container1 . bytesField . clear ( ) . append ( "value1" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( "ScalarStrategy<" + ( type . getName ( ) ) ) + ">" ; }
|
org . junit . Assert . assertEquals ( "" , container2 . bytesField . toString ( ) )
|
testRemove ( ) { com . liferay . social . kernel . model . SocialActivityLimit newSocialActivityLimit = addSocialActivityLimit ( ) ; _persistence . remove ( newSocialActivityLimit ) ; com . liferay . social . kernel . model . SocialActivityLimit existingSocialActivityLimit = _persistence . fetchByPrimaryKey ( newSocialActivityLimit . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
|
org . junit . Assert . assertNull ( existingSocialActivityLimit )
|
sumUsingReduce ( ) { int count = java . util . stream . Stream . of ( 1 , 2 , 3 ) . reduce ( 0 , ( acc , element ) -> acc + element ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( 6 , count )
|
testChanges ( ) { final org . drools . verifier . core . index . keys . Values a = new org . drools . verifier . core . index . keys . Values ( ) ; final org . drools . verifier . core . index . keys . Values b = new org . drools . verifier . core . index . keys . Values ( ) ; "<AssertPlaceHolder>" ; } isThereChanges ( org . drools . verifier . core . index . keys . Values ) { if ( ( this . isEmpty ( ) ) && ( ! ( otherValues . isEmpty ( ) ) ) ) { return true ; } else if ( ( ! ( this . isEmpty ( ) ) ) && ( otherValues . isEmpty ( ) ) ) { return true ; } else if ( ( this . isEmpty ( ) ) && ( otherValues . isEmpty ( ) ) ) { return false ; } else if ( ( this . size ( ) ) != ( otherValues . size ( ) ) ) { return true ; } else if ( ! ( areValuesEqual ( otherValues ) ) ) { return true ; } else { return false ; } }
|
org . junit . Assert . assertFalse ( a . isThereChanges ( b ) )
|
testHandle ( ) { response = new com . weibo . api . motan . rpc . DefaultResponse ( ) ; response . setValue ( "test" ) ; response . setProcessTime ( 1 ) ; com . weibo . api . motan . rpc . Provider provider = new com . weibo . api . motan . rpc . DefaultProvider ( null , null , com . weibo . api . motan . protocol . yar . YarMessageRouterTest . AnnoService . class ) ; router . addProvider ( provider ) ; com . weibo . yar . YarRequest yarRequest = new com . weibo . yar . YarRequest ( 1 , "JSON" , "hello" , new java . lang . Object [ ] { "params" } ) ; yarRequest . setRequestPath ( requestPath ) ; com . weibo . yar . YarResponse yarResponse = ( ( com . weibo . yar . YarResponse ) ( router . handle ( null , yarRequest ) ) ) ; "<AssertPlaceHolder>" ; } convert ( com . weibo . yar . YarRequest , java . lang . Class ) { com . weibo . api . motan . rpc . DefaultRequest request = new com . weibo . api . motan . rpc . DefaultRequest ( ) ; request . setInterfaceName ( interfaceClass . getName ( ) ) ; request . setMethodName ( yarRequest . getMethodName ( ) ) ; request . setRequestId ( yarRequest . getId ( ) ) ; com . weibo . api . motan . protocol . yar . YarProtocolUtil . addArguments ( request , interfaceClass , yarRequest . getMethodName ( ) , yarRequest . getParameters ( ) ) ; if ( yarRequest instanceof com . weibo . api . motan . protocol . yar . AttachmentRequest ) { request . setAttachments ( ( ( com . weibo . api . motan . protocol . yar . AttachmentRequest ) ( yarRequest ) ) . getAttachments ( ) ) ; } return request ; }
|
org . junit . Assert . assertEquals ( com . weibo . api . motan . protocol . yar . YarProtocolUtil . convert ( response , "JSON" ) , yarResponse )
|
queryCount ( ) { com . dexcoder . test . model . User u = new com . dexcoder . test . model . User ( ) ; u . setUserType ( "1" ) ; int count = jdbcDao . queryCount ( u ) ; "<AssertPlaceHolder>" ; } queryCount ( com . dexcoder . dal . build . Criteria ) { com . dexcoder . dal . BoundSql boundSql = criteria . mappingHandler ( getMappingHandler ( ) ) . addSelectFunc ( "count(*)" , true , false , true ) . build ( true ) ; return jdbcTemplate . queryForObject ( boundSql . getSql ( ) , boundSql . getParameters ( ) . toArray ( ) , com . dexcoder . dal . spring . Integer . class ) ; }
|
org . junit . Assert . assertTrue ( ( count > 0 ) )
|
testSerialization ( ) { com . orsoncharts . data . KeyedValuesItemKey k1 = new com . orsoncharts . data . KeyedValuesItemKey ( "A" ) ; com . orsoncharts . data . KeyedValuesItemKey k2 = ( ( com . orsoncharts . data . KeyedValuesItemKey ) ( com . orsoncharts . TestUtils . serialized ( k1 ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( obj == ( this ) ) { return true ; } if ( ! ( obj instanceof com . orsoncharts . graphics3d . Offset3D ) ) { return false ; } com . orsoncharts . graphics3d . Offset3D that = ( ( com . orsoncharts . graphics3d . Offset3D ) ( obj ) ) ; if ( ( this . dx ) != ( that . dx ) ) { return false ; } if ( ( this . dy ) != ( that . dy ) ) { return false ; } if ( ( this . dz ) != ( that . dz ) ) { return false ; } return true ; }
|
org . junit . Assert . assertTrue ( k1 . equals ( k2 ) )
|
purgeDrug_shouldPurgeTheGivenDrug ( ) { int drugId = 2 ; conceptService . purgeDrug ( conceptService . getDrug ( drugId ) ) ; "<AssertPlaceHolder>" ; } getDrug ( java . lang . Integer ) { return ( ( org . openmrs . Drug ) ( sessionFactory . getCurrentSession ( ) . get ( org . openmrs . Drug . class , drugId ) ) ) ; }
|
org . junit . Assert . assertNull ( conceptService . getDrug ( drugId ) )
|
createPlatformException ( ) { "<AssertPlaceHolder>" ; org . bonitasoft . engine . platform . PlatformIT . platformAPI . initializePlatform ( ) ; } isPlatformInitialized ( ) { org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) ) ; }
|
org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) )
|
testCanHandle ( ) { org . apache . cxf . ws . security . sts . provider . model . secext . BinarySecurityTokenType binarySecurityTokenType = new org . apache . cxf . ws . security . sts . provider . model . secext . BinarySecurityTokenType ( ) ; binarySecurityTokenType . setEncodingType ( ( ( org . apache . wss4j . dom . WSConstants . SOAPMESSAGE_NS ) + "#Base64Binary" ) ) ; binarySecurityTokenType . setValueType ( ( ( ( org . codice . ddf . security . handler . api . BSTAuthenticationToken . BST_NS ) + "#" ) + ( org . codice . ddf . security . handler . api . BSTAuthenticationToken . BST_LN ) ) ) ; org . apache . cxf . sts . request . ReceivedToken receivedToken = mock ( org . apache . cxf . sts . request . ReceivedToken . class ) ; when ( receivedToken . getToken ( ) ) . thenReturn ( binarySecurityTokenType ) ; org . codice . ddf . security . delegation . BSTDelegationHandler bstDelegationHandler = new org . codice . ddf . security . delegation . BSTDelegationHandler ( ) ; boolean result = bstDelegationHandler . canHandleToken ( receivedToken ) ; "<AssertPlaceHolder>" ; } canHandleToken ( org . apache . cxf . sts . request . ReceivedToken ) { return canHandleToken ( validateTarget , null ) ; }
|
org . junit . Assert . assertEquals ( true , result )
|
AcceptedTriggersRespectGuards ( ) { com . github . oxo42 . stateless4j . StateMachineConfig < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > config = new com . github . oxo42 . stateless4j . StateMachineConfig ( ) ; config . configure ( State . B ) . permitIf ( Trigger . X , State . A , new com . github . oxo42 . stateless4j . delegates . FuncBoolean ( ) { @ com . github . oxo42 . stateless4j . Override public boolean call ( ) { return false ; } } ) ; com . github . oxo42 . stateless4j . StateMachine < com . github . oxo42 . stateless4j . State , com . github . oxo42 . stateless4j . Trigger > sm = new com . github . oxo42 . stateless4j . StateMachine ( State . B , config ) ; "<AssertPlaceHolder>" ; } getPermittedTriggers ( ) { return getCurrentRepresentation ( ) . getPermittedTriggers ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , sm . getPermittedTriggers ( ) . size ( ) )
|
select_withWritePolicyAllow ( ) { org . sonatype . nexus . repository . storage . WritePolicy writePolicy = underTest . select ( asset , org . sonatype . nexus . repository . maven . internal . ALLOW ) ; "<AssertPlaceHolder>" ; } select ( org . sonatype . nexus . repository . storage . Asset , org . sonatype . nexus . repository . storage . WritePolicy ) { return configured ; }
|
org . junit . Assert . assertEquals ( writePolicy , org . sonatype . nexus . repository . maven . internal . ALLOW )
|
testValidPasses ( ) { hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceMessageSendingStrictValid diag = new hu . elte . txtuml . api . model . execution . seqdiag . sequences . SequenceMessageSendingStrictValid ( ) ; hu . elte . txtuml . api . model . execution . SequenceDiagramExecutor executor = hu . elte . txtuml . api . model . execution . SequenceDiagramExecutor . create ( ) ; executor . setDiagram ( diag ) . run ( ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { synchronized ( this . errors ) { return com . google . common . collect . ImmutableList . copyOf ( this . errors ) ; } }
|
org . junit . Assert . assertTrue ( executor . getErrors ( ) . isEmpty ( ) )
|
testUsernameToken ( ) { java . lang . String actions = ( ( ( ( ( ( org . apache . wss4j . common . ConfigurationConstants . ENCRYPT ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . SIGNATURE ) ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . TIMESTAMP ) ) + "<sp>" ) + ( org . apache . wss4j . common . ConfigurationConstants . USERNAME_TOKEN ) ; wsIn . setProperty ( ConfigurationConstants . ACTION , actions ) ; wsOut . setProperty ( ConfigurationConstants . ACTION , actions ) ; "<AssertPlaceHolder>" ; } echo ( int ) { return i ; }
|
org . junit . Assert . assertEquals ( "test" , echo . echo ( "test" ) )
|
testForcePullImageFalse ( ) { org . apache . flink . configuration . Configuration config = new org . apache . flink . configuration . Configuration ( ) ; config . setBoolean ( MesosTaskManagerParameters . MESOS_RM_CONTAINER_DOCKER_FORCE_PULL_IMAGE , false ) ; org . apache . flink . mesos . runtime . clusterframework . MesosTaskManagerParameters params = org . apache . flink . mesos . runtime . clusterframework . MesosTaskManagerParameters . create ( config ) ; "<AssertPlaceHolder>" ; } dockerForcePullImage ( ) { return dockerForcePullImage ; }
|
org . junit . Assert . assertEquals ( params . dockerForcePullImage ( ) , false )
|
testSubLogger ( ) { listener . clear ( ) ; org . scijava . log . Logger sub = logger . subLogger ( "sub" ) ; sub . error ( "Hello<sp>World!" ) ; "<AssertPlaceHolder>" ; } hasLogged ( java . util . function . Predicate ) { return messages . stream ( ) . anyMatch ( predicate ) ; }
|
org . junit . Assert . assertTrue ( listener . hasLogged ( ( m ) -> m . source ( ) . path ( ) . contains ( "sub" ) ) )
|
automaticallyRefreshesModelAfterStaleElementException ( ) { java . lang . String paragraphsText = testPage . staleElementsSection . getParagraphsText ( ) ; testPage . staleElementsSection . triggerStaleElement ( ) ; "<AssertPlaceHolder>" ; } getParagraphsText ( ) { return paragraph . getText ( ) ; }
|
org . junit . Assert . assertEquals ( paragraphsText , testPage . staleElementsSection . getParagraphsText ( ) )
|
akkaAkka ( ) { final int NUM_MSG = 10000000 ; final akka . actor . ActorSystem system = akka . actor . ActorSystem . create ( "reactive-interop" ) ; final akka . stream . ActorMaterializer mat = akka . stream . ActorMaterializer . create ( akka . stream . ActorMaterializerSettings . create ( system ) . withInputBuffer ( 4096 , 4096 ) , system ) ; org . nustaq . kontraktor . util . RateMeasure rm = new org . nustaq . kontraktor . util . RateMeasure ( "rate" ) ; java . util . concurrent . CountDownLatch count = new java . util . concurrent . CountDownLatch ( NUM_MSG ) ; java . lang . Iterable it = ( ) -> java . util . stream . IntStream . range ( 0 , NUM_MSG ) . mapToObj ( ( x ) -> x ) . iterator ( ) ; akka . stream . javadsl . Source . from ( it ) . runWith ( akka . stream . javadsl . Sink . foreach ( ( elem ) -> { rm . count ( ) ; count . countDown ( ) ; } ) , mat ) ; int secondsWait = 50 ; while ( ( ( count . getCount ( ) ) > 0 ) && ( ( secondsWait -- ) > 0 ) ) { System . out . println ( ( "count:" + ( count . getCount ( ) ) ) ) ; java . lang . Thread . sleep ( 1000 ) ; } system . shutdown ( ) ; "<AssertPlaceHolder>" ; java . lang . Thread . sleep ( 1000 ) ; } getCount ( ) { return count . get ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( count . getCount ( ) ) == 0 ) )
|
testGetLabelResource ( ) { System . out . println ( "getLabelResource" ) ; kg . apc . jmeter . vizualizers . DbMonGui instance = new kg . apc . jmeter . vizualizers . DbMonGui ( ) ; java . lang . String result = instance . getLabelResource ( ) ; "<AssertPlaceHolder>" ; } getLabelResource ( ) { return this . getClass ( ) . getSimpleName ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
|
testDownload ( ) { java . lang . String file = "file1_downloaded.txt" ; java . nio . file . Files . write ( storage . resolve ( file ) , io . datakernel . remotefs . FsIntegrationTest . CONTENT ) ; io . datakernel . bytebuf . ByteBuf result = await ( download ( file ) ) ; "<AssertPlaceHolder>" ; } asArray ( ) { byte [ ] bytes = getArray ( ) ; recycle ( ) ; return bytes ; }
|
org . junit . Assert . assertArrayEquals ( io . datakernel . remotefs . FsIntegrationTest . CONTENT , result . asArray ( ) )
|
whenBatchSizeDoesNotNumberOfStepsThenAllStepsShouldBeExecuted ( ) { com . graphaware . tx . executor . batch . BatchTransactionExecutor batchExecutor = new com . graphaware . tx . executor . batch . NoInputBatchTransactionExecutor ( database , 5 , 6 , com . graphaware . tx . executor . batch . CreateNode . getInstance ( ) ) ; batchExecutor . execute ( ) ; try ( org . neo4j . graphdb . Transaction tx = database . beginTx ( ) ) { "<AssertPlaceHolder>" ; } } countNodes ( org . neo4j . graphdb . GraphDatabaseService ) { return com . graphaware . common . util . IterableUtils . count ( database . getAllNodes ( ) ) ; }
|
org . junit . Assert . assertEquals ( 6 , countNodes ( database ) )
|
testFindByServiceCode ( ) { java . lang . String serviceCode = "service001" ; org . oscarehr . common . model . BillingService billingService1 = createBillingServiceWithRegion ( "service001" , "ON" , "20080101" ) ; org . oscarehr . common . model . BillingService billingService2 = createBillingServiceWithRegion ( "service001" , "ON" , "20120101" ) ; org . oscarehr . common . model . BillingService billingService3 = createBillingServiceWithRegion ( "service001" , "ON" , "20100101" ) ; org . oscarehr . common . model . BillingService billingService4 = createBillingServiceWithRegion ( "service002" , "ON" , "20100101" ) ; dao . persist ( billingService1 ) ; dao . persist ( billingService2 ) ; dao . persist ( billingService3 ) ; dao . persist ( billingService4 ) ; java . util . List < org . oscarehr . common . model . BillingService > resultList = dao . findByServiceCode ( serviceCode ) ; java . util . List < org . oscarehr . common . model . BillingService > expectedList = new java . util . ArrayList < org . oscarehr . common . model . BillingService > ( java . util . Arrays . asList ( billingService2 , billingService3 , billingService1 ) ) ; if ( ( resultList . size ( ) ) != ( expectedList . size ( ) ) ) { logger . info ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedList . size ( ) ) ; i ++ ) { if ( ! ( expectedList . get ( i ) . equals ( resultList . get ( i ) ) ) ) { logger . warn ( "Items<sp>not<sp>sorted<sp>by<sp>Billing<sp>Service<sp>Date." ) ; org . junit . Assert . fail ( "Items<sp>not<sp>sorted<sp>by<sp>Billing<sp>Service<sp>Date<sp>Descending." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
|
org . junit . Assert . assertTrue ( true )
|
testChangeDefaultMode ( ) { org . glassfish . hk2 . api . ServiceLocator locator = org . glassfish . hk2 . runlevel . tests . utilities . Utilities . getServiceLocator ( org . glassfish . hk2 . runlevel . tests . ghost . Registrar . class ) ; org . glassfish . hk2 . api . ActiveDescriptor < ? > desc5 = org . glassfish . hk2 . utilities . BuilderHelper . activeLink ( org . glassfish . hk2 . runlevel . tests . ghost . ServiceFive . class ) . to ( org . glassfish . hk2 . runlevel . tests . ghost . ServiceFive . class ) . in ( org . glassfish . hk2 . runlevel . RunLevelServiceUtilities . getRunLevelAnnotation ( 5 , RunLevel . RUNLEVEL_MODE_NON_VALIDATING ) ) . build ( ) ; org . glassfish . hk2 . utilities . ServiceLocatorUtilities . addOneDescriptor ( locator , desc5 ) ; org . glassfish . hk2 . runlevel . RunLevelController controller = locator . getService ( org . glassfish . hk2 . runlevel . RunLevelController . class ) ; controller . proceedTo ( 0 ) ; "<AssertPlaceHolder>" ; } getService ( org . glassfish . hk2 . api . ServiceHandle ) { if ( ( root ) instanceof org . jvnet . hk2 . internal . Closeable ) { org . jvnet . hk2 . internal . Closeable closeable = ( ( org . jvnet . hk2 . internal . Closeable ) ( root ) ) ; if ( closeable . isClosed ( ) ) { throw new java . lang . IllegalStateException ( ( "This<sp>service<sp>has<sp>been<sp>unbound:<sp>" + ( root ) ) ) ; } } synchronized ( lock ) { if ( serviceDestroyed ) throw new java . lang . IllegalStateException ( "Service<sp>has<sp>been<sp>disposed" ) ; if ( serviceSet ) return service ; org . glassfish . hk2 . api . Injectee injectee = getLastInjectee ( ) ; java . lang . Class < ? > requiredClass = ( injectee == null ) ? null : org . glassfish . hk2 . utilities . reflection . ReflectionHelper . getRawClass ( injectee . getRequiredType ( ) ) ; service = org . jvnet . hk2 . internal . Utilities . createService ( root , injectee , locator , handle , requiredClass ) ; serviceSet = true ; return service ; } }
|
org . junit . Assert . assertNotNull ( locator . getService ( org . glassfish . hk2 . runlevel . tests . ghost . ServiceFive . class ) )
|
addResourceToUpdate ( ) { componentLocationUpdater . addResourceToUpdate ( resource ) ; final java . util . HashSet < org . sentilo . common . domain . SensorLocationElement > currentUpdatesAwaiting = getSetField ( componentLocationUpdater , "currentUpdatesAwaiting" ) ; "<AssertPlaceHolder>" ; } size ( ) { return isEmpty ( ) ? 0 : events . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( currentUpdatesAwaiting . size ( ) ) == 1 ) )
|
activatedPrivChatShouldResetNewPrivateMessageStatusIfCurrentlyTrue ( ) { testUser . setNewPrivMsg ( true ) ; androidUserInterface . activatedPrivChat ( testUser ) ; "<AssertPlaceHolder>" ; verify ( controller ) . changeNewMessage ( 1235 , false ) ; } isNewPrivMsg ( ) { return newPrivMsg ; }
|
org . junit . Assert . assertFalse ( testUser . isNewPrivMsg ( ) )
|
testSetMaxAutoReconnectAttemptsForever ( ) { com . amazonaws . mobileconnectors . iot . AWSIotMqttManager testClient = new com . amazonaws . mobileconnectors . iot . AWSIotMqttManager ( "test-client" , com . amazonaws . regions . Region . getRegion ( Regions . US_EAST_1 ) , com . amazonaws . mobileconnectors . iot . AWSIotMqttManagerTest . TEST_ENDPOINT_PREFIX ) ; testClient . setMaxAutoReconnectAttepts ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getMaxAutoReconnectAttempts ( ) { return maxAutoReconnectAttempts ; }
|
org . junit . Assert . assertEquals ( ( - 1 ) , testClient . getMaxAutoReconnectAttempts ( ) )
|
convertNullToByte ( ) { "<AssertPlaceHolder>" ; } convert ( java . lang . Object , java . lang . Class ) { if ( destinationClass . isPrimitive ( ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToPrimitiveWrapper ( value , destinationClass ) ) ) ; } else if ( value == null ) { return null ; } else if ( destinationClass . isInstance ( value ) ) { return ( ( T ) ( value ) ) ; } else if ( org . slim3 . util . Number . class . isAssignableFrom ( destinationClass ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToNumber ( value , destinationClass ) ) ) ; } else if ( java . util . Date . class . isAssignableFrom ( destinationClass ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToDate ( value , destinationClass ) ) ) ; } else if ( destinationClass == ( org . slim3 . util . Boolean . class ) ) { return ( ( T ) ( org . slim3 . util . BooleanUtil . toBoolean ( value ) ) ) ; } else if ( destinationClass . isEnum ( ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToEnum ( value , destinationClass ) ) ) ; } else if ( destinationClass == ( java . lang . String . class ) ) { return ( ( T ) ( value . toString ( ) ) ) ; } else if ( destinationClass == ( com . google . appengine . api . datastore . Key . class ) ) { return ( ( T ) ( org . slim3 . util . ConversionUtil . convertToKey ( value ) ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( ( ( ( "The<sp>class(" + ( value . getClass ( ) . getName ( ) ) ) + ")<sp>can<sp>not<sp>be<sp>converted<sp>to<sp>the<sp>class(" ) + ( destinationClass . getName ( ) ) ) + ")." ) ) ; } }
|
org . junit . Assert . assertThat ( org . slim3 . util . ConversionUtil . convert ( null , byte . class ) , org . hamcrest . CoreMatchers . is ( ( ( byte ) ( 0 ) ) ) )
|
shouldReconnectToSameDB ( ) { jedis . select ( 1 ) ; jedis . set ( "foo" , "bar" ) ; jedis . getClient ( ) . getSocket ( ) . shutdownInput ( ) ; jedis . getClient ( ) . getSocket ( ) . shutdownOutput ( ) ; "<AssertPlaceHolder>" ; } get ( byte [ ] ) { sendCommand ( redis . clients . jedis . GET , key ) ; }
|
org . junit . Assert . assertEquals ( "bar" , jedis . get ( "foo" ) )
|
squarePlanarUShapeTest ( ) { org . openscience . cdk . interfaces . IAtom atomA = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 2 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomB = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 1 , 1 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomC = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 1 , 0 ) ) ; org . openscience . cdk . interfaces . IAtom atomD = new org . openscience . cdk . Atom ( "C" , new javax . vecmath . Point3d ( 2 , 2 , 0 ) ) ; org . openscience . cdk . stereo . StereoTool . SquarePlanarShape shape = org . openscience . cdk . stereo . StereoTool . getSquarePlanarShape ( atomA , atomB , atomC , atomD ) ; "<AssertPlaceHolder>" ; } getSquarePlanarShape ( org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom , org . openscience . cdk . interfaces . IAtom ) { javax . vecmath . Point3d pointA = atomA . getPoint3d ( ) ; javax . vecmath . Point3d pointB = atomB . getPoint3d ( ) ; javax . vecmath . Point3d pointC = atomC . getPoint3d ( ) ; javax . vecmath . Point3d pointD = atomD . getPoint3d ( ) ; javax . vecmath . Vector3d normalA = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d normalB = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d normalC = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d tmpX = new javax . vecmath . Vector3d ( ) ; javax . vecmath . Vector3d tmpY = new javax . vecmath . Vector3d ( ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointA , pointB , pointC , normalA , tmpX , tmpY ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointB , pointC , pointD , normalB , tmpX , tmpY ) ; org . openscience . cdk . stereo . StereoTool . getRawNormal ( pointC , pointD , pointA , normalC , tmpX , tmpY ) ; normalA . normalize ( ) ; normalB . normalize ( ) ; normalC . normalize ( ) ; double aDotB = normalA . dot ( normalB ) ; double aDotC = normalA . dot ( normalC ) ; double bDotC = normalB . dot ( normalC ) ; if ( ( ( aDotB > 0 ) && ( aDotC > 0 ) ) && ( bDotC > 0 ) ) { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . U_SHAPE ; } else if ( ( ( aDotB > 0 ) && ( aDotC < 0 ) ) && ( bDotC < 0 ) ) { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . FOUR_SHAPE ; } else { return org . openscience . cdk . stereo . StereoTool . SquarePlanarShape . Z_SHAPE ; } }
|
org . junit . Assert . assertEquals ( SquarePlanarShape . U_SHAPE , shape )
|
synchronizeWithNoChangeShouldReturnSameState ( ) { org . communitybridge . synchronization . PlayerState newState = synchronizer . synchronize ( environment , player , USER_ID , previous , current , result ) ; "<AssertPlaceHolder>" ; } synchronize ( org . communitybridge . main . Environment , org . bukkit . entity . Player , java . lang . String , org . communitybridge . synchronization . PlayerState , org . communitybridge . synchronization . PlayerState , org . communitybridge . synchronization . PlayerState ) { result = synchronizeGameToWeb ( environment , previous , current , result , userId ) ; return synchronizeWebToGame ( environment . getEconomy ( ) , previous , current , result , player ) ; }
|
org . junit . Assert . assertEquals ( result , newState )
|
testAlmostIntersectingRulingsShouldIntersect ( ) { technology . tabula . Ruling v = new technology . tabula . Ruling ( new java . awt . geom . Point2D . Float ( 555.9609F , 271.56964F ) , new java . awt . geom . Point2D . Float ( 555.9609F , 786.8999F ) ) ; technology . tabula . Ruling h = new technology . tabula . Ruling ( new java . awt . geom . Point2D . Float ( 25.620499F , 786.8999F ) , new java . awt . geom . Point2D . Float ( 555.96075F , 786.8999F ) ) ; java . util . Map < java . awt . geom . Point2D , technology . tabula . Ruling [ ] > m = technology . tabula . Ruling . findIntersections ( java . util . Arrays . asList ( new technology . tabula . Ruling [ ] { h } ) , java . util . Arrays . asList ( new technology . tabula . Ruling [ ] { v } ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return end - begin ; }
|
org . junit . Assert . assertEquals ( m . values ( ) . size ( ) , 1 )
|
testTestSum ( ) { logger . info ( "testSum" ) ; double xsum = 65.3 ; int n = 100 ; double H0sum = 0.65 ; double std = 0.02 ; boolean is_twoTailed = false ; double aLevel = 0.05 ; boolean expResult = false ; boolean result = com . datumbox . framework . core . statistics . parametrics . onesample . NormalOneSample . testSum ( xsum , n , H0sum , std , is_twoTailed , aLevel ) ; "<AssertPlaceHolder>" ; } testSum ( double , int , double , double , boolean , double ) { if ( ( n <= 0 ) || ( std <= 0 ) ) { throw new java . lang . IllegalArgumentException ( "All<sp>the<sp>parameters<sp>must<sp>be<sp>positive." ) ; } double z = ( xsum - ( n * H0mean ) ) / ( std * ( java . lang . Math . sqrt ( n ) ) ) ; boolean rejectH0 = com . datumbox . framework . core . statistics . parametrics . onesample . NormalOneSample . checkCriticalValue ( z , is_twoTailed , aLevel ) ; return rejectH0 ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testWeld ( ) { final org . junit . runner . Result result = org . junit . runner . JUnitCore . runClasses ( junit . rules . cdi . WeldTest . UsesWeldTest . class ) ; final int failureCount = result . getFailureCount ( ) ; "<AssertPlaceHolder>" ; if ( failureCount != 0 ) { System . out . println ( ( ( "Encountered<sp>" + failureCount ) + "<sp>failures" ) ) ; for ( final org . junit . runner . notification . Failure failure : result . getFailures ( ) ) { System . out . println ( failure ) ; final java . lang . Throwable e = failure . getException ( ) ; if ( e != null ) { e . printStackTrace ( ) ; } } } }
|
org . junit . Assert . assertEquals ( 0 , failureCount )
|
testFeatureReaderWithQueryFilter ( ) { if ( Boolean . FALSE . equals ( serviceAvailable ) ) { return ; } org . opengis . filter . Filter filter = ff . equals ( ff . property ( "NAME" ) , ff . literal ( "E<sp>58th<sp>St" ) ) ; org . geotools . data . Query query = new org . geotools . data . Query ( "tiger_tiger_roads" , filter ) ; org . geotools . data . FeatureReader < org . opengis . feature . simple . SimpleFeatureType , org . opengis . feature . simple . SimpleFeature > reader = wfs . getFeatureReader ( query , new org . geotools . data . DefaultTransaction ( ) ) ; int expected = 0 ; while ( reader . hasNext ( ) ) { expected ++ ; reader . next ( ) ; } query = new org . geotools . data . Query ( "tiger_tiger_roads" , filter , 100 , new java . lang . String [ ] { "CFCC" } , "" ) ; reader = wfs . getFeatureReader ( query , new org . geotools . data . DefaultTransaction ( ) ) ; int count = 0 ; while ( reader . hasNext ( ) ) { count ++ ; reader . next ( ) ; } "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java . util . NoSuchElementException ( ) ; } org . geotools . image . palette . ColorMap . ColorEntry result = current ; current = result . next ; return result ; }
|
org . junit . Assert . assertEquals ( expected , count )
|
deveGerarXMLDeAcordoComOPadraoEstabelecido ( ) { final java . lang . String xmlEsperado = "<NFInfoEvento<sp>Id=\"ID1101108156800473487493042898372494088308929852383799\"><cOrgao>42</cOrgao><tpAmb>2</tpAmb><CNPJ>02224343323426</CNPJ><chNFe>81568004734874930428983724940883089298523837</chNFe><dhEvento>2014-01-01T10:10:10-02:00</dhEvento><tpEvento>110110</tpEvento><nSeqEvento>99</nSeqEvento><verEvento>1.00</verEvento><detEvento<sp>versao=\"1.00\"><descEvento>Carta<sp>de<sp>Correcao</descEvento><xCorrecao>GtsYuGiKh9h9w3v9CYm7SUUSPo2a5P1TXDzA3CX5p7SFwgFUZVKT4RLLKJKLX6M8gYyr0QG3fPA4ahffeVcB7avzf6C2SWISJ3l251NvnpIM3VATTyBfm5MJxZljegXvc79jhUtotiwt2iUn2x4W2XFRwQHuKnZvkXGuOr4BoX94gGCFuxXus59okD0scjbnPar6ToOpzW86xNn7mGwmAbUJJJTgrikR1GSi03TeiLT9grSizvPqMHgbXFSKOYyBvjWyK3wlhqLrzAvnynunibUnZFEEZNjglyWSItEocQwvUHM5VvOmKu0oIrUB64m6FBXqku3m8zHTAxMoevq8fpabWZGnqtEbBl9hJRRNBDhmbkNg48OXTHNjqO6vpeoEl7EGhR2rrCHuQMgLXKsvFTBVcCblfbKwJ7tCzhQWfgN8KOH0OHpqCnMVk4WBSjNcn5gt0SiXq8bFEDOsvKt62LnPsKCsE9A59P6SBJFG8A1E4T7XuyItBUSZoY0e0pBAVBwJuOUFobCR138KGPFAGa5hDDQv0Pnu9nyDEuOUYD7me3kAGTq9U4Ln7cyg5FbENwY6EcKp6mY5FjaXez0tW0hKRKaXfuk7ojExtv8f3plvSL9HY5ZO10wS64GMhRlEbrzUAW3Pucq2m2e2xm39sbFhatXbfxhT3coSEhPRfMRCxkw30yzfhAclOtF2gH7EoUIZ517mMPqS1NGp4F4unpCf58DaTg5c8phyAlWD96Io9jueeN2QIs6aGVEcRzYsQGpnwXgTYxX2LeLvxeu4aET4Jvh4OFq0jQ3Xby6c5pMkNLktjtR83u7wsQWwiSOivVBp4HAW2wGevLbY7kNougJmMIPLAjtATFKExjuBJylvV2DQYBnVfbg5ApmW0n0V8LiKb2L5TxBK5ISO8PhtMvrJcSJIjFVOSMe1yEAsLfUbfpUCX42yOs0rXImjyn0AsfmqzMf9YVLByE3s6aVGItY2TgQI2zkjBSgDi1vR</xCorrecao><xCondUso>A<sp>Carta<sp>de<sp>Correcao<sp>e<sp>disciplinada<sp>pelo<sp>paragrafo<sp>1o-A<sp>do<sp>art.<sp>7o<sp>do<sp>Convenio<sp>S/N,<sp>de<sp>15<sp>de<sp>dezembro<sp>de<sp>1970<sp>e<sp>pode<sp>ser<sp>utilizada<sp>para<sp>regularizacao<sp>de<sp>erro<sp>ocorrido<sp>na<sp>emissao<sp>de<sp>documento<sp>fiscal,<sp>desde<sp>que<sp>o<sp>erro<sp>nao<sp>esteja<sp>relacionado<sp>com:<sp>I<sp>-<sp>as<sp>variaveis<sp>que<sp>determinam<sp>o<sp>valor<sp>do<sp>imposto<sp>tais<sp>como:<sp>base<sp>de<sp>calculo,<sp>aliquota,<sp>diferenca<sp>de<sp>preco,<sp>quantidade,<sp>valor<sp>da<sp>operacao<sp>ou<sp>da<sp>prestacao;<sp>II<sp>-<sp>a<sp>correcao<sp>de<sp>dados<sp>cadastrais<sp>que<sp>implique<sp>mudanca<sp>do<sp>remetente<sp>ou<sp>do<sp>destinatario;<sp>III<sp>-<sp>a<sp>data<sp>de<sp>emissao<sp>ou<sp>de<sp>saida.</xCondUso></detEvento></NFInfoEvento>" ; "<AssertPlaceHolder>" ; } getNFInfoEventoCartaCorrecao ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEvento infoEvento = new com . fincatto . documentofiscal . nfe400 . classes . evento . NFInfoEvento ( ) ; infoEvento . setAmbiente ( DFAmbiente . HOMOLOGACAO ) ; infoEvento . setDadosEvento ( com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFInfoCartaCorrecao ( ) ) ; infoEvento . setChave ( "81568004734874930428983724940883089298523837" ) ; infoEvento . setCnpj ( "02224343323426" ) ; infoEvento . setDataHoraEvento ( java . time . ZonedDateTime . of ( java . time . LocalDateTime . from ( java . time . format . DateTimeFormatter . ofPattern ( "yyyy-MM-dd<sp>HH:mm:ss" ) . parse ( "2014-01-01<sp>10:10:10" ) ) , java . time . ZoneId . systemDefault ( ) ) ) ; infoEvento . setId ( "ID1101108156800473487493042898372494088308929852383799" ) ; infoEvento . setNumeroSequencialEvento ( 99 ) ; infoEvento . setOrgao ( DFUnidadeFederativa . SC ) ; infoEvento . setTipoEvento ( "110110" ) ; infoEvento . setVersaoEvento ( new java . math . BigDecimal ( "1.00" ) ) ; return infoEvento ; }
|
org . junit . Assert . assertEquals ( xmlEsperado , com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFInfoEventoCartaCorrecao ( ) . toString ( ) )
|
testDataSource2 ( ) { try ( org . mariadb . jdbc . MariaDbPoolDataSource ds = new org . mariadb . jdbc . MariaDbPoolDataSource ( ( ( hostname ) == null ? "localhost" : hostname ) , port , database ) ) { try ( java . sql . Connection connection = ds . getConnection ( username , password ) ) { "<AssertPlaceHolder>" ; } } } isValid ( int ) { if ( ( currentProtocol ) != null ) { if ( currentProtocol . isMasterConnection ( ) ) { boolean valid = currentProtocol . isValid ( timeout ) ; if ( ( secondaryProtocol ) != null ) { try { boolean secondValid = secondaryProtocol . isValid ( timeout ) ; if ( ( ( ! valid ) && ( urlParser . getOptions ( ) . allowMasterDownConnection ) ) && secondValid ) { setMasterHostFail ( ) ; return true ; } } catch ( java . sql . SQLException sqle ) { } } return valid ; } else { boolean valid = currentProtocol . isValid ( timeout ) ; if ( ( masterProtocol ) != null ) { try { masterProtocol . isValid ( timeout ) ; } catch ( java . sql . SQLException sqle ) { } } return valid ; } } return false ; }
|
org . junit . Assert . assertEquals ( connection . isValid ( 0 ) , true )
|
testGetDocumentNotInCache ( ) { when ( cache . getDocument ( q1 ) ) . thenReturn ( null ) ; when ( reader . getDocument ( q1 ) ) . thenReturn ( doc1 ) ; "<AssertPlaceHolder>" ; verify ( cache ) . add ( doc1 ) ; verify ( cache ) . getDocument ( q1 ) ; verify ( reader ) . getDocument ( q1 ) ; verifyNoMoreInteractions ( writer ) ; } getDocument ( com . findwise . hydra . local . LocalQuery ) { org . apache . http . HttpResponse response ; long start = java . lang . System . currentTimeMillis ( ) ; response = core . post ( getUrl , query . toJson ( ) ) ; long startSerialize = java . lang . System . currentTimeMillis ( ) ; long startJson = 0L ; com . findwise . hydra . local . LocalDocument ld = null ; if ( ( response . getStatusLine ( ) . getStatusCode ( ) ) == ( org . apache . http . HttpStatus . SC_OK ) ) { java . lang . String s = org . apache . http . util . EntityUtils . toString ( response . getEntity ( ) ) ; startJson = java . lang . System . currentTimeMillis ( ) ; ld = buildDocument ( s ) ; com . findwise . hydra . local . HttpRemotePipeline . internalLogger . debug ( ( "Received<sp>document<sp>with<sp>ID<sp>" + ( ld . getID ( ) ) ) ) ; } else if ( ( response . getStatusLine ( ) . getStatusCode ( ) ) == ( org . apache . http . HttpStatus . SC_NOT_FOUND ) ) { com . findwise . hydra . local . HttpRemotePipeline . internalLogger . debug ( "No<sp>document<sp>found<sp>matching<sp>query" ) ; org . apache . http . util . EntityUtils . consume ( response . getEntity ( ) ) ; } else { com . findwise . hydra . local . HttpRemotePipeline . logUnexpected ( "getDocument()" , response ) ; } if ( isPerformanceLogging ( ) ) { long end = java . lang . System . currentTimeMillis ( ) ; java . lang . Object docId = ( ld != null ) ? ld . getID ( ) : null ; com . findwise . hydra . local . HttpRemotePipeline . logger . info ( java . lang . String . format ( "type=performance<sp>event=query<sp>stage_name=%s<sp>doc_id=\"%s\"<sp>start=%d<sp>fetch=%d<sp>entitystring=%d<sp>serialize=%d<sp>end=%d<sp>total=%d" , stageName , docId , start , ( startSerialize - start ) , ( startJson - startSerialize ) , ( end - startJson ) , end , ( end - start ) ) ) ; } return ld ; }
|
org . junit . Assert . assertEquals ( doc1 , io . getDocument ( q1 ) )
|
iCanPerformUnlimitedQuery ( ) { startTransaction ( ) ; for ( int i = 0 ; i < 10 ; i ++ ) { org . nuxeo . ecm . core . api . DocumentModel doc = session . createDocumentModel ( "/" , ( "testDoc" + i ) , "File" ) ; doc . setPropertyValue ( "dc:title" , ( "TestMe" + i ) ) ; doc = session . createDocument ( doc ) ; } org . nuxeo . runtime . transaction . TransactionHelper . commitOrRollbackTransaction ( ) ; waitForCompletion ( ) ; startTransaction ( ) ; org . nuxeo . ecm . platform . query . api . PageProviderService pps = org . nuxeo . runtime . api . Framework . getService ( org . nuxeo . ecm . platform . query . api . PageProviderService . class ) ; org . nuxeo . ecm . platform . query . api . PageProviderDefinition ppdef = pps . getPageProviderDefinition ( "NXQL_PP_UNLIMITED" ) ; java . util . HashMap < java . lang . String , java . io . Serializable > props = new java . util . HashMap ( ) ; props . put ( ElasticSearchNativePageProvider . CORE_SESSION_PROPERTY , ( ( java . io . Serializable ) ( session ) ) ) ; org . nuxeo . ecm . platform . query . api . PageProvider < ? > pp = pps . getPageProvider ( "NXQL_PP_UNLIMITED" , ppdef , null , null , null , 0L , props ) ; java . util . List < ? > page = pp . getCurrentPage ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return false ; }
|
org . junit . Assert . assertFalse ( page . isEmpty ( ) )
|
testDateGTTimestampCompareColummn ( ) { java . lang . String sqlText = java . lang . String . format ( "select<sp>d<sp>from<sp>%s<sp>where<sp>d<sp>><sp>'1988-11-24<sp>00:00:00'" , com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . QUALIFIED_TABLE_NAME ) ; try ( java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . spliceClassWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "D<sp>|\n" + ( "------------\n" + "1988-12-26<sp>|" ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
ASIPMessage_CompareInToOutMessageInsert_success ( ) { java . lang . String rawInput = "Hello<sp>ASIP." ; net . sharkfw . knowledgeBase . SharkKB kb = new net . sharkfw . knowledgeBase . inmemory . InMemoSharkKB ( ) ; net . sharkfw . asip . ASIPSpace space = kb . createASIPSpace ( topics , types , peers , sender , peers , null , null , ASIPSpace . DIRECTION_INOUT ) ; net . sharkfw . asip . ASIPKnowledge knowledge = new net . sharkfw . knowledgeBase . inmemory . InMemoASIPKnowledge ( kb . getVocabulary ( ) ) ; knowledge . addInformation ( rawInput , space ) ; net . sharkfw . asip . engine . ASIPOutMessage outMessage = new net . sharkfw . asip . engine . ASIPOutMessage ( this . engine , this . connection , 10 , sender , sender , receiverPeer , null , null , null , null ) ; outMessage . insert ( knowledge ) ; this . connection . createInputStream ( ) ; net . sharkfw . asip . engine . ASIPInMessage inMessage = new net . sharkfw . asip . engine . ASIPInMessage ( this . engine , this . connection ) ; inMessage . parse ( ) ; java . lang . String receivedContent = "" ; java . util . Iterator < net . sharkfw . asip . ASIPInformationSpace > informationSpaces = inMessage . getKnowledge ( ) . informationSpaces ( ) ; while ( informationSpaces . hasNext ( ) ) { net . sharkfw . asip . ASIPInformationSpace informationSpace = informationSpaces . next ( ) ; java . util . Iterator < net . sharkfw . asip . ASIPInformation > infos = informationSpace . informations ( ) ; while ( infos . hasNext ( ) ) { net . sharkfw . asip . ASIPInformation info = infos . next ( ) ; receivedContent = info . getContentAsString ( ) ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == o ) return true ; if ( ! ( o instanceof net . sharkfw . asip . engine . ASIPMessage ) ) return false ; net . sharkfw . asip . engine . ASIPMessage that = ( ( net . sharkfw . asip . engine . ASIPMessage ) ( o ) ) ; if ( ( encrypted ) != ( that . encrypted ) ) return false ; if ( ( signed ) != ( that . signed ) ) return false ; if ( ( ttl ) != ( that . ttl ) ) return false ; if ( ( command ) != ( that . command ) ) return false ; if ( ! ( version . equals ( that . version ) ) ) return false ; if ( ! ( format . equals ( that . format ) ) ) return false ; if ( ( encryptedSessionKey ) != null ? ! ( encryptedSessionKey . equals ( that . encryptedSessionKey ) ) : ( that . encryptedSessionKey ) != null ) return false ; if ( ( signature ) != null ? ! ( signature . equals ( that . signature ) ) : ( that . signature ) != null ) return false ; if ( ( receiverPeer ) != null ? ! ( receiverPeer . equals ( that . receiverPeer ) ) : ( that . receiverPeer ) != null ) return false ; if ( ( topic ) != null ? ! ( topic . equals ( that . topic ) ) : ( that . topic ) != null ) return false ; if ( ( type ) != null ? ! ( type . equals ( that . type ) ) : ( that . type ) != null ) return false ; if ( ( receiverSpatial ) != null ? ! ( receiverSpatial . equals ( that . receiverSpatial ) ) : ( that . receiverSpatial ) != null ) return false ; return ( receiverTime ) != null ? receiverTime . equals ( that . receiverTime ) : ( that . receiverTime ) == null ; }
|
org . junit . Assert . assertTrue ( rawInput . equals ( receivedContent ) )
|
testGetJarFileNameWrappers ( ) { classUnderTest . setJarFileNameWrappers ( null ) ; "<AssertPlaceHolder>" ; } getJarFileNameWrappers ( ) { System . err . println ( "MockSQLDriver.getJarFileNameWrappers:<sp>stub<sp>not<sp>yet<sp>implemented" ) ; return null ; }
|
org . junit . Assert . assertTrue ( ( ( classUnderTest . getJarFileNameWrappers ( ) . length ) == 0 ) )
|
testSetFieldType ( ) { org . pentaho . hbase . shim . api . ColumnFilter cf = new org . pentaho . hbase . shim . api . ColumnFilterTest ( ) ; cf . setFieldType ( "test" ) ; "<AssertPlaceHolder>" ; } setFieldType ( java . lang . String ) { m_fieldType = type ; }
|
org . junit . Assert . assertEquals ( "test" , cf . m_fieldType )
|
testSerialization ( ) { org . jfree . data . function . PowerFunction2D f1 = new org . jfree . data . function . PowerFunction2D ( 1.0 , 2.0 ) ; org . jfree . data . function . PowerFunction2D f2 = ( ( org . jfree . data . function . PowerFunction2D ) ( org . jfree . chart . TestUtils . serialised ( f1 ) ) ) ; "<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 ( f1 , f2 )
|
testMaterieelHistorischLeverenMagMaterieelEnFormeel ( ) { final java . util . Set < nl . bzk . brp . model . algemeen . stamgegeven . autaut . DienstbundelGroep > dienstbundelGroepen = new java . util . HashSet ( ) ; final nl . bzk . brp . model . hisvolledig . predikaat . MagHistorieTonenPredikaat predikaat = new nl . bzk . brp . model . hisvolledig . predikaat . MagHistorieTonenPredikaat ( dienstbundelGroepen , false ) ; final nl . bzk . brp . model . algemeen . stamgegeven . kern . ElementAttribuut element = new nl . bzk . brp . model . algemeen . stamgegeven . kern . ElementAttribuut ( nl . bzk . brp . model . algemeen . stamgegeven . kern . TestElementBuilder . maker ( ) . metNaam ( ElementEnum . PERSOON_BIJHOUDING ) . maak ( ) ) ; final nl . bzk . brp . model . algemeen . stamgegeven . autaut . DienstbundelGroep dienstbundelGroep = nl . bzk . brp . model . algemeen . stamgegeven . autaut . TestDienstbundelGroepBuilder . maker ( ) . metGroep ( element . getWaarde ( ) ) . metIndicatieFormeleHistorie ( true ) . metIndicatieMaterieleHistorie ( true ) . metIndicatieVerantwoording ( false ) . maak ( ) ; dienstbundelGroepen . add ( dienstbundelGroep ) ; final java . util . Set < nl . bzk . brp . model . operationeel . kern . HisPersoonBijhoudingModel > alleModellen = maakTestPersoon ( ) . getPersoonBijhoudingHistorie ( ) . getHistorie ( ) ; final java . util . Collection gefilterdeModellen = org . apache . commons . collections . CollectionUtils . select ( alleModellen , predikaat ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertThat ( gefilterdeModellen . size ( ) , org . hamcrest . Matchers . is ( 3 ) )
|
shouldFailWebSocketConnectionWhenServerSendOpcode5Frame ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . jmock . Expectations ( ) { { oneOf ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; oneOf ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; atMost ( 1 ) . of ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( org . hamcrest . core . AllOf . allOf ( any ( java . io . IOException . class ) , org . junit . internal . matchers . ThrowableMessageMatcher . hasMessage ( equal ( LoggingUtils . EARLY_TERMINATION_OF_IOSESSION_MESSAGE ) ) ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/echo" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertTrue ( connectFuture . isConnected ( ) )
|
shouldReadWriteVerticesNoEdgesToGraphSONManual ( ) { org . junit . Assume . assumeThat ( ioType , org . hamcrest . core . StringStartsWith . startsWith ( "graphson" ) ) ; try ( final java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( ) ) { final org . apache . tinkerpop . gremlin . structure . io . GraphWriter writer = writerMaker . apply ( graph ) ; writer . writeVertices ( os , g . V ( ) . has ( "age" , org . apache . tinkerpop . gremlin . process . traversal . P . gt ( 30 ) ) ) ; final java . util . concurrent . atomic . AtomicInteger called = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; final org . apache . tinkerpop . gremlin . structure . io . GraphReader reader = readerMaker . apply ( graph ) ; try ( final java . io . BufferedReader br = new java . io . BufferedReader ( new java . io . InputStreamReader ( new java . io . ByteArrayInputStream ( os . toByteArray ( ) ) ) ) ) { java . lang . String line = br . readLine ( ) ; reader . readVertex ( new java . io . ByteArrayInputStream ( line . getBytes ( ) ) , ( attachable ) -> { called . incrementAndGet ( ) ; return mock ( . class ) ; } ) ; line = br . readLine ( ) ; reader . readVertex ( new java . io . ByteArrayInputStream ( line . getBytes ( ) ) , ( detachedVertex ) -> { called . incrementAndGet ( ) ; return mock ( . class ) ; } ) ; } "<AssertPlaceHolder>" ; } } get ( ) { return this . t ; }
|
org . junit . Assert . assertEquals ( 2 , called . get ( ) )
|
getsAndSetsId ( ) { com . mpatric . mp3agic . ID3v2ChapterTOCFrameData frameData = new com . mpatric . mp3agic . ID3v2ChapterTOCFrameData ( false ) ; frameData . setId ( "My<sp>ID" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertEquals ( "My<sp>ID" , frameData . getId ( ) )
|
testBuscarPosicaoNegativa ( ) { br . com . senacrs . alp . aulas . MinhaListaImp < java . lang . String > obj = null ; obj = criarMinhaListaImp ( ) ; try { obj . buscar ( ( - 1 ) ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . IndexOutOfBoundsException e ) { "<AssertPlaceHolder>" ; } } buscar ( int ) { return lista . get ( posicao ) ; }
|
org . junit . Assert . assertTrue ( true )
|
testGetFirstNonNull_int ( ) { int first = 1 ; int second = 2 ; int third = 3 ; int fourth = 4 ; int expResult = 1 ; int result = com . adobe . acs . commons . util . TextUtil . getFirstNonNull ( first , second , third , fourth ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testGetMaskCount ( ) { org . sagebionetworks . repo . model . table . QueryOptions options = new org . sagebionetworks . repo . model . table . QueryOptions ( ) . withRunCount ( true ) ; long mask = options . getPartMask ( ) ; "<AssertPlaceHolder>" ; } getPartMask ( ) { long partMask = 0 ; if ( this . runQuery ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_RESULTS ) ; } if ( this . runCount ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_COUNT ) ; } if ( this . returnSelectColumns ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_SELECT_COLUMNS ) ; } if ( this . returnMaxRowsPerPage ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_MAX_ROWS_PER_PAGE ) ; } if ( this . returnColumnModels ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_COLUMN_MODELS ) ; } if ( this . returnFacets ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_QUERY_FACETS ) ; } if ( this . runSumFileSizes ) { partMask = partMask | ( org . sagebionetworks . repo . model . table . QueryOptions . BUNDLE_MASK_SUM_FILE_SIZES ) ; } return partMask ; }
|
org . junit . Assert . assertEquals ( QueryOptions . BUNDLE_MASK_QUERY_COUNT , mask )
|
testSessionEnding ( ) { net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin plugin = ( ( net . sourceforge . squirrel_sql . plugins . dbcopy . DBCopyPlugin ) ( super . classUnderTest ) ) ; plugin . setSourceSession ( mockSession ) ; plugin . sessionEnding ( mockSession ) ; "<AssertPlaceHolder>" ; } getSourceSession ( ) { return sourceSession ; }
|
org . junit . Assert . assertNull ( plugin . getSourceSession ( ) )
|
testUnion4 ( ) { fr . inria . corese . core . Graph g1 = fr . inria . corese . core . Graph . create ( ) ; fr . inria . corese . core . query . QueryProcess exec1 = fr . inria . corese . core . query . QueryProcess . create ( g1 ) ; java . lang . String i1 = "function<sp>us:test(){" 0 + ( ( "us:John<sp>foaf:knows<sp>us:Jim<sp>" + "us:Jim<sp>foaf:knows<sp>us:Jack<sp>" ) + "}" ) ; java . lang . String q = "function<sp>xt:main(){" + ( ( ( ( ( ( ( ( "us:test()" + "}" ) + "function<sp>us:test(){" ) + "let<sp>(" ) + "?m1<sp>=<sp>select<sp>*<sp>where<sp>{<sp>?x<sp>foaf:knows<sp>?y}," ) + "?m2<sp>=<sp>select<sp>*<sp>where<sp>{<sp>?x<sp>foaf:knows<sp>?y}){" ) + "xt:union(?m1,<sp>?m2)" ) + "}" ) + "}" ) ; exec1 . query ( i1 ) ; fr . inria . corese . sparql . api . IDatatype dt = exec1 . eval ( q ) ; fr . inria . corese . kgram . core . Mappings m = dt . getPointerObject ( ) . getMappings ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return varList . size ( ) ; }
|
org . junit . Assert . assertEquals ( 4 , m . size ( ) )
|
stopUrlShouldBeReturned ( ) { addLinkToList ( org . eclipse . che . ide . ext . runner . client . models . LINK_REL_STOP , org . eclipse . che . ide . ext . runner . client . models . RunnerImplTest . URL ) ; when ( descriptor . getLinks ( ) ) . thenReturn ( links ) ; runner . setProcessDescriptor ( descriptor ) ; "<AssertPlaceHolder>" ; verify ( descriptor , times ( 2 ) ) . getLinks ( ) ; } getApplicationURL ( ) { if ( ( descriptor ) == null ) { return null ; } java . lang . String appUrl = getUrlByName ( org . eclipse . che . ide . ext . runner . client . models . LINK_REL_WEB_URL ) ; if ( appUrl == null ) { return null ; } return appUrl + ( getCodeServerParam ( ) ) ; }
|
org . junit . Assert . assertThat ( runner . getApplicationURL ( ) , org . hamcrest . core . Is . is ( org . eclipse . che . ide . ext . runner . client . models . RunnerImplTest . URL ) )
|
testSingleRecord ( ) { no . priv . garshol . duke . matchers . Record r1 = makeRecord ( "id" , "1" ) ; no . priv . garshol . duke . matchers . Record r2 = makeRecord ( "id" , "2" ) ; listener . startProcessing ( ) ; listener . batchReady ( 1 ) ; listener . matches ( r1 , r2 , 0.95 ) ; listener . batchDone ( ) ; listener . endProcessing ( ) ; java . util . Collection < no . priv . garshol . duke . matchers . Link > all = linkdb . getAllLinks ( ) ; "<AssertPlaceHolder>" ; no . priv . garshol . duke . utils . TestUtils . verifySame ( new no . priv . garshol . duke . matchers . Link ( "1" , "2" , LinkStatus . INFERRED , LinkKind . SAME , 0.95 ) , all . iterator ( ) . next ( ) ) ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 1 , all . size ( ) )
|
testGeospatialPredicateNullMetadata ( ) { java . lang . String methodName = "testGeospatialPredicateNullMetadata()" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( ( ( "***************<sp>START:<sp>" + methodName ) + "<sp>*****************" ) ) ; java . lang . String geometryWkt = "POLYGON<sp>((40<sp>34,<sp>40<sp>33,<sp>44.5<sp>33,<sp>44.5<sp>34,<sp>40<sp>34))" ; java . lang . String operation = "overlaps" ; double distance = 0.0 ; ddf . catalog . pubsub . predicate . GeospatialPredicate predicate = new ddf . catalog . pubsub . predicate . GeospatialPredicate ( geometryWkt , operation , distance ) ; ddf . catalog . data . impl . MetacardImpl metacard = new ddf . catalog . data . impl . MetacardImpl ( ) ; metacard . setLocation ( "POINT<sp>(41<sp>34)" ) ; java . util . HashMap < java . lang . String , java . lang . Object > properties = new java . util . HashMap ( ) ; properties . put ( PubSubConstants . HEADER_CONTENT_TYPE_KEY , "type1,version1" ) ; properties . put ( PubSubConstants . HEADER_OPERATION_KEY , PubSubConstants . CREATE ) ; properties . put ( PubSubConstants . HEADER_ENTRY_KEY , metacard ) ; org . osgi . service . event . Event testEvent = new org . osgi . service . event . Event ( "topic" , properties ) ; "<AssertPlaceHolder>" ; ddf . catalog . pubsub . PredicateTest . LOGGER . debug ( ( ( "***************<sp>END:<sp>" + methodName ) + "<sp>*****************" ) ) ; } matches ( org . osgi . service . event . Event ) { ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "ENTERING:<sp>matches" ) ; boolean status = false ; java . util . Map < java . lang . String , java . lang . Object > contextualMap = ( ( java . util . Map < java . lang . String , java . lang . Object > ) ( properties . getProperty ( PubSubConstants . HEADER_CONTEXTUAL_KEY ) ) ) ; java . lang . String operation = ( ( java . lang . String ) ( properties . getProperty ( PubSubConstants . HEADER_OPERATION_KEY ) ) ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "operation<sp>=<sp>{}" , operation ) ; if ( contextualMap != null ) { java . lang . String metadata = ( ( java . lang . String ) ( contextualMap . get ( "METADATA" ) ) ) ; if ( ( PubSubConstants . DELETE . equals ( operation ) ) && ( PubSubConstants . METADATA_DELETED . equals ( metadata ) ) ) { ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "Detected<sp>a<sp>DELETE<sp>operation<sp>where<sp>metadata<sp>is<sp>just<sp>the<sp>word<sp>'deleted',<sp>so<sp>send<sp>event<sp>on<sp>to<sp>subscriber" ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "EXITING:<sp>matches" ) ; return true ; } } java . lang . Object inputContentType = properties . getProperty ( PubSubConstants . HEADER_CONTENT_TYPE_KEY ) ; ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "input<sp>obtained<sp>from<sp>event<sp>properties:<sp>" , inputContentType ) ; if ( inputContentType != null ) { ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ctec = new ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluationCriteriaImpl ( this , inputContentType . toString ( ) ) ; status = ddf . catalog . pubsub . criteria . contenttype . ContentTypeEvaluator . evaluate ( ctec ) ; } ddf . catalog . pubsub . predicate . ContentTypePredicate . LOGGER . debug ( "EXITING:<sp>matches" ) ; return status ; }
|
org . junit . Assert . assertTrue ( predicate . matches ( testEvent ) )
|
shouldReturnEmptyIteratorIfNoData ( ) { final org . apache . kafka . streams . state . WindowStoreIterator < java . lang . String > iterator = windowStore . fetch ( "my-key" , ofEpochMilli ( 0L ) , ofEpochMilli ( 25L ) ) ; "<AssertPlaceHolder>" ; } hasNext ( ) { return false ; }
|
org . junit . Assert . assertEquals ( false , iterator . hasNext ( ) )
|
testIsMaxVectorCase ( ) { org . nd4j . linalg . api . ndarray . INDArray arr = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 4 , 3 } , new long [ ] { 2 , 2 } ) ; org . nd4j . linalg . api . ndarray . INDArray assertion = org . nd4j . linalg . factory . Nd4j . create ( new boolean [ ] { false , false , true , false } , new long [ ] { 2 , 2 } , DataType . BOOL ) ; org . nd4j . linalg . api . ndarray . INDArray test = org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . api . ops . impl . transforms . any . IsMax ( arr ) ) ; "<AssertPlaceHolder>" ; } exec ( java . lang . String ) { code = org . datavec . python . PythonExecutioner . getFunctionalCode ( ( "__f_" + ( java . lang . Thread . currentThread ( ) . getId ( ) ) ) , code ) ; org . datavec . python . PythonExecutioner . acquireGIL ( ) ; log . info ( "CPython:<sp>PyRun_SimpleStringFlag()" ) ; log . info ( code ) ; int result = PyRun_SimpleStringFlags ( code , null ) ; if ( result != 0 ) { PyErr_Print ( ) ; throw new java . lang . RuntimeException ( "exec<sp>failed" ) ; } log . info ( "Exec<sp>done" ) ; org . datavec . python . PythonExecutioner . releaseGIL ( ) ; }
|
org . junit . Assert . assertEquals ( assertion , test )
|
testThatVerificationFailsIfTheProductDoesNotIntersectTheTargetArea ( ) { org . powermock . api . mockito . PowerMockito . when ( org . esa . beam . statistics . percentile . interpolated . Utils . createProductArea ( any ( org . esa . beam . framework . datamodel . Product . class ) ) ) . thenReturn ( _nonIntersectingArea ) ; boolean result = _productValidator . isValid ( M_product ) ; "<AssertPlaceHolder>" ; verify ( S_logger , times ( 1 ) ) . info ( "Product<sp>skipped.<sp>The<sp>product<sp>'ProductMock'<sp>does<sp>not<sp>intersect<sp>the<sp>target<sp>product." ) ; } isValid ( org . esa . beam . framework . datamodel . Product ) { return ( ( containsGeocoding ( product ) ) && ( canHandleBandConfigurations ( product ) ) ) && ( isInDateRange ( product ) ) ; }
|
org . junit . Assert . assertEquals ( false , result )
|
testITableExists ( ) { System . out . println ( "iTableExists" ) ; com . pearson . docussandra . domain . objects . Index index = com . pearson . docussandra . testhelper . Fixtures . createTestIndexOneField ( ) ; com . pearson . docussandra . persistence . ITableRepository cleanUpInstance = new com . pearson . docussandra . persistence . impl . ITableRepositoryImpl ( com . pearson . docussandra . persistence . impl . ITableRepositoryImplTest . f . getSession ( ) ) ; boolean expResult = false ; boolean result = cleanUpInstance . iTableExists ( index ) ; "<AssertPlaceHolder>" ; } iTableExists ( java . lang . String ) { com . datastax . driver . core . PreparedStatement createStmt = com . pearson . docussandra . persistence . helper . PreparedStatementFactory . getPreparedStatement ( com . pearson . docussandra . persistence . impl . ITableRepositoryImpl . TABLE_EXISTENCE_CQL , session ) ; com . datastax . driver . core . BoundStatement bs = new com . datastax . driver . core . BoundStatement ( createStmt ) ; bs . bind ( iTableName ) ; com . datastax . driver . core . ResultSet rs = session . execute ( bs ) ; java . util . Iterator ite = rs . iterator ( ) ; while ( ite . hasNext ( ) ) { logger . debug ( ite . next ( ) . toString ( ) ) ; return true ; } return false ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
shouldHandleReasonableDateRange ( ) { final int currentCycle = DefaultCycleCalculator . INSTANCE . currentCycle ( cycle , timeProvider , 0 ) ; for ( long nowMillis = 1500000000000L ; nowMillis < 2000000000000L ; nowMillis += 3.0E10 ) { clock . set ( nowMillis ) ; long index = cycle . toIndex ( currentCycle , 0 ) ; "<AssertPlaceHolder>" ; } } toCycle ( long ) { return net . openhft . chronicle . core . Maths . toUInt31 ( ( index > > ( cycleShift ) ) ) ; }
|
org . junit . Assert . assertEquals ( currentCycle , cycle . toCycle ( index ) )
|
testWeekDate ( ) { java . lang . String sqlText = ( "select<sp>d,<sp>WEEK(d)<sp>as<sp>\"WEEK\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>d" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "D<sp>|WEEK<sp>|\n" + ( ( ( ( ( ( "------------------\n" + "2009-01-02<sp>|<sp>1<sp>|\n" ) + "2009-07-02<sp>|<sp>27<sp>|\n" ) + "2009-09-02<sp>|<sp>36<sp>|\n" ) + "2012-12-31<sp>|<sp>1<sp>|\n" ) + "2012-12-31<sp>|<sp>1<sp>|\n" ) + "2012-12-31<sp>|<sp>1<sp>|\n" 0 ) ; "<AssertPlaceHolder>" ; } } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
testBuildWithDisabledDefaultConstaitns ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . type . DepartmentType context = new org . lnu . is . domain . department . type . DepartmentType ( ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>DepartmentType<sp>e<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . department . type . DepartmentType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expected , actualQuery )
|
findDocNamesTest ( ) { include = com . google . common . collect . ImmutableList . of ( "**/**StringResource_en_US*" ) ; when ( mockPushOption . getLocaleMapList ( ) ) . thenReturn ( locales ) ; when ( mockPushOption . getSourceLang ( ) ) . thenReturn ( org . zanata . client . commands . push . XliffPushStrategyTest . sourceLocale ) ; when ( mockPushOption . getDefaultExcludes ( ) ) . thenReturn ( true ) ; when ( mockPushOption . getCaseSensitive ( ) ) . thenReturn ( true ) ; when ( mockPushOption . getExcludeLocaleFilenames ( ) ) . thenReturn ( true ) ; when ( mockPushOption . getValidate ( ) ) . thenReturn ( "xsd" ) ; xliffStrategy . setPushOptions ( mockPushOption ) ; java . util . Set < java . lang . String > localDocNames = xliffStrategy . findDocNames ( sourceDir , include , exclude , mockPushOption . getDefaultExcludes ( ) , mockPushOption . getCaseSensitive ( ) , mockPushOption . getExcludeLocaleFilenames ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return locales . size ( ) ; }
|
org . junit . Assert . assertEquals ( 3 , localDocNames . size ( ) )
|
debugMdcThrowableMessageArgs ( ) { uk . org . lidalia . slf4jtest . LoggingEvent event = uk . org . lidalia . slf4jtest . LoggingEvent . debug ( mdc , throwable , message , arg1 , arg2 ) ; uk . org . lidalia . slf4jtest . LoggingEvent expected = new uk . org . lidalia . slf4jtest . LoggingEvent ( DEBUG , mdc , throwable , message , arg1 , arg2 ) ; "<AssertPlaceHolder>" ; } debug ( java . util . Map , org . slf4j . Marker , java . lang . Throwable , java . lang . String , java . lang . Object [ ] ) { return new uk . org . lidalia . slf4jtest . LoggingEvent ( uk . org . lidalia . slf4jext . Level . DEBUG , mdc , marker , throwable , message , arguments ) ; }
|
org . junit . Assert . assertThat ( event , org . hamcrest . core . Is . is ( expected ) )
|
testBuildWithFullEntityWithOrderBy ( ) { org . lnu . is . domain . admin . unit . AdminUnit parent = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . domain . admin . unit . type . AdminUnitType adminUnitType = new org . lnu . is . domain . admin . unit . type . AdminUnitType ( ) ; java . lang . String identifier = "identifgier" ; java . lang . String identifier1 = "identifier1" ; java . lang . String identifier2 = "identifeir2" ; java . lang . String identifier3 = "identifier3" ; java . lang . String name = "ndasdsa" ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . admin . unit . AdminUnit context = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; context . setAdminUnitType ( adminUnitType ) ; context . setParent ( parent ) ; context . setIdentifier ( identifier ) ; context . setIdentifier1 ( identifier1 ) ; context . setIdentifier2 ( identifier2 ) ; context . setIdentifier3 ( identifier3 ) ; context . setName ( name ) ; context . setBegDate ( begDate ) ; context . setEndDate ( endDate ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "identifier" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "identifier1" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "identifier2" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy4 = new org . lnu . is . pagination . OrderBy ( "identifier3" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 , orderBy4 ) ; java . lang . String expected = "SELECT<sp>e<sp>FROM<sp>AdminUnit<sp>e<sp>WHERE<sp>(<sp>e.adminUnitType<sp>=<sp>:adminUnitType<sp>AND<sp>e.parent<sp>=<sp>:parent<sp>AND<sp>e.identifier<sp>LIKE<sp>CONCAT('%',:identifier,'%')<sp>AND<sp>e.identifier1<sp>LIKE<sp>CONCAT('%',:identifier1,'%')<sp>AND<sp>e.identifier2<sp>LIKE<sp>CONCAT('%',:identifier2,'%')<sp>AND<sp>e.identifier3<sp>LIKE<sp>CONCAT('%',:identifier3,'%')<sp>AND<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.begDate<sp><=<sp>:begDate<sp>AND<sp>e.endDate<sp>>=<sp>:endDate<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>ORDER<sp>BY<sp>e.identifier<sp>DESC,<sp>e.identifier1<sp>DESC,<sp>e.identifier2<sp>DESC,<sp>e.identifier3<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . admin . unit . AdminUnit > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
|
org . junit . Assert . assertEquals ( expected , actualQuery )
|
testBasic ( ) { java . util . Map < com . google . devtools . depan . nodes . filters . model . ContextKey , java . lang . Object > testData = com . google . common . collect . Maps . newHashMap ( ) ; java . lang . String testValue = "Any<sp>object" ; testData . put ( Base . UNIVERSE , testValue ) ; com . google . devtools . depan . nodes . filters . model . FilterContext testContext = new com . google . devtools . depan . nodes . filters . context . MapContext ( testData ) ; "<AssertPlaceHolder>" ; } get ( com . google . devtools . depan . nodes . filters . model . ContextKey ) { return contextData . get ( key ) ; }
|
org . junit . Assert . assertEquals ( testValue , testContext . get ( Base . UNIVERSE ) )
|
testIsSatisfiedByTrue ( ) { when ( specification . isSatisfiedBy ( fact ) ) . thenReturn ( true ) ; "<AssertPlaceHolder>" ; } isSatisfiedBy ( T ) { return ! ( spec1 . isSatisfiedBy ( t ) ) ; }
|
org . junit . Assert . assertFalse ( instance . isSatisfiedBy ( fact ) )
|
nothingEverPressed ( ) { monitor . down = false ; monitor . update ( ) ; "<AssertPlaceHolder>" ; } monitor ( boolean , boolean , boolean ) { return new com . gemserk . componentsengine . input . ButtonMonitorTest . MonitorMatcher ( isPressed , isReleased , isHolded ) ; }
|
org . junit . Assert . assertThat ( monitor , com . gemserk . componentsengine . input . ButtonMonitorTest . MonitorMatcher . monitor ( false , false , false ) )
|
testEnumAsInlineUnion ( ) { final cz . habarta . typescript . generator . Settings settings = cz . habarta . typescript . generator . TestUtils . settings ( ) ; settings . quotes = "'" ; settings . mapEnum = EnumMapping . asInlineUnion ; final java . lang . String output = new cz . habarta . typescript . generator . TypeScriptGenerator ( settings ) . generateTypeScript ( cz . habarta . typescript . generator . Input . from ( cz . habarta . typescript . generator . EnumTest . AClass . class ) ) ; final java . lang . String expected = "\n" + ( ( "interface<sp>AClass<sp>{\n" + "<sp>direction:<sp>\'North\'<sp>|<sp>\'East\'<sp>|<sp>\'South\'<sp>|<sp>\'West\';\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } from ( java . lang . reflect . Type [ ] ) { java . util . Objects . requireNonNull ( types , "types" ) ; final java . util . List < cz . habarta . typescript . generator . parser . SourceType < java . lang . reflect . Type > > sourceTypes = new java . util . ArrayList ( ) ; for ( java . lang . reflect . Type type : types ) { sourceTypes . add ( new cz . habarta . typescript . generator . parser . SourceType ( type ) ) ; } return new cz . habarta . typescript . generator . Input ( sourceTypes ) ; }
|
org . junit . Assert . assertEquals ( expected , output )
|
testSoapV1_2Marshal ( ) { final org . apache . camel . dataformat . soap . SoapJaxbDataFormat format = new org . apache . camel . dataformat . soap . SoapJaxbDataFormat ( ) ; format . setContextPath ( "org.wildfly.camel.test.jaxb.model" ) ; org . apache . camel . CamelContext camelctx = new org . apache . camel . impl . DefaultCamelContext ( ) ; camelctx . addRoutes ( new org . apache . camel . builder . RouteBuilder ( ) { @ org . wildfly . camel . test . soap . Override public void configure ( ) throws org . wildfly . camel . test . soap . Exception { from ( "direct:start" ) . marshal ( format ) ; } } ) ; camelctx . start ( ) ; try ( java . io . InputStream input = getClass ( ) . getResourceAsStream ( "/envelope-1.2-marshal.xml" ) ) { java . lang . String expected = camelctx . getTypeConverter ( ) . mandatoryConvertTo ( java . lang . String . class , input ) ; org . apache . camel . ProducerTemplate producer = camelctx . createProducerTemplate ( ) ; org . wildfly . camel . test . jaxb . model . Customer customer = new org . wildfly . camel . test . jaxb . model . Customer ( "John" , "Doe" ) ; java . lang . String customerXML = producer . requestBody ( "direct:start" , customer , java . lang . String . class ) ; "<AssertPlaceHolder>" ; } finally { camelctx . stop ( ) ; } } compactXML ( java . lang . String ) { return org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( new java . io . ByteArrayInputStream ( xmlinput . getBytes ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( expected , org . wildfly . camel . test . common . utils . XMLUtils . compactXML ( customerXML ) )
|
testUnauthorizedWrite ( ) { java . util . Properties producerProps = new java . util . Properties ( ) ; producerProps . put ( "bootstrap.servers" , ( "localhost:" + ( org . apache . ranger . authorization . kafka . authorizer . KafkaRangerAuthorizerGSSTest . port ) ) ) ; producerProps . put ( "acks" , "bootstrap.servers" 3 ) ; producerProps . put ( "key.serializer" , "org.apache.kafka.common.serialization.StringSerializer" ) ; producerProps . put ( "bootstrap.servers" 1 , "org.apache.kafka.common.serialization.StringSerializer" ) ; producerProps . put ( CommonClientConfigs . SECURITY_PROTOCOL_CONFIG , "bootstrap.servers" 5 ) ; producerProps . put ( "bootstrap.servers" 4 , "GSSAPI" ) ; producerProps . put ( "bootstrap.servers" 0 , "kafka" ) ; final org . apache . kafka . clients . producer . Producer < java . lang . String , java . lang . String > producer = new org . apache . kafka . clients . producer . KafkaProducer ( producerProps ) ; try { java . util . concurrent . Future < org . apache . kafka . clients . producer . RecordMetadata > record = producer . send ( new org . apache . kafka . clients . producer . ProducerRecord < java . lang . String , java . lang . String > ( "dev" , "somekey" , "somevalue" ) ) ; producer . flush ( ) ; record . get ( ) ; } catch ( java . lang . Exception ex ) { "<AssertPlaceHolder>" ; } producer . close ( ) ; } getMessage ( ) { return this . message ; }
|
org . junit . Assert . assertTrue ( ex . getMessage ( ) . contains ( "bootstrap.servers" 2 ) )
|
getValueMessage ( ) { org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveThermostatFanModeCommandClass cls = ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveThermostatFanModeCommandClass ) ( getCommandClass ( CommandClass . COMMAND_CLASS_THERMOSTAT_FAN_MODE ) ) ) ; org . openhab . binding . zwave . internal . protocol . transaction . ZWaveCommandClassTransactionPayload msg ; byte [ ] expectedResponseV1 = new byte [ ] { 68 , 2 } ; cls . setVersion ( 1 ) ; msg = cls . getValueMessage ( ) ; "<AssertPlaceHolder>" ; } getPayloadBuffer ( ) { return payload ; }
|
org . junit . Assert . assertTrue ( java . util . Arrays . equals ( msg . getPayloadBuffer ( ) , expectedResponseV1 ) )
|
test_overridesPresent_exceedAvailable_fails ( ) { java . util . Properties properties = new java . util . Properties ( ) ; java . lang . Integer [ ] expectedPorts = new java . lang . Integer [ ] { 9990 , 9991 , 9992 , 9993 , 9994 } ; properties . setProperty ( TestPortFinder . UNUSED_PORTS_PROPERTY_KEY , com . google . common . base . Joiner . on ( ',' ) . join ( expectedPorts ) ) ; com . google . api . ads . common . lib . testing . TestPortFinder portFinder = new com . google . api . ads . common . lib . testing . TestPortFinder ( properties ) ; for ( java . lang . Integer expectedPort : expectedPorts ) { java . lang . Integer actualPort = portFinder . checkOutUnusedPort ( ) ; "<AssertPlaceHolder>" ; } thrown . expect ( java . util . NoSuchElementException . class ) ; portFinder . checkOutUnusedPort ( ) ; } checkOutUnusedPort ( ) { if ( ( availablePorts ) == null ) { return org . openqa . selenium . net . PortProber . findFreePort ( ) ; } else if ( availablePorts . isEmpty ( ) ) { throw new java . util . NoSuchElementException ( "No<sp>unused<sp>ports<sp>are<sp>available" ) ; } return availablePorts . pop ( ) ; }
|
org . junit . Assert . assertEquals ( expectedPort , actualPort )
|
testLazyString ( ) { java . lang . String value = "TEN" ; subject = makeSimpleCallable ( value ) ; "<AssertPlaceHolder>" ; } value ( ) { return internalValue ; }
|
org . junit . Assert . assertEquals ( value , subject . value ( ) )
|
testSaveAndRename ( ) { final java . util . function . Supplier pathSupplier = mock ( java . util . function . Supplier . class ) ; final org . uberfire . ext . editor . commons . client . validation . Validator renameValidator = mock ( org . uberfire . ext . editor . commons . client . validation . Validator . class ) ; final java . util . function . Supplier saveValidator = mock ( java . util . function . Supplier . class ) ; final org . jboss . errai . common . client . api . Caller supportsSaveAndRename = mock ( org . jboss . errai . common . client . api . Caller . class ) ; final java . util . function . Supplier metadataSupplier = mock ( java . util . function . Supplier . class ) ; final java . util . function . Supplier contentSupplier = mock ( java . util . function . Supplier . class ) ; final java . util . function . Supplier isDirtySupplier = mock ( java . util . function . Supplier . class ) ; final org . uberfire . mvp . ParameterizedCommand parameterizedCommand = mock ( org . uberfire . mvp . ParameterizedCommand . class ) ; final org . uberfire . mvp . Command command = mock ( org . uberfire . mvp . Command . class ) ; doReturn ( pathSupplier ) . when ( editor ) . getPathSupplier ( ) ; doReturn ( renameValidator ) . when ( editor ) . getRenameValidator ( ) ; doReturn ( saveValidator ) . when ( editor ) . getSaveValidator ( ) ; doReturn ( supportsSaveAndRename ) . when ( editor ) . getSaveAndRenameServiceCaller ( ) ; doReturn ( metadataSupplier ) . when ( editor ) . getMetadataSupplier ( ) ; doReturn ( contentSupplier ) . when ( editor ) . getContentSupplier ( ) ; doReturn ( isDirtySupplier ) . when ( editor ) . isDirtySupplier ( ) ; doReturn ( parameterizedCommand ) . when ( editor ) . onSuccess ( ) ; doReturn ( command ) . when ( builder ) . build ( ) ; final org . uberfire . mvp . Command saveAndRenameCommand = editor . getSaveAndRename ( ) ; "<AssertPlaceHolder>" ; verify ( builder ) . addPathSupplier ( pathSupplier ) ; verify ( builder ) . addValidator ( renameValidator ) ; verify ( builder ) . addValidator ( saveValidator ) ; verify ( builder ) . addRenameService ( supportsSaveAndRename ) ; verify ( builder ) . addMetadataSupplier ( metadataSupplier ) ; verify ( builder ) . addContentSupplier ( contentSupplier ) ; verify ( builder ) . addIsDirtySupplier ( isDirtySupplier ) ; verify ( builder ) . addSuccessCallback ( parameterizedCommand ) ; } getSaveAndRename ( ) { return getSaveAndRenameCommandBuilder ( ) . addPathSupplier ( getPathSupplier ( ) ) . addValidator ( getRenameValidator ( ) ) . addValidator ( getSaveValidator ( ) ) . addRenameService ( getSaveAndRenameServiceCaller ( ) ) . addMetadataSupplier ( getMetadataSupplier ( ) ) . addContentSupplier ( getContentSupplier ( ) ) . addIsDirtySupplier ( isDirtySupplier ( ) ) . addSuccessCallback ( onSuccess ( ) ) . build ( ) ; }
|
org . junit . Assert . assertEquals ( command , saveAndRenameCommand )
|
whenCreatingDockerClientWithProperties_thenReturnInstance ( ) { java . util . Properties properties = new java . util . Properties ( ) ; properties . setProperty ( "registry.email" , "info@bealdung.com" ) ; properties . setProperty ( "info@bealdung.com" 1 , "register.bealdung.io/v2/" ) ; properties . setProperty ( "info@bealdung.com" 0 , "strongpassword" ) ; properties . setProperty ( "registry.username" , "info@bealdung.com" 2 ) ; properties . setProperty ( "info@bealdung.com" 3 , "/home/bealdung/public/.docker/certs" ) ; properties . setProperty ( "DOCKER_CONFIG" , "/home/bealdung/public/.docker/" ) ; properties . setProperty ( "DOCKER_TLS_VERIFY" , "1" ) ; properties . setProperty ( "info@bealdung.com" 4 , "info@bealdung.com" 5 ) ; com . github . dockerjava . core . DefaultDockerClientConfig config = com . github . dockerjava . core . DefaultDockerClientConfig . createDefaultConfigBuilder ( ) . withProperties ( properties ) . build ( ) ; com . github . dockerjava . api . DockerClient dockerClient = com . github . dockerjava . core . DockerClientBuilder . getInstance ( config ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { return new com . baeldung . creational . builder . BankAccount ( this ) ; }
|
org . junit . Assert . assertNotNull ( dockerClient )
|
testSetAndGetValue ( ) { doCallRealMethod ( ) . when ( condition ) . setValue ( any ( java . lang . String [ ] . class ) ) ; when ( condition . getValue ( ) ) . thenCallRealMethod ( ) ; condition . setValue ( values ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
|
org . junit . Assert . assertEquals ( condition . getValue ( ) , values )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.