input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
---|---|
removeWorker ( ) { mInfo . addWorker ( 1 , "MEM" ) ; mInfo . removeWorker ( 1 ) ; "<AssertPlaceHolder>" ; } getWorkers ( ) { java . util . List < alluxio . wire . WorkerInfo > workerInfos = getInfo ( alluxio . client . rest . NO_PARAMS ) . getWorkers ( ) ; org . junit . Assert . assertEquals ( 1 , workerInfos . size ( ) ) ; alluxio . wire . WorkerInfo workerInfo = workerInfos . get ( 0 ) ; org . junit . Assert . assertEquals ( 0 , workerInfo . getUsedBytes ( ) ) ; long bytes = alluxio . conf . ServerConfiguration . getBytes ( PropertyKey . WORKER_MEMORY_SIZE ) ; org . junit . Assert . assertEquals ( bytes , workerInfo . getCapacityBytes ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , mInfo . getWorkers ( ) . size ( ) )
|
testRethrowError ( ) { org . springframework . retry . support . RetryTemplate retryTemplate = new org . springframework . retry . support . RetryTemplate ( ) ; retryTemplate . setRetryPolicy ( new org . springframework . retry . policy . NeverRetryPolicy ( ) ) ; try { retryTemplate . execute ( new org . springframework . retry . RetryCallback < java . lang . Object , java . lang . Exception > ( ) { @ org . springframework . retry . support . Override public java . lang . Object doWithRetry ( org . springframework . retry . RetryContext context ) throws org . springframework . retry . support . Exception { throw new java . lang . Error ( "Realllly<sp>bad!" ) ; } } ) ; org . junit . Assert . fail ( "Expected<sp>Error" ) ; } catch ( java . lang . Error e ) { "<AssertPlaceHolder>" ; } } doWithRetry ( org . springframework . retry . RetryContext ) { org . springframework . retry . RetryContext global = org . springframework . retry . support . RetrySynchronizationManager . getContext ( ) ; org . junit . Assert . assertNotNull ( status ) ; org . junit . Assert . assertEquals ( global , status ) ; return null ; }
|
org . junit . Assert . assertEquals ( "Realllly<sp>bad!" , e . getMessage ( ) )
|
testGetGraphPanelContainer ( ) { System . out . println ( "getGraphPanelContainer" ) ; kg . apc . jmeter . vizualizers . PageDataExtractorOverTimeGui instance = new kg . apc . jmeter . vizualizers . PageDataExtractorOverTimeGui ( ) ; kg . apc . jmeter . vizualizers . JPanel result = instance . getGraphPanelContainer ( ) ; "<AssertPlaceHolder>" ; } getGraphPanelContainer ( ) { kg . apc . jmeter . vizualizers . JPanel panel = new kg . apc . jmeter . vizualizers . JPanel ( new kg . apc . jmeter . vizualizers . BorderLayout ( ) ) ; kg . apc . jmeter . vizualizers . JPanel innerTopPanel = new kg . apc . jmeter . vizualizers . JPanel ( new kg . apc . jmeter . vizualizers . BorderLayout ( ) ) ; errorPane = new kg . apc . jmeter . vizualizers . JScrollPane ( ) ; errorPane . setMinimumSize ( new kg . apc . jmeter . vizualizers . Dimension ( 100 , 50 ) ) ; errorPane . setPreferredSize ( new kg . apc . jmeter . vizualizers . Dimension ( 100 , 50 ) ) ; errorTextArea = new kg . apc . jmeter . vizualizers . JTextArea ( ) ; errorTextArea . setForeground ( Color . red ) ; errorTextArea . setBackground ( new kg . apc . jmeter . vizualizers . Color ( 255 , 255 , 153 ) ) ; errorTextArea . setEditable ( false ) ; errorPane . setViewportView ( errorTextArea ) ; registerPopup ( ) ; innerTopPanel . add ( createSamplerPanel ( ) , BorderLayout . NORTH ) ; innerTopPanel . add ( errorPane , BorderLayout . SOUTH ) ; innerTopPanel . add ( getFilePanel ( ) , BorderLayout . CENTER ) ; panel . add ( innerTopPanel , BorderLayout . NORTH ) ; errorPane . setVisible ( false ) ; return panel ; }
|
org . junit . Assert . assertNotNull ( result )
|
testServiceRegistered ( ) { java . util . Iterator < org . geotools . renderer . style . ExternalGraphicFactory > it = org . geotools . renderer . style . DynamicSymbolFactoryFinder . getExternalGraphicFactories ( ) ; boolean foundIt = false ; while ( it . hasNext ( ) ) { org . geotools . renderer . style . ExternalGraphicFactory egf = it . next ( ) ; if ( egf instanceof org . geotools . mbstyle . sprite . SpriteGraphicFactory ) { foundIt = true ; } } "<AssertPlaceHolder>" ; } next ( ) { if ( ( csvWriter ) == null ) { throw new java . io . IOException ( "FeatureWriter<sp>has<sp>been<sp>closed" ) ; } if ( ( this . currentFeature ) != null ) { this . write ( ) ; } try { if ( ! ( appending ) ) { if ( ( ( delegate . reader ) != null ) && ( delegate . hasNext ( ) ) ) { this . currentFeature = delegate . next ( ) ; return this . currentFeature ; } else { this . appending = true ; } } org . opengis . feature . simple . SimpleFeatureType featureType = state . getFeatureType ( ) ; java . lang . String fid = ( ( featureType . getTypeName ( ) ) + "." ) + ( nextRow ) ; java . lang . Object [ ] values = org . geotools . data . DataUtilities . defaultValues ( featureType ) ; this . currentFeature = org . geotools . feature . simple . SimpleFeatureBuilder . build ( featureType , values , fid ) ; return this . currentFeature ; } catch ( java . lang . IllegalArgumentException invalid ) { throw new java . io . IOException ( ( "Unable<sp>to<sp>create<sp>feature:" + ( invalid . getMessage ( ) ) ) , invalid ) ; } }
|
org . junit . Assert . assertTrue ( foundIt )
|
rejectForEach ( ) { com . gs . collections . api . LazyIterable < java . lang . Integer > select = com . gs . collections . impl . utility . LazyIterate . reject ( com . gs . collections . impl . list . Interval . oneTo ( 5 ) , com . gs . collections . impl . block . factory . Predicates . lessThan ( 5 ) ) ; int sum = select . injectInto ( 0 , AddFunction . INTEGER_TO_INT ) ; "<AssertPlaceHolder>" ; } injectInto ( double , com . gs . collections . api . block . function . primitive . DoubleObjectToDoubleFunction ) { return 0 ; }
|
org . junit . Assert . assertEquals ( 5 , sum )
|
testOpenIdWap ( ) { java . lang . String accessToken = java . lang . System . getProperty ( "connect.token" ) ; com . belerweb . social . bean . Result < com . belerweb . social . qq . connect . bean . OpenID > result = connect . getOAuth2 ( ) . openId ( accessToken , true ) ; "<AssertPlaceHolder>" ; com . belerweb . social . qq . connect . api . OAuth2Test . logger . info ( result . getResult ( ) . getJsonObject ( ) . toString ( ) ) ; } success ( ) { return ( error ) == null ; }
|
org . junit . Assert . assertTrue ( result . success ( ) )
|
combineValidationShouldFailOnModulo ( ) { eu . inmite . android . lib . validations . FormsValidatorWithJoinedValidationTest . ModelWithJoinedUnderValidation model = new eu . inmite . android . lib . validations . FormsValidatorWithJoinedValidationTest . ModelWithJoinedUnderValidation ( org . robolectric . Robolectric . application ) ; model . txtNumber . setText ( "1234" ) ; model . editPrefix . setText ( "0" ) ; boolean result = eu . inmite . android . lib . validations . form . FormValidator . validate ( Robolectric . application , model , null ) ; "<AssertPlaceHolder>" ; } validate ( android . content . Context , java . lang . Object , eu . inmite . android . lib . validations . form . iface . IValidationCallback ) { if ( context == null ) { throw new java . lang . IllegalArgumentException ( "context<sp>cannot<sp>ben<sp>null" ) ; } if ( target == null ) { throw new java . lang . IllegalArgumentException ( "target<sp>cannot<sp>be<sp>null" ) ; } final java . util . List < eu . inmite . android . lib . validations . form . FormValidator . ValidationFail > failedValidations = new java . util . ArrayList ( ) ; final java . util . List < android . view . View > passedValidations = new java . util . ArrayList ( ) ; boolean result = true ; final java . util . Map < android . view . View , eu . inmite . android . lib . validations . form . FormValidator . FieldInfo > infoMap = eu . inmite . android . lib . validations . form . FieldFinder . getFieldsForTarget ( target ) ; for ( Map . Entry < android . view . View , eu . inmite . android . lib . validations . form . FormValidator . FieldInfo > entry : infoMap . entrySet ( ) ) { final eu . inmite . android . lib . validations . form . FormValidator . FieldInfo fieldInfo = entry . getValue ( ) ; final android . view . View view = entry . getKey ( ) ; if ( ( ( view . getVisibility ( ) ) == ( android . view . View . GONE ) ) || ( ( view . getVisibility ( ) ) == ( android . view . View . INVISIBLE ) ) ) { continue ; } eu . inmite . android . lib . validations . form . FormValidator . ValidationFail fieldResult = eu . inmite . android . lib . validations . form . FormValidator . performFieldValidations ( context , fieldInfo , view ) ; if ( fieldResult != null ) { failedValidations . add ( fieldResult ) ; result = false ; } else { passedValidations . add ( view ) ; } } if ( callback != null ) { java . util . Collections . sort ( failedValidations , new java . util . Comparator < eu . inmite . android . lib . validations . form . FormValidator . ValidationFail > ( ) { @ eu . inmite . android . lib . validations . form . Override public int compare ( eu . inmite . android . lib . validations . form . FormValidator . ValidationFail lhs , eu . inmite . android . lib . validations . form . FormValidator . ValidationFail rhs ) { return ( lhs . order ) < ( rhs . order ) ? - 1 : ( lhs . order ) == ( rhs . order ) ? 0 : 1 ; } } ) ; callback . validationComplete ( result , java . util . Collections . unmodifiableList ( failedValidations ) , java . util . Collections . unmodifiableList ( passedValidations ) ) ; } return result ; }
|
org . junit . Assert . assertFalse ( result )
|
testGetWithNonExistingKeyReturnsNull ( ) { com . eclipsesource . tabris . ui . PageData data = new com . eclipsesource . tabris . ui . PageData ( ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . Class ) { T result = null ; java . lang . Object value = store . get ( key ) ; if ( value != null ) { if ( type . isAssignableFrom ( value . getClass ( ) ) ) { result = ( ( T ) ( value ) ) ; } else { throw new java . lang . IllegalArgumentException ( ( ( ( "Value<sp>with<sp>key<sp>" + key ) + "<sp>is<sp>not<sp>of<sp>type<sp>" ) + ( type . getName ( ) ) ) ) ; } } return result ; }
|
org . junit . Assert . assertNull ( data . get ( "foo" , java . lang . String . class ) )
|
testBug49598 ( ) { org . apache . catalina . startup . Tomcat tomcat = getTomcatInstance ( ) ; java . io . File docBase = new java . io . File ( java . lang . System . getProperty ( "java.io.tmpdir" ) ) ; org . apache . catalina . Context ctx = tomcat . addContext ( "" , docBase . getAbsolutePath ( ) ) ; org . apache . catalina . startup . Tomcat . addServlet ( ctx , "servlet" , new org . apache . catalina . connector . TestResponse . Bug49598Servlet ( ) ) ; ctx . addServletMapping ( "/" , "servlet" ) ; tomcat . start ( ) ; java . util . Map < java . lang . String , java . util . List < java . lang . String > > headers = new java . util . HashMap < java . lang . String , java . util . List < java . lang . String > > ( ) ; getUrl ( ( ( "http://localhost:" + ( getPort ( ) ) ) + "/" ) , new org . apache . tomcat . util . buf . ByteChunk ( ) , headers ) ; for ( Map . Entry < java . lang . String , java . util . List < java . lang . String > > header : headers . entrySet ( ) ) { if ( ( header . getKey ( ) ) == null ) { java . util . List < java . lang . String > values = header . getValue ( ) ; if ( ( ( values . size ( ) ) == 1 ) && ( values . get ( 0 ) . startsWith ( "HTTP/1.1" ) ) ) { continue ; } org . junit . Assert . fail ( ( "Null<sp>header<sp>name<sp>detected<sp>for<sp>value<sp>" + values ) ) ; } } int count = 0 ; for ( java . lang . String headerName : headers . keySet ( ) ) { if ( "Set-Cookie" . equals ( headerName ) ) { count ++ ; } } "<AssertPlaceHolder>" ; } size ( ) { return items . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , count )
|
concatf ( ) { char orderBefore = org . nd4j . linalg . factory . Nd4j . order ( ) ; try { org . nd4j . linalg . factory . Nd4j . factory ( ) . setOrder ( 'f' ) ; org . nd4j . linalg . api . ndarray . INDArray x = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 1 , 2 , 3 , 4 , 5 , 6 } , new int [ ] { 1 , 6 } , 'c' ) ; org . nd4j . linalg . api . ndarray . INDArray y = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7 , 8 , 9 , 10 , 11 , 12 } , new int [ ] { 1 , 6 } , 'c' ) ; org . nd4j . linalg . api . ndarray . INDArray out = org . nd4j . linalg . factory . Nd4j . concat ( 0 , x , y ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . createFromArray ( new double [ ] [ ] { new double [ ] { 1 , 2 , 3 , 4 , 5 , 6 } , new double [ ] { 7 , 8 , 9 , 10 , 11 , 12 } } ) ; "<AssertPlaceHolder>" ; } finally { org . nd4j . linalg . factory . Nd4j . factory ( ) . setOrder ( orderBefore ) ; } } setOrder ( char ) { }
|
org . junit . Assert . assertEquals ( exp , out )
|
testForAllIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; "<AssertPlaceHolder>" ; } testForAllIteratorExp01 ( ) { testpackage . Class1 class1 ; class1 = new testpackage . Class1 ( ) ; org . junit . Assert . assertTrue ( class1 . testForAllIteratorExp01 ( ) ) ; }
|
org . junit . Assert . assertTrue ( class1 . testForAllIteratorExp01 ( ) )
|
resultProvidedTest ( ) { java . lang . Object testResult = new java . lang . Object ( ) ; java . util . concurrent . atomic . AtomicReference < java . lang . Object > resultProvided = new java . util . concurrent . atomic . AtomicReference ( null ) ; new org . threadly . concurrent . future . FutureCallbackResultHandler ( ( o ) -> resultProvided . set ( o ) ) . handleResult ( testResult ) ; "<AssertPlaceHolder>" ; } get ( ) { executeIfNotStarted ( ) ; return super . get ( ) ; }
|
org . junit . Assert . assertTrue ( ( testResult == ( resultProvided . get ( ) ) ) )
|
testPopulateResourcesHostBatches ( ) { setUpCommonMocks ( ) ; org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . TestStreamProviderForHostComponentMultipleHostsMetricsTest streamProvider = new org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . TestStreamProviderForHostComponentMultipleHostsMetricsTest ( null ) ; injectCacheEntryFactoryWithStreamProvider ( streamProvider ) ; org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . TestMetricHostProvider metricHostProvider = new org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . TestMetricHostProvider ( "h1" ) ; org . apache . ambari . server . configuration . ComponentSSLConfiguration sslConfiguration = mock ( org . apache . ambari . server . configuration . ComponentSSLConfiguration . class ) ; org . apache . ambari . server . controller . metrics . timeline . cache . TimelineMetricCacheProvider cacheProviderMock = org . easymock . EasyMock . createMock ( org . apache . ambari . server . controller . metrics . timeline . cache . TimelineMetricCacheProvider . class ) ; org . apache . ambari . server . controller . metrics . timeline . cache . TimelineMetricCache cacheMock = org . easymock . EasyMock . createMock ( org . apache . ambari . server . controller . metrics . timeline . cache . TimelineMetricCache . class ) ; expect ( cacheProviderMock . getTimelineMetricsCache ( ) ) . andReturn ( cacheMock ) . anyTimes ( ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , org . apache . ambari . server . controller . internal . PropertyInfo > > propertyIds = org . apache . ambari . server . controller . utilities . PropertyHelper . getMetricPropertyIds ( Resource . Type . HostComponent ) ; java . util . Set < org . apache . ambari . server . controller . spi . Resource > resources = new java . util . HashSet ( ) ; for ( int i = 0 ; i < ( 100 + 1 ) ; i ++ ) { org . apache . ambari . server . controller . spi . Resource resource = new org . apache . ambari . server . controller . internal . ResourceImpl ( Resource . Type . Host ) ; resource . setProperty ( org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . CLUSTER_NAME_PROPERTY_ID , "c1" ) ; resource . setProperty ( org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . HOST_NAME_PROPERTY_ID , ( "h" + i ) ) ; resource . setProperty ( org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . COMPONENT_NAME_PROPERTY_ID , "DATANODE" ) ; resources . add ( resource ) ; } java . util . Map < java . lang . String , org . apache . ambari . server . controller . spi . TemporalInfo > temporalInfoMap = new java . util . HashMap ( ) ; temporalInfoMap . put ( org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . PROPERTY_ID4 , new org . apache . ambari . server . controller . internal . TemporalInfoImpl ( 1416445244801L , 1416448936464L , 1L ) ) ; org . apache . ambari . server . controller . spi . Request request = org . apache . ambari . server . controller . utilities . PropertyHelper . getReadRequest ( new java . util . HashSet < java . lang . String > ( ) { { add ( org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . PROPERTY_ID4 ) ; add ( "params/padding/NONE" ) ; } } , temporalInfoMap ) ; org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProvider propertyProvider = new org . apache . ambari . server . controller . metrics . timeline . AMSHostComponentPropertyProvider ( propertyIds , streamProvider , sslConfiguration , cacheProviderMock , metricHostProvider , org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . CLUSTER_NAME_PROPERTY_ID , org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . HOST_NAME_PROPERTY_ID , org . apache . ambari . server . controller . metrics . timeline . AMSPropertyProviderTest . COMPONENT_NAME_PROPERTY_ID ) ; java . util . Set < org . apache . ambari . server . controller . spi . Resource > resources1 = propertyProvider . populateResources ( resources , request , null ) ; java . util . List < java . lang . String > allSpecs = new java . util . ArrayList ( streamProvider . getAllSpecs ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { java . util . Set < java . lang . String > nodes = new java . util . HashSet < java . lang . String > ( ) ; for ( org . apache . ambari . eventdb . model . WorkflowDag . WorkflowDagEntry entry : entries ) { nodes . add ( entry . getSource ( ) ) ; nodes . addAll ( entry . getTargets ( ) ) ; } return nodes . size ( ) ; }
|
org . junit . Assert . assertEquals ( 2 , allSpecs . size ( ) )
|
testDelete ( ) { final org . jboss . narayana . quickstart . jca . model . Customer customer = new org . jboss . narayana . quickstart . jca . model . Customer ( 1 , "First<sp>customer<sp>name" ) ; customerDAO . insert ( customer ) ; customerDAO . delete ( customer ) ; "<AssertPlaceHolder>" ; } get ( int ) { if ( org . jboss . narayana . quickstart . jca . model . CustomerDAO . LOG . isTraceEnabled ( ) ) { org . jboss . narayana . quickstart . jca . model . CustomerDAO . LOG . trace ( ( ( "CustomerDAO.get(id=" + id ) + ")" ) ) ; } final java . sql . Connection connection = getConnection ( ) ; final java . sql . PreparedStatement statement = connection . prepareStatement ( ( ( "SELECT<sp>*<sp>FROM<sp>customer<sp>WHERE<sp>id<sp>=<sp>'" + id ) + "'<sp>LIMIT<sp>1;" ) ) ; final java . sql . ResultSet resultSet = statement . executeQuery ( ) ; final org . jboss . narayana . quickstart . jca . model . Customer customer = resultSetToCustomer ( resultSet ) ; connection . close ( ) ; return customer ; }
|
org . junit . Assert . assertEquals ( null , customerDAO . get ( 1 ) )
|
testMatchesMVEL ( ) { final java . lang . String drl = "hello<sp>;=" 5 + ( ( ( ( ( ( ( "hello<sp>;=" 1 + "hello<sp>;=" 6 ) + "rule<sp>\"Matches<sp>mvel\"hello<sp>;=" 0 ) + "when\n" ) + "<sp>Map(<sp>this[\"content\"]<sp>matches<sp>\"hello<sp>;=\"hello<sp>;=" 4 ) + "hello<sp>;=" 2 ) + "<sp>results.add(<sp>\"OK\"<sp>);\n" ) + "hello<sp>;=" 3 ) ; final org . kie . api . KieBase kbase = org . drools . testcoverage . common . util . KieBaseUtil . getKieBaseFromKieModuleFromDrl ( "matches-test" , kieBaseTestConfiguration , drl ) ; final org . kie . api . runtime . KieSession session = kbase . newKieSession ( ) ; try { final java . util . List results = new java . util . ArrayList ( ) ; session . setGlobal ( "results" , results ) ; final java . util . Map < java . lang . String , java . lang . String > map = new java . util . HashMap ( ) ; map . put ( "content" , "hello<sp>;=" ) ; session . insert ( map ) ; session . fireAllRules ( ) ; "<AssertPlaceHolder>" ; } finally { session . dispose ( ) ; } } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , results . size ( ) )
|
encryptStringSymmetric ( ) { byte [ ] key = com . owncloud . android . utils . EncryptionUtils . generateKey ( ) ; java . lang . String encryptedString = com . owncloud . android . utils . EncryptionUtils . encryptStringSymmetric ( privateKey , key ) ; java . lang . String decryptedString = com . owncloud . android . utils . EncryptionUtils . decryptStringSymmetric ( encryptedString , key ) ; "<AssertPlaceHolder>" ; } decryptStringSymmetric ( java . lang . String , byte [ ] ) { javax . crypto . Cipher cipher = javax . crypto . Cipher . getInstance ( com . owncloud . android . utils . EncryptionUtils . AES_CIPHER ) ; int delimiterPosition = string . lastIndexOf ( com . owncloud . android . utils . EncryptionUtils . ivDelimiter ) ; java . lang . String cipherString = string . substring ( 0 , delimiterPosition ) ; java . lang . String ivString = string . substring ( ( delimiterPosition + ( com . owncloud . android . utils . EncryptionUtils . ivDelimiter . length ( ) ) ) , string . length ( ) ) ; byte [ ] iv = new javax . crypto . spec . IvParameterSpec ( com . owncloud . android . utils . EncryptionUtils . decodeStringToBase64Bytes ( ivString ) ) . getIV ( ) ; java . security . Key key = new javax . crypto . spec . SecretKeySpec ( encryptionKeyBytes , com . owncloud . android . utils . EncryptionUtils . AES ) ; javax . crypto . spec . GCMParameterSpec spec = new javax . crypto . spec . GCMParameterSpec ( 128 , iv ) ; cipher . init ( Cipher . DECRYPT_MODE , key , spec ) ; byte [ ] bytes = com . owncloud . android . utils . EncryptionUtils . decodeStringToBase64Bytes ( cipherString ) ; byte [ ] encodedBytes = cipher . doFinal ( bytes ) ; return com . owncloud . android . utils . EncryptionUtils . decodeBase64BytesToString ( encodedBytes ) ; }
|
org . junit . Assert . assertEquals ( privateKey , decryptedString )
|
testSkipFloat ( ) { long sentinel = Long . MAX_VALUE ; org . apache . trevni . OutputBuffer out = new org . apache . trevni . OutputBuffer ( ) ; out . writeValue ( Float . MAX_VALUE , ValueType . FLOAT ) ; out . writeLong ( sentinel ) ; org . apache . trevni . InputBuffer in = new org . apache . trevni . InputBuffer ( new org . apache . trevni . InputBytes ( out . toByteArray ( ) ) ) ; in . skipValue ( ValueType . FLOAT ) ; "<AssertPlaceHolder>" ; } readLong ( ) { if ( ( ( limit ) - ( pos ) ) < 10 ) { int b = read ( ) ; long n = b & 127 ; for ( int shift = 7 ; b > 127 ; shift += 7 ) { b = read ( ) ; n ^= ( b & 127L ) << shift ; } return ( n > > > 1 ) ^ ( - ( n & 1 ) ) ; } int b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; int n = b & 127 ; long l ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 7 ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 14 ; if ( b > 127 ) { b = ( buf [ ( ( pos ) ++ ) ] ) & 255 ; n ^= ( b & 127 ) << 21 ; if ( b > 127 ) { l = innerLongDecode ( ( ( long ) ( n ) ) ) ; } else { l = n ; } } else { l = n ; } } else { l = n ; } } else { l = n ; } if ( ( pos ) > ( limit ) ) { throw new java . io . EOFException ( ) ; } return ( l > > > 1 ) ^ ( - ( l & 1 ) ) ; }
|
org . junit . Assert . assertEquals ( sentinel , in . readLong ( ) )
|
testGetQueryTokenizer_Custom ( ) { net . sourceforge . squirrel_sql . fw . sql . IQueryTokenizer customTokenizer = net . sourceforge . squirrel_sql . fw . FwTestUtil . getEasyMockQueryTokenizer ( net . sourceforge . squirrel_sql . client . session . SessionTest . CUSTOM_STMT_SEP , "--" , true , 0 ) ; sessionUnderTest . setQueryTokenizer ( customTokenizer ) ; net . sourceforge . squirrel_sql . fw . sql . IQueryTokenizer retrievedTokenizer = sessionUnderTest . getQueryTokenizer ( ) ; "<AssertPlaceHolder>" ; } getSQLStatementSeparator ( ) { return _querySep ; }
|
org . junit . Assert . assertEquals ( net . sourceforge . squirrel_sql . client . session . SessionTest . CUSTOM_STMT_SEP , retrievedTokenizer . getSQLStatementSeparator ( ) )
|
testReceiveResponseAcceptsResponseFromSameSessionEpochAndCipherUsingStrictMatching ( ) { org . eclipse . californium . core . network . UdpMatcher matcher = newMatcher ( true ) ; org . eclipse . californium . core . network . Exchange exchange = org . eclipse . californium . core . network . UdpMatcherTest . sendRequest ( matcher , new org . eclipse . californium . elements . DtlsCorrelationContext ( org . eclipse . californium . core . network . UdpMatcherTest . SESSION_ID , org . eclipse . californium . core . network . UdpMatcherTest . EPOCH , org . eclipse . californium . core . network . UdpMatcherTest . CIPHER ) ) ; org . eclipse . californium . core . network . Exchange matchedExchange = matcher . receiveResponse ( org . eclipse . californium . core . network . UdpMatcherTest . responseFor ( exchange . getCurrentRequest ( ) ) , new org . eclipse . californium . elements . DtlsCorrelationContext ( org . eclipse . californium . core . network . UdpMatcherTest . SESSION_ID , org . eclipse . californium . core . network . UdpMatcherTest . EPOCH , org . eclipse . californium . core . network . UdpMatcherTest . CIPHER ) ) ; "<AssertPlaceHolder>" ; } getCurrentRequest ( ) { return currentRequest ; }
|
org . junit . Assert . assertThat ( matchedExchange , org . hamcrest . CoreMatchers . is ( exchange ) )
|
testParseFilterAnd ( ) { r1 . put ( "y" , new model . datafield . DataFieldDouble ( 2 ) ) ; model . SequentialData result = ( ( model . SequentialData ) ( p . parse ( "FILTER<sp>WHERE<sp>((COL(x)<sp>=<sp>1.0)<sp>and<sp>(COL(y)<sp>=<sp>2.0))" , data ) ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , analyze . parsing . ParseResult ) { analyze . parsing . ParseResult result = input ; analyze . parsing . ParseResult resultWithoutVar = input ; java . util . Scanner scanner = new java . util . Scanner ( script ) ; while ( scanner . hasNextLine ( ) ) { java . lang . String line = scanner . nextLine ( ) . replaceFirst ( "//(.*)" , "" ) ; java . lang . String [ ] lineDataSplit = line . split ( "USING" , 2 ) ; java . lang . String lineWithoutUsing = lineDataSplit [ 0 ] . trim ( ) ; input = resultWithoutVar ; if ( ( lineDataSplit . length ) == 2 ) { java . lang . String variable = lineDataSplit [ 1 ] . trim ( ) ; if ( ! ( variables . containsKey ( variable ) ) ) { scanner . close ( ) ; throw new analyze . parsing . ParseException ( ( "Using<sp>undefined<sp>variable:<sp>" + variable ) ) ; } input = variables . get ( variable ) ; } java . lang . String variable = null ; if ( lineWithoutUsing . startsWith ( "$" ) ) { java . lang . String [ ] variableOperationSplit = lineWithoutUsing . split ( "<sp>=" , 2 ) ; if ( ( variableOperationSplit . length ) == 1 ) { scanner . close ( ) ; throw new analyze . parsing . ParseException ( ( ( "'" + lineWithoutUsing ) + "'<sp>contains<sp>no<sp>valid<sp>operation" ) ) ; } variable = variableOperationSplit [ 0 ] ; lineWithoutUsing = variableOperationSplit [ 1 ] . trim ( ) ; } result = parseLine ( replaceVariables ( lineWithoutUsing ) , input ) ; if ( variable != null ) { variables . put ( variable , result ) ; } else { resultWithoutVar = result ; } } scanner . close ( ) ; return resultWithoutVar ; }
|
org . junit . Assert . assertTrue ( result . contains ( r1 ) )
|
testFullyOutsideCircle ( ) { org . locationtech . jts . geom . Point p = ( ( org . locationtech . jts . geom . Point ) ( wkt . read ( "POINT(5<sp>5)" ) ) ) ; org . locationtech . jts . geom . LineString ls = ( ( org . locationtech . jts . geom . Polygon ) ( p . buffer ( 10 ) ) ) . getExteriorRing ( ) ; org . locationtech . jts . geom . Geometry clipped = clipper . clip ( ls , false ) ; "<AssertPlaceHolder>" ; showResult ( "Circle<sp>around" , ls , clipped ) ; } clip ( org . locationtech . jts . geom . Geometry , boolean ) { if ( g == null ) { return null ; } org . locationtech . jts . geom . Envelope geomEnvelope = g . getEnvelopeInternal ( ) ; if ( geomEnvelope . isNull ( ) ) { return null ; } if ( bounds . contains ( geomEnvelope ) ) { return g ; } else if ( ! ( bounds . intersects ( geomEnvelope ) ) ) { return null ; } if ( g instanceof org . locationtech . jts . geom . LineString ) { return clipLineString ( ( ( org . locationtech . jts . geom . LineString ) ( g ) ) ) ; } else if ( g instanceof org . locationtech . jts . geom . Polygon ) { if ( ensureValid ) { org . locationtech . jts . geom . GeometryFactory gf = g . getFactory ( ) ; org . locationtech . jts . geom . CoordinateSequenceFactory csf = gf . getCoordinateSequenceFactory ( ) ; org . locationtech . jts . geom . Polygon fence = gf . createPolygon ( buildBoundsString ( gf , csf ) , null ) ; return g . intersection ( fence ) ; } else { return clipPolygon ( ( ( org . locationtech . jts . geom . Polygon ) ( g ) ) ) ; } } else if ( g instanceof org . locationtech . jts . geom . GeometryCollection ) { return clipCollection ( ( ( org . locationtech . jts . geom . GeometryCollection ) ( g ) ) , ensureValid ) ; } else { return g ; } }
|
org . junit . Assert . assertNull ( clipped )
|
testSetProcessConfigAttributesWhenProcessConfigIsNull ( ) { final java . util . Map < ? , ? > configs = mock ( java . util . Map . class ) ; final org . kie . server . api . model . KieContainerResource containerResource = spy ( new org . kie . server . api . model . KieContainerResource ( ) ) ; final java . util . List < org . kie . server . api . model . KieServerConfigItem > actualConfigItems = containerResource . getConfigItems ( ) ; doReturn ( null ) . when ( configs ) . get ( Capability . PROCESS ) ; doReturn ( configs ) . when ( containerSpec ) . getConfigs ( ) ; instanceManager . setProcessConfigAttributes ( containerSpec , containerResource ) ; "<AssertPlaceHolder>" ; } size ( ) { return people . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , actualConfigItems . size ( ) )
|
testDeleteUUID ( ) { System . out . println ( "deleteUUID" ) ; java . util . UUID uuid = getBean ( ) . addUUID ( "delete-uuid" ) ; org . ancoron . postgresql . jpa . test . UUIDTestEntity expResult = new org . ancoron . postgresql . jpa . test . UUIDTestEntity ( ) ; expResult . setId ( uuid ) ; expResult . setName ( "delete-uuid" ) ; org . ancoron . postgresql . jpa . test . UUIDTestEntity result = getBean ( ) . deleteUUID ( uuid ) ; "<AssertPlaceHolder>" ; } deleteUUID ( java . util . UUID ) { org . ancoron . postgresql . jpa . test . UUIDTestEntity entity = findByUUID ( uuid ) ; em . remove ( entity ) ; return entity ; }
|
org . junit . Assert . assertEquals ( expResult , result )
|
testLogGammaSum ( ) { final int ulps = 2 ; for ( int i = 0 ; i < ( org . apache . commons . math3 . special . BetaTest . LOG_GAMMA_SUM_REF . length ) ; i ++ ) { final double [ ] ref = org . apache . commons . math3 . special . BetaTest . LOG_GAMMA_SUM_REF [ i ] ; final double a = ref [ 0 ] ; final double b = ref [ 1 ] ; final double expected = ref [ 2 ] ; final double actual = org . apache . commons . math3 . special . BetaTest . logGammaSum ( a , b ) ; final double tol = ulps * ( org . apache . commons . math3 . util . FastMath . ulp ( expected ) ) ; final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( a ) . append ( ",<sp>" ) . append ( b ) ; "<AssertPlaceHolder>" ; } } toString ( ) { java . lang . String repst = "OP_INSTANCE:\n" ; repst += ( ( ( ( ( ( this . getOperationApplied ( ) ) + ":(" ) + ( this . original . getClass ( ) . getCanonicalName ( ) ) ) + ")<sp>`" ) + ( fr . inria . astor . util . StringUtil . trunc ( this . original ) ) ) + "<sp>`<sp>-topatch--><sp>`" ) + ( fr . inria . astor . util . StringUtil . trunc ( modified ) ) ; repst += ( "`<sp>(" + ( ( this . modified ) != null ? this . modified . getClass ( ) . getCanonicalName ( ) : "null" ) ) + ")<sp>" ; return repst ; }
|
org . junit . Assert . assertEquals ( builder . toString ( ) , expected , actual , tol )
|
testNonLazyRegenerationForProductById ( ) { org . candlepin . model . Owner owner = org . candlepin . test . TestUtil . createOwner ( "test-owner" , "Test<sp>Owner" ) ; org . candlepin . model . Consumer consumer = org . candlepin . test . TestUtil . createConsumer ( owner ) ; org . candlepin . model . Product product = org . candlepin . test . TestUtil . createProduct ( ) ; org . candlepin . model . Pool pool = org . candlepin . test . TestUtil . createPool ( owner , product ) ; org . candlepin . model . Entitlement entitlement = org . candlepin . test . TestUtil . createEntitlement ( owner , consumer , pool , null ) ; java . util . Set < org . candlepin . model . Entitlement > entitlements = new java . util . HashSet ( ) ; entitlements . add ( entitlement ) ; pool . setEntitlements ( entitlements ) ; java . util . HashMap < java . lang . String , org . candlepin . model . EntitlementCertificate > ecMap = new java . util . HashMap ( ) ; ecMap . put ( pool . getId ( ) , new org . candlepin . model . EntitlementCertificate ( ) ) ; when ( this . mockPoolCurator . listAvailableEntitlementPools ( any ( org . candlepin . model . Consumer . class ) , eq ( owner ) , eq ( product . getId ( ) ) , any ( java . util . Date . class ) ) ) . thenReturn ( java . util . Arrays . asList ( pool ) ) ; when ( this . mockEntCertAdapter . generateEntitlementCerts ( any ( org . candlepin . model . Consumer . class ) , any ( java . util . Map . class ) , any ( java . util . Map . class ) , any ( java . util . Map . class ) , anyBoolean ( ) ) ) . thenReturn ( ecMap ) ; this . ecGenerator . regenerateCertificatesOf ( owner , product . getId ( ) , false ) ; "<AssertPlaceHolder>" ; verify ( this . mockEntCertAdapter , times ( 1 ) ) . generateEntitlementCerts ( any ( org . candlepin . model . Consumer . class ) , this . poolQuantityMapCaptor . capture ( ) , this . entMapCaptor . capture ( ) , this . productMapCaptor . capture ( ) , eq ( false ) ) ; verify ( this . mockEventSink , times ( 1 ) ) . queueEvent ( any ( org . candlepin . audit . Event . class ) ) ; } isDirty ( ) { return dirty ; }
|
org . junit . Assert . assertFalse ( entitlement . isDirty ( ) )
|
testResourceValidation ( ) { org . jboss . seam . rest . test . validation . Person validPerson = new org . jboss . seam . rest . test . validation . Person ( "foo" , "bar" , 100 , false , "foobar" ) ; try { invalidResource . completelyValidatedOperation ( validPerson ) ; throw new java . lang . RuntimeException ( "Expected<sp>exception<sp>not<sp>thrown." ) ; } catch ( org . jboss . seam . rest . validation . ValidationException e ) { "<AssertPlaceHolder>" ; } } getViolations ( ) { return violations ; }
|
org . junit . Assert . assertEquals ( 3 , e . getViolations ( ) . size ( ) )
|
test ( ) { org . schemarepo . Validator foo = new org . schemarepo . Validator ( ) { @ org . schemarepo . Override public void validate ( java . lang . String schemaToValidate , java . lang . Iterable < org . schemarepo . SchemaEntry > schemasInOrder ) throws org . schemarepo . SchemaValidationException { } } ; org . schemarepo . ValidatorFactory fact = new org . schemarepo . ValidatorFactory . Builder ( ) . setValidator ( "foo" , foo ) . build ( ) ; java . util . HashSet < java . lang . String > fooset = new java . util . HashSet < java . lang . String > ( ) ; fooset . add ( "foo" ) ; fooset . add ( null ) ; "<AssertPlaceHolder>" ; fact . getValidators ( fooset ) . get ( 0 ) . validate ( null , null ) ; } getValidators ( java . util . Set ) { java . util . ArrayList < org . schemarepo . Validator > result = new java . util . ArrayList < org . schemarepo . Validator > ( ) ; for ( java . lang . String name : validatorNames ) { org . schemarepo . Validator v = validators . get ( name ) ; if ( v != null ) { result . add ( v ) ; } } return result ; }
|
org . junit . Assert . assertSame ( foo , fact . getValidators ( fooset ) . get ( 0 ) )
|
testTooLong ( ) { pl . edu . icm . cermine . metadata . affiliation . CRFAffiliationParser parser = new pl . edu . icm . cermine . metadata . affiliation . CRFAffiliationParser ( ) ; org . jdom . output . XMLOutputter outputter = new org . jdom . output . XMLOutputter ( ) ; java . lang . StringBuilder inputSB = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 40 ; i ++ ) { inputSB . append ( "Department<sp>of<sp>Oncology<sp>-<sp>Pathology,<sp>Karolinska<sp>Institutet,<sp>Stockholm,<sp>Sweden,<sp>" ) ; } java . lang . String input = inputSB . toString ( ) ; java . lang . String expected = ( "<aff<sp>id=\"aff\"><label></label>" + ( input . trim ( ) ) ) + "</aff>" ; java . lang . String actual = outputter . outputString ( parser . parse ( input ) ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { pl . edu . icm . cermine . metadata . model . DocumentAffiliation aff = new pl . edu . icm . cermine . metadata . model . DocumentAffiliation ( affiliationString ) ; parse ( aff ) ; pl . edu . icm . cermine . metadata . transformers . MetadataToNLMConverter converter = new pl . edu . icm . cermine . metadata . transformers . MetadataToNLMConverter ( ) ; return converter . convertAffiliation ( aff ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testStoreOneAndGetOne ( ) { org . hawkular . apm . server . api . model . zipkin . Annotation annotation = new org . hawkular . apm . server . api . model . zipkin . Annotation ( ) ; annotation . setValue ( "foo<sp>bar" ) ; annotation . setTimestamp ( 123456789L ) ; annotation . setEndpoint ( createEndpoint ( "123.123.123.1233" , ( ( short ) ( 123 ) ) , "foo<sp>service" ) ) ; org . hawkular . apm . server . api . model . zipkin . BinaryAnnotation binaryAnnotation = new org . hawkular . apm . server . api . model . zipkin . BinaryAnnotation ( ) ; binaryAnnotation . setEndpoint ( createEndpoint ( "123.123.123.1233" , ( ( short ) ( 123 ) ) , "foo<sp>service" ) ) ; binaryAnnotation . setValue ( "foo" ) ; binaryAnnotation . setKey ( "foo<sp>key" ) ; binaryAnnotation . setType ( AnnotationType . I64 ) ; org . hawkular . apm . server . api . model . zipkin . Span span = new org . hawkular . apm . server . api . model . zipkin . Span ( java . util . Arrays . asList ( binaryAnnotation ) , java . util . Arrays . asList ( annotation ) ) ; span . setId ( "id" ) ; span . setTraceId ( "traceId" ) ; span . setParentId ( "parentId" ) ; span . setName ( "foo" ) ; span . setDebug ( true ) ; span . setTimestamp ( 1234456L ) ; span . setDuration ( 55468L ) ; storeAndWait ( null , java . util . Collections . singletonList ( span ) ) ; org . hawkular . apm . server . api . model . zipkin . Span spanFromDb = spanService . getSpan ( null , span . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertEquals ( span , spanFromDb )
|
testGetSetSubGridColor ( ) { shape . setSubGridColour ( DviPsColors . RED ) ; "<AssertPlaceHolder>" ; } getSubGridColour ( ) { return firstIGrid ( ) . map ( ( sh ) -> sh . getSubGridColour ( ) ) . orElse ( DviPsColors . BLACK ) ; }
|
org . junit . Assert . assertEquals ( DviPsColors . RED , shape . getSubGridColour ( ) )
|
testGeenWijzigingen ( ) { final nl . bzk . brp . model . operationeel . kern . ActieModel actie = support . PersoonHisVolledigUtil . maakActie ( 2L , SoortAdministratieveHandeling . G_B_A_BIJHOUDING_ACTUEEL , SoortActie . CONVERSIE_G_B_A , 19400101 , partij ) ; final nl . bzk . brp . util . hisvolledig . kern . PersoonVerstrekkingsbeperkingHisVolledigImplBuilder beperkingBuilder = new nl . bzk . brp . util . hisvolledig . kern . PersoonVerstrekkingsbeperkingHisVolledigImplBuilder ( partij , null , null ) ; builder . voegPersoonVerstrekkingsbeperkingToe ( beperkingBuilder . build ( ) ) ; final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . syntax . Lo3CategorieWaarde > resultaat = uitvoeren ( actie ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
|
relative_path_with_$parent_and_invalid_field_returns_null ( ) { com . fasterxml . jackson . databind . JsonNode result = doc . get ( new com . redhat . lightblue . util . Path ( "object.nested1.doublenested1.$parent.notthere" ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return new com . redhat . lightblue . util . Error ( com . redhat . lightblue . util . Error . THREAD_CONTEXT . get ( ) , errorCode , null ) ; }
|
org . junit . Assert . assertNull ( result )
|
timestampAttributeParsesMillisecondsSinceEpoch ( ) { long time = 1446162101123L ; java . util . Map < java . lang . String , java . lang . String > map = org . apache . beam . vendor . guava . v20_0 . com . google . common . collect . ImmutableMap . of ( "myAttribute" , java . lang . String . valueOf ( time ) ) ; long timestamp = org . apache . beam . sdk . io . gcp . pubsub . PubsubClient . extractTimestamp ( "myAttribute" , null , map ) ; "<AssertPlaceHolder>" ; } valueOf ( java . lang . String ) { final T retVal ; if ( ( ( org . apache . beam . runners . spark . aggregators . metrics . sink . InMemoryMetrics . extendedMetricsRegistry ) != null ) && ( org . apache . beam . runners . spark . aggregators . metrics . sink . InMemoryMetrics . extendedMetricsRegistry . getGauges ( ) . keySet ( ) . stream ( ) . anyMatch ( org . apache . beam . vendor . guava . v20_0 . com . google . common . base . Predicates . containsPattern ( ( name + "$" ) ) :: apply ) ) ) { java . lang . String key = org . apache . beam . runners . spark . aggregators . metrics . sink . InMemoryMetrics . extendedMetricsRegistry . getGauges ( ) . keySet ( ) . stream ( ) . filter ( org . apache . beam . vendor . guava . v20_0 . com . google . common . base . Predicates . containsPattern ( ( name + "$" ) ) :: apply ) . findFirst ( ) . get ( ) ; retVal = ( ( T ) ( org . apache . beam . runners . spark . aggregators . metrics . sink . InMemoryMetrics . extendedMetricsRegistry . getGauges ( ) . get ( key ) . getValue ( ) ) ) ; } else { retVal = null ; } return retVal ; }
|
org . junit . Assert . assertEquals ( time , timestamp )
|
testWriteAvroEntity ( ) { java . lang . String schemaString = "{<sp>\"type\":<sp>\"int\"<sp>}" ; java . io . InputStream is = new java . io . ByteArrayInputStream ( schemaString . getBytes ( ) ) ; org . apache . avro . Schema schema = parser . parse ( is ) ; org . apache . avro . io . DatumWriter < java . lang . Integer > writer = new org . apache . avro . generic . GenericDatumWriter < java . lang . Integer > ( schema ) ; byte [ ] bytes = org . kitesdk . data . hbase . avro . AvroUtils . writeAvroEntity ( 1 , writer ) ; "<AssertPlaceHolder>" ; } writeAvroEntity ( T , org . apache . avro . io . DatumWriter ) { java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; org . apache . avro . io . Encoder encoder = new org . apache . avro . io . EncoderFactory ( ) . binaryEncoder ( outputStream , null ) ; org . kitesdk . data . hbase . avro . AvroUtils . writeAvroEntity ( entity , encoder , writer ) ; return outputStream . toByteArray ( ) ; }
|
org . junit . Assert . assertArrayEquals ( new byte [ ] { ( ( byte ) ( 2 ) ) } , bytes )
|
testQueuedFeedbackCalls ( ) { java . util . Map < java . lang . String , java . util . Date > map = java . util . Collections . singletonMap ( "Test" , new java . util . Date ( ) ) ; com . notnoop . apns . internal . ApnsFeedbackConnection feed = mock ( com . notnoop . apns . internal . ApnsFeedbackConnection . class ) ; when ( feed . getInactiveDevices ( ) ) . thenReturn ( map ) ; com . notnoop . apns . internal . ApnsServiceImpl service = new com . notnoop . apns . internal . ApnsServiceImpl ( null , feed ) ; com . notnoop . apns . internal . QueuedApnsService queued = new com . notnoop . apns . internal . QueuedApnsService ( service ) ; "<AssertPlaceHolder>" ; verify ( feed , times ( 1 ) ) . getInactiveDevices ( ) ; } getInactiveDevices ( ) { return service . getInactiveDevices ( ) ; }
|
org . junit . Assert . assertEquals ( map , queued . getInactiveDevices ( ) )
|
single_column_via_Object_type ( ) { for ( java . lang . Object s : query ( ) . from ( survey ) . select ( com . querydsl . sql . ExpressionUtils . path ( java . lang . Object . class , survey . name . getMetadata ( ) ) ) . fetch ( ) ) { "<AssertPlaceHolder>" ; } } fetch ( ) { return innerList ( ) ; }
|
org . junit . Assert . assertEquals ( java . lang . String . class , s . getClass ( ) )
|
shouldAllowAddingQuerystringParametersAfterCreation ( ) { final com . github . scribejava . core . model . OAuthRequest request = new com . github . scribejava . core . model . OAuthRequest ( Verb . GET , "http://example.com?one=val" ) ; request . addQuerystringParameter ( "two" , "other<sp>val" ) ; request . addQuerystringParameter ( "more" , "params" ) ; "<AssertPlaceHolder>" ; } getQueryStringParams ( ) { try { final com . github . scribejava . core . model . ParameterList result = new com . github . scribejava . core . model . ParameterList ( ) ; final java . lang . String queryString = new java . net . URL ( url ) . getQuery ( ) ; result . addQuerystring ( queryString ) ; result . addAll ( querystringParams ) ; return result ; } catch ( java . net . MalformedURLException mue ) { throw new com . github . scribejava . core . exceptions . OAuthException ( "Malformed<sp>URL" , mue ) ; } }
|
org . junit . Assert . assertEquals ( 3 , request . getQueryStringParams ( ) . size ( ) )
|
testGetSqlExpressionRedshiftCase1 ( ) { java . lang . String sqlLang = "SQL" ; java . lang . String sqlBody = "SQL<sp>body" ; java . lang . String redshiftLang = SupportDBUrlType . REDSHIFT . getLanguage ( ) ; java . lang . String redshiftBody = "Amazon<sp>redshift<sp>body" ; java . lang . String postgresqlLang = SupportDBUrlType . POSTGRESQLEFAULTURL . getLanguage ( ) ; java . lang . String postgresqlBody = "PostgreSQL<sp>body" ; org . talend . dataquality . indicators . definition . IndicatorDefinition indicatorDefinition = DefinitionFactory . eINSTANCE . createIndicatorDefinition ( ) ; org . eclipse . emf . common . util . EList < org . talend . cwm . relational . TdExpression > sqlGenericExpression = new org . eclipse . emf . common . util . BasicEList < org . talend . cwm . relational . TdExpression > ( ) ; org . talend . cwm . relational . TdExpression tdExpression1 = RelationalFactory . eINSTANCE . createTdExpression ( ) ; tdExpression1 . setLanguage ( sqlLang ) ; tdExpression1 . setBody ( sqlBody ) ; sqlGenericExpression . add ( tdExpression1 ) ; org . talend . cwm . relational . TdExpression tdExpression3 = RelationalFactory . eINSTANCE . createTdExpression ( ) ; tdExpression3 . setLanguage ( postgresqlLang ) ; tdExpression3 . setBody ( postgresqlBody ) ; sqlGenericExpression . add ( tdExpression3 ) ; org . talend . cwm . relational . TdExpression tdExpression4 = RelationalFactory . eINSTANCE . createTdExpression ( ) ; tdExpression4 . setLanguage ( redshiftLang ) ; tdExpression4 . setBody ( redshiftBody ) ; sqlGenericExpression . add ( tdExpression4 ) ; org . talend . utils . ProductVersion dbVersion = new org . talend . utils . ProductVersion ( 1 , 0 ) ; org . talend . dq . dbms . DbmsLanguage dbms = new org . talend . dq . dbms . DbmsLanguage ( sqlLang , dbVersion ) ; org . talend . cwm . relational . TdExpression sqlExpression = dbms . getSqlExpression ( indicatorDefinition , redshiftLang , sqlGenericExpression , dbVersion ) ; "<AssertPlaceHolder>" ; } getSqlExpression ( org . talend . dataquality . indicators . definition . IndicatorDefinition , java . lang . String , org . eclipse . emf . common . util . EList , org . talend . utils . ProductVersion ) { org . talend . cwm . relational . TdExpression defaultExpression = null ; if ( ( sqlGenericExpression == null ) || ( ( sqlGenericExpression . size ( ) ) == 0 ) ) { return defaultExpression ; } java . util . List < org . talend . cwm . relational . TdExpression > tempExpressions = new java . util . ArrayList < org . talend . cwm . relational . TdExpression > ( ) ; boolean matchingFlag = false ; for ( org . talend . cwm . relational . TdExpression sqlGenExpr : sqlGenericExpression ) { if ( org . talend . dq . dbms . DbmsLanguageFactory . equalsDbmsLanguage ( language , sqlGenExpr . getLanguage ( ) ) ) { tempExpressions . add ( sqlGenExpr ) ; matchingFlag = true ; } } if ( ! matchingFlag ) { for ( org . talend . cwm . relational . TdExpression sqlGenExpr : sqlGenericExpression ) { if ( org . talend . dq . dbms . DbmsLanguageFactory . compareDbmsLanguage ( language , sqlGenExpr . getLanguage ( ) ) ) { tempExpressions . add ( sqlGenExpr ) ; } } } java . util . List < org . talend . cwm . relational . TdExpression > tempExpressions2 = new java . util . ArrayList < org . talend . cwm . relational . TdExpression > ( ) ; for ( org . talend . cwm . relational . TdExpression exp : tempExpressions ) { if ( ( ( exp . getVersion ( ) ) == null ) || ( PluginConstant . EMPTY_STRING . equals ( exp . getVersion ( ) ) ) ) { defaultExpression = exp ; } else { if ( dbVersion . toString ( ) . equals ( exp . getVersion ( ) ) ) { return exp ; } else { tempExpressions2 . add ( exp ) ; } } } org . talend . cwm . relational . TdExpression findByVersion = findTdExpressionByVersion ( dbVersion , tempExpressions2 ) ; if ( findByVersion != null ) { return findByVersion ; } if ( defaultExpression != null ) { return defaultExpression ; } if ( org . talend . dq . dbms . DbmsLanguageFactory . compareDbmsLanguage ( language , SupportDBUrlType . REDSHIFT . getLanguage ( ) ) ) { return getSqlExpression ( indicatorDefinition , SupportDBUrlType . POSTGRESQLEFAULTURL . getLanguage ( ) , sqlGenericExpression , dbVersion ) ; } java . lang . String defaultLanguage = org . talend . dq . dbms . DbmsLanguage . getDefaultLanguage ( ) ; if ( language . equals ( defaultLanguage ) ) { return null ; } if ( org . talend . dq . dbms . DbmsLanguage . log . isDebugEnabled ( ) ) { org . talend . dq . dbms . DbmsLanguage . log . warn ( ( ( ( ( ( "The<sp>indicator<sp>SQL<sp>expression<sp>has<sp>not<sp>been<sp>found<sp>for<sp>the<sp>database<sp>type<sp>" + language ) + "<sp>for<sp>the<sp>indicator" ) + ( indicatorDefinition . getName ( ) ) ) + ".<sp>This<sp>is<sp>not<sp>necessarily<sp>a<sp>problem<sp>since<sp>the<sp>default<sp>SQL<sp>expression<sp>will<sp>be<sp>used.<sp>" ) + "Nevertheless,<sp>if<sp>an<sp>SQL<sp>error<sp>during<sp>the<sp>analysis,<sp>this<sp>could<sp>be<sp>the<sp>cause." ) ) ; org . talend . dq . dbms . DbmsLanguage . log . info ( ( "Trying<sp>to<sp>compute<sp>the<sp>indicator<sp>with<sp>the<sp>default<sp>language<sp>" + defaultLanguage ) ) ; } return getSqlExpression ( indicatorDefinition , defaultLanguage , sqlGenericExpression , dbVersion ) ; }
|
org . junit . Assert . assertEquals ( tdExpression4 , sqlExpression )
|
testVerzamelAfleidingsregels ( ) { nl . bzk . brp . model . bericht . kern . PersoonSamengesteldeNaamGroepBericht samengesteldeNaam = creeerSamengesteldeNaam ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . GeslachtsnaamstamAttribuut ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . SamengesteldeNaamGroepVerwerkerTest . GESLACHTSNAAM ) ) ; persoonBericht . setSamengesteldeNaam ( samengesteldeNaam ) ; nl . bzk . brp . model . operationeel . kern . ActieModel actie = creeerActie ( ) ; nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . SamengesteldeNaamGroepVerwerker verwerker = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . samengesteldenaam . SamengesteldeNaamGroepVerwerker ( persoonBericht , persoonHisVolledigImpl , actie ) ; verwerker . verrijkBericht ( ) ; verwerker . neemBerichtDataOverInModel ( ) ; verwerker . verzamelAfleidingsregels ( ) ; "<AssertPlaceHolder>" ; } getAfleidingsregels ( ) { return this . afleidingsregels ; }
|
org . junit . Assert . assertEquals ( 1 , verwerker . getAfleidingsregels ( ) . size ( ) )
|
getHandlerIsCaseSensitive ( ) { org . w3c . dom . Element el = org . apache . shindig . common . xml . XmlUtil . parseSilent ( "<tag<sp>xmlns='#test'/>" ) ; "<AssertPlaceHolder>" ; } getHandlerFor ( org . apache . shindig . gadgets . templates . tags . NSName ) { org . apache . shindig . gadgets . templates . tags . TagHandler handler = null ; for ( org . apache . shindig . gadgets . templates . TagRegistry registry : registries ) { handler = registry . getHandlerFor ( name ) ; if ( handler != null ) { return handler ; } } return null ; }
|
org . junit . Assert . assertNull ( registry . getHandlerFor ( el ) )
|
testDeleteThing ( ) { org . jboss . resteasy . test . rx . resource . Thing t = org . jboss . resteasy . test . rx . rxjava2 . Rx2SingleProxyServerAsyncTest . proxy . deleteThing ( ) ; "<AssertPlaceHolder>" ; } deleteThing ( ) { return org . jboss . resteasy . test . rx . rxjava2 . resource . Rx2ObservableResourceNoStreamImpl . buildObservableThing ( "x" , 3 ) ; }
|
org . junit . Assert . assertEquals ( new org . jboss . resteasy . test . rx . resource . Thing ( "x" ) , t )
|
shouldFailConnectionWhenResponseHeaderConnectionMissing ( ) { final org . apache . mina . core . service . IoHandler handler = context . mock ( org . apache . mina . core . service . IoHandler . class ) ; context . checking ( new org . kaazing . gateway . transport . test . Expectations ( ) { { never ( handler ) . sessionCreated ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; never ( handler ) . sessionOpened ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; never ( handler ) . exceptionCaught ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) , with ( any ( java . lang . Throwable . class ) ) ) ; never ( handler ) . sessionClosed ( with ( any ( org . kaazing . mina . core . session . IoSessionEx . class ) ) ) ; } } ) ; org . apache . mina . core . future . ConnectFuture connectFuture = connector . connect ( "ws://localhost:8080/path?query" , null , handler ) ; connectFuture . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; k3po . finish ( ) ; } isConnected ( ) { return channel . isConnected ( ) ; }
|
org . junit . Assert . assertFalse ( connectFuture . isConnected ( ) )
|
testWrapIfNeeded_AdempiereException ( ) { final org . adempiere . exceptions . AdempiereException expected = newAdempiereException ( ) ; final org . adempiere . exceptions . AdempiereException actual = org . adempiere . exceptions . AdempiereException . wrapIfNeeded ( expected ) ; "<AssertPlaceHolder>" ; } wrapIfNeeded ( java . lang . Throwable ) { if ( throwable == null ) { return null ; } final java . lang . Throwable cause = org . adempiere . exceptions . AdempiereException . extractCause ( throwable ) ; if ( cause instanceof org . adempiere . exceptions . AdempiereException ) { return ( ( org . adempiere . exceptions . AdempiereException ) ( cause ) ) ; } if ( cause instanceof java . sql . SQLException ) { return org . adempiere . exceptions . DBException . wrapIfNeeded ( cause ) ; } if ( cause != throwable ) { return org . adempiere . exceptions . AdempiereException . wrapIfNeeded ( cause ) ; } return new org . adempiere . exceptions . AdempiereException ( ( ( ( throwable . getClass ( ) . getSimpleName ( ) ) + ":<sp>" ) + ( org . adempiere . exceptions . AdempiereException . extractMessage ( cause ) ) ) , cause ) ; }
|
org . junit . Assert . assertSame ( expected , actual )
|
testFromEbXML21SourcePatientEmpty ( ) { org . openehealth . ipf . commons . ihe . xds . core . metadata . Identifiable result = org . openehealth . ipf . commons . ihe . xds . core . metadata . Hl7v2Based . parse ( "" , org . openehealth . ipf . commons . ihe . xds . core . metadata . Identifiable . class ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String , java . lang . Class ) { if ( org . apache . commons . lang3 . StringUtils . isEmpty ( hl7String ) ) { return null ; } try { C xdsModelObject = xdsModelClass . newInstance ( ) ; org . openehealth . ipf . commons . ihe . xds . core . metadata . Hl7v2Based . MESSAGE . getParser ( ) . parse ( xdsModelObject . getHapiObject ( ) , hl7String , XdsHl7v2Renderer . ENCODING_CHARACTERS ) ; return xdsModelObject . isEmpty ( ) ? null : xdsModelObject ; } catch ( java . lang . InstantiationException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . IllegalAccessException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { throw new java . lang . RuntimeException ( e ) ; } }
|
org . junit . Assert . assertNull ( result )
|
testFilter_accept ( ) { com . navercorp . pinpoint . collector . dao . hbase . filter . SpanEventFilter filter = new com . navercorp . pinpoint . collector . dao . hbase . filter . SequenceSpanEventFilter ( 100 ) ; final com . navercorp . pinpoint . common . server . bo . SpanEventBo spanEventBo = new com . navercorp . pinpoint . common . server . bo . SpanEventBo ( ) ; spanEventBo . setSequence ( ( ( short ) ( 11 ) ) ) ; "<AssertPlaceHolder>" ; } filter ( com . navercorp . pinpoint . common . server . bo . SpanEventBo ) { if ( spanEventBo == null ) { return REJECT ; } final int sequence = spanEventBo . getSequence ( ) ; if ( sequence > ( sequenceLimit ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "discard<sp>spanEvent:{}" , spanEventBo ) ; } return REJECT ; } return ACCEPT ; }
|
org . junit . Assert . assertEquals ( filter . filter ( spanEventBo ) , SpanEventFilter . ACCEPT )
|
testIsWarnEnabled ( ) { java . util . logging . Logger mock = createStrictMock ( java . util . logging . Logger . class ) ; expect ( mock . isLoggable ( Level . WARNING ) ) . andReturn ( true ) ; replay ( mock ) ; org . jboss . netty . logging . InternalLogger logger = new org . jboss . netty . logging . JdkLogger ( mock , "foo" ) ; "<AssertPlaceHolder>" ; verify ( mock ) ; } isWarnEnabled ( ) { return true ; }
|
org . junit . Assert . assertTrue ( logger . isWarnEnabled ( ) )
|
returnedMessageWithComponentTest ( ) { org . apache . hyracks . api . exceptions . HyracksDataException cause = org . apache . hyracks . api . exceptions . HyracksDataException . create ( ErrorCode . ERROR_PROCESSING_TUPLE , 3 ) ; org . apache . hyracks . api . exceptions . HyracksDataException causeWithNodeId = org . apache . hyracks . api . exceptions . HyracksDataException . create ( cause , "nc1" ) ; "<AssertPlaceHolder>" ; } getMessage ( ) { if ( ( msgCache ) == null ) { msgCache = new org . apache . hyracks . algebricks . common . exceptions . AlgebricksException . CachedMessage ( org . apache . hyracks . api . util . ErrorMessageUtil . formatMessage ( component , errorCode , super . getMessage ( ) , sourceLoc , params ) ) ; } return msgCache . message ; }
|
org . junit . Assert . assertEquals ( cause . getMessage ( ) , causeWithNodeId . getMessage ( ) )
|
testDoBuildNewNode ( ) { when ( context . getIndex ( ) . getNode ( org . kie . workbench . common . stunner . bpmn . backend . service . marshaller . json . builder . NodeBuilderImplTest . NODE_ID ) ) . thenReturn ( null ) ; when ( context . getOryxManager ( ) ) . thenReturn ( oryxManager ) ; when ( context . getOryxManager ( ) . getMappingsManager ( ) ) . thenReturn ( oryxIdMappings ) ; when ( context . getOryxManager ( ) . getMappingsManager ( ) . getDefinitionId ( any ( java . lang . Class . class ) ) ) . thenReturn ( org . kie . workbench . common . stunner . bpmn . backend . service . marshaller . json . builder . NodeBuilderImplTest . DEFINITION_ID ) ; when ( factoryManager . newElement ( null , org . kie . workbench . common . stunner . bpmn . backend . service . marshaller . json . builder . NodeBuilderImplTest . DEFINITION_ID ) ) . thenReturn ( node ) ; when ( node . getContent ( ) ) . thenReturn ( view ) ; when ( view . getDefinition ( ) ) . thenReturn ( definition ) ; when ( context . getDefinitionManager ( ) ) . thenReturn ( definitionManager ) ; when ( context . getDefinitionManager ( ) . adapters ( ) ) . thenReturn ( adapters ) ; when ( context . getDefinitionManager ( ) . adapters ( ) . forDefinition ( ) ) . thenReturn ( forDefinition ) ; when ( context . getDefinitionManager ( ) . adapters ( ) . forDefinition ( ) . getProperties ( definition ) ) . thenReturn ( set ) ; when ( context . execute ( any ( ) ) ) . thenReturn ( res ) ; when ( context . getCommandFactory ( ) ) . thenReturn ( graphCommandFactory ) ; org . kie . workbench . common . stunner . core . graph . Element node1 = nodeBuilder . build ( context ) ; "<AssertPlaceHolder>" ; } build ( java . lang . String ) { return new org . kie . workbench . common . stunner . bpmn . backend . workitem . service . WorkItemDefinitionRemoteRequest ( uri , new java . lang . String [ 0 ] ) ; }
|
org . junit . Assert . assertEquals ( node1 , node )
|
testAddGet ( ) { net . tomp2p . dht . PeerDHT master = null ; try { net . tomp2p . dht . PeerDHT [ ] peers = net . tomp2p . dht . UtilsDHT2 . createNodes ( 200 , net . tomp2p . dht . TestDHT . rnd , 4001 ) ; master = peers [ 0 ] ; net . tomp2p . dht . UtilsDHT2 . perfectRouting ( peers ) ; net . tomp2p . peers . Number160 nr = new net . tomp2p . peers . Number160 ( net . tomp2p . dht . TestDHT . rnd ) ; java . lang . String toStore1 = "hallo1" ; java . lang . String toStore2 = "hallo2" ; net . tomp2p . storage . Data data1 = new net . tomp2p . storage . Data ( toStore1 . getBytes ( ) ) ; net . tomp2p . storage . Data data2 = new net . tomp2p . storage . Data ( toStore2 . getBytes ( ) ) ; net . tomp2p . dht . FuturePut fput = peers [ 30 ] . add ( nr ) . data ( data1 ) . start ( ) ; fput . awaitUninterruptibly ( ) ; System . out . println ( ( ( ( ( "added:<sp>" + toStore1 ) + "<sp>(" ) + ( fput . isSuccess ( ) ) ) + ")" ) ) ; fput = peers [ 50 ] . add ( nr ) . data ( data2 ) . start ( ) ; fput . awaitUninterruptibly ( ) ; System . out . println ( ( ( ( ( "added:<sp>" + toStore2 ) + "<sp>(" ) + ( fput . isSuccess ( ) ) ) + ")" ) ) ; net . tomp2p . dht . FutureGet fget = peers [ 77 ] . get ( nr ) . all ( ) . start ( ) ; fget . awaitUninterruptibly ( ) ; "<AssertPlaceHolder>" ; } finally { if ( master != null ) { master . shutdown ( ) . await ( ) ; } } } isSuccess ( ) { if ( ! ( super . isSuccess ( ) ) ) { return false ; } return checkResults ( result ( ) , rawResult . size ( ) , dataSize ) ; }
|
org . junit . Assert . assertEquals ( true , fget . isSuccess ( ) )
|
allStatic ( ) { com . github . mauricioaniche . ck . CKClassResult a = com . github . mauricioaniche . ck . metric . FieldsTest . report . get ( "fields.Fields" ) ; "<AssertPlaceHolder>" ; } getNumberOfStaticFields ( ) { return numberOfStaticFields ; }
|
org . junit . Assert . assertEquals ( 2 , a . getNumberOfStaticFields ( ) )
|
testDropSchema ( ) { com . rayo . storage . cassandra . CassandraSchemaHandler schemaHandler = new com . rayo . storage . cassandra . CassandraSchemaHandler ( ) ; org . scale7 . cassandra . pelops . Cluster cluster = new org . scale7 . cassandra . pelops . Cluster ( "localhost" , java . lang . Integer . parseInt ( CassandraDatastoreTest . CASSANDRA_TESTING_PORT ) , false ) ; org . scale7 . cassandra . pelops . KeyspaceManager keyspaceManager = org . scale7 . cassandra . pelops . Pelops . createKeyspaceManager ( cluster ) ; schemaHandler . buildSchema ( cluster , "rayo" ) ; schemaHandler . dropSchema ( "rayo" , keyspaceManager ) ; "<AssertPlaceHolder>" ; } schemaExists ( org . scale7 . cassandra . pelops . Cluster , java . lang . String ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . debug ( "Searching<sp>schema<sp>%s<sp>on<sp>cluster<sp>%s" , schemaName , cluster ) ; org . scale7 . cassandra . pelops . KeyspaceManager keyspaceManager = org . scale7 . cassandra . pelops . Pelops . createKeyspaceManager ( cluster ) ; try { org . apache . cassandra . thrift . KsDef ksDef = keyspaceManager . getKeyspaceSchema ( schemaName ) ; if ( ksDef != null ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . debug ( "Found<sp>schema<sp>%s" , schemaName ) ; return true ; } } catch ( org . apache . thrift . transport . TTransportException te ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . error ( "It<sp>looks<sp>like<sp>the<sp>Cassandra<sp>Server<sp>is<sp>down" ) ; com . rayo . storage . cassandra . CassandraSchemaHandler . log . error ( te . getMessage ( ) , te ) ; throw te ; } catch ( org . scale7 . cassandra . pelops . exceptions . NotFoundException nfe ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . debug ( "Schema<sp>%s<sp>does<sp>not<sp>exist" , schemaName ) ; } catch ( com . rayo . storage . cassandra . org . apache . cassandra nfe2 ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . debug ( "Schema<sp>%s<sp>does<sp>not<sp>exist" , schemaName ) ; } catch ( java . lang . Exception e ) { com . rayo . storage . cassandra . CassandraSchemaHandler . log . error ( ( "There<sp>has<sp>been<sp>an<sp>error:<sp>" + ( e . getMessage ( ) ) ) ) ; } return false ; }
|
org . junit . Assert . assertFalse ( schemaHandler . schemaExists ( cluster , "rayo" ) )
|
marshalAndUnmarshal ( ) { java . math . BigDecimal givenValue = new java . math . BigDecimal ( "20.34" ) ; java . lang . String valueAsStr = adapter . marshal ( givenValue ) ; java . math . BigDecimal convertedValue = adapter . unmarshal ( valueAsStr ) ; "<AssertPlaceHolder>" ; } unmarshal ( java . lang . String ) { return org . oscm . billingservice . business . org . oscm . billingservice . business . BigDecimalJaxbCustomBinder . parseBigDecimal ( value ) ; }
|
org . junit . Assert . assertThat ( givenValue , org . hamcrest . CoreMatchers . is ( convertedValue ) )
|
logRollbackAndRetrieve ( ) { org . mule . runtime . core . internal . util . journal . queue . LocalTxQueueTransactionJournal transactionJournal = new org . mule . runtime . core . internal . util . journal . queue . LocalTxQueueTransactionJournal ( temporaryFolder . getRoot ( ) . getAbsolutePath ( ) , muleContext ) ; transactionJournal . logRollback ( org . mule . runtime . core . internal . util . journal . queue . LocalTxQueueTransactionJournalTestCase . TX_ID ) ; transactionJournal . close ( ) ; transactionJournal = new org . mule . runtime . core . internal . util . journal . queue . LocalTxQueueTransactionJournal ( temporaryFolder . getRoot ( ) . getAbsolutePath ( ) , muleContext ) ; com . google . common . collect . Multimap < java . lang . Integer , org . mule . runtime . core . internal . util . journal . queue . LocalQueueTxJournalEntry > allEntries = transactionJournal . getAllLogEntries ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; }
|
org . junit . Assert . assertThat ( allEntries . size ( ) , org . hamcrest . core . Is . is ( 0 ) )
|
entitySuccess_AutoGen ( ) { in . cubestack . android . lib . storm . core . TableInformation info = dataReader . readAnnotations ( in . cubestack . android . lib . storm . core . MetaReaderTest . EntityPrimaryKey . class , new in . cubestack . android . lib . storm . core . AliasGenerator ( ) ) ; "<AssertPlaceHolder>" ; } readAnnotations ( java . lang . Class , in . cubestack . android . lib . storm . core . AliasGenerator ) { runValidations ( annotation ) ; in . cubestack . android . lib . storm . annotation . Table table = ( ( in . cubestack . android . lib . storm . annotation . Table ) ( annotation . getAnnotation ( in . cubestack . android . lib . storm . annotation . Table . class ) ) ) ; java . lang . String tableStrName = table . name ( ) ; tableInformation . setMappedClass ( annotation ) ; tableInformation . setTableName ( tableStrName ) ; tableInformation . setTableVersion ( table . version ( ) ) ; tableInformation . setAlias ( aliasGenerator . generateAlias ( annotation ) ) ; if ( annotation . isAnnotationPresent ( in . cubestack . android . lib . storm . annotation . LifeCycle . class ) ) { java . lang . Class < ? > handlerClass = annotation . getAnnotation ( in . cubestack . android . lib . storm . annotation . LifeCycle . class ) . handler ( ) ; java . lang . Object handler = handlerClass . newInstance ( ) ; tableInformation . setHandler ( ( ( in . cubestack . android . lib . storm . lifecycle . LifeCycleHandler < ? > ) ( handler ) ) ) ; } readTableFields ( annotation , aliasGenerator ) ; generateCreate ( ) ; return tableInformation ; }
|
org . junit . Assert . assertNotNull ( info )
|
testMaxWidthPerNodeConfig ( ) { org . apache . drill . test . ClusterFixtureBuilder builder = org . apache . drill . test . ClusterFixture . bareBuilder ( dirTestWatcher ) . setOptionDefault ( ExecConstants . MAX_WIDTH_PER_NODE_KEY , 2 ) ; try ( org . apache . drill . test . ClusterFixture cluster = builder . build ( ) ; org . apache . drill . test . ClientFixture client = cluster . clientFixture ( ) ) { java . lang . String maxWidth = client . queryBuilder ( ) . sql ( "SELECT<sp>val<sp>FROM<sp>sys.%s<sp>where<sp>name='planner.width.max_per_node'<sp>and<sp>optionScope<sp>=<sp>'BOOT'" , SystemTable . OPTIONS . getTableName ( ) ) . singletonString ( ) ; "<AssertPlaceHolder>" ; } } singletonString ( ) { org . apache . drill . test . rowSet . RowSet rowSet = rowSet ( ) ; if ( rowSet == null ) { throw new java . lang . IllegalStateException ( "No<sp>rows<sp>returned" ) ; } org . apache . drill . test . rowSet . RowSetReader reader = rowSet . reader ( ) ; reader . next ( ) ; java . lang . String value ; if ( reader . scalar ( 0 ) . isNull ( ) ) { value = null ; } else { value = reader . scalar ( 0 ) . getString ( ) ; } rowSet . clear ( ) ; return value ; }
|
org . junit . Assert . assertEquals ( "2" , maxWidth )
|
testEmptyReport ( ) { org . apache . hadoop . hdfs . protocol . BlockListAsLongs blocks = checkReport ( ) ; "<AssertPlaceHolder>" ; } getBlockListAsLongs ( ) { return org . apache . hadoop . hdfs . protocol . BlockListAsLongs . EMPTY_LONGS ; }
|
org . junit . Assert . assertArrayEquals ( new long [ ] { 0 , 0 , - 1 , - 1 , - 1 } , blocks . getBlockListAsLongs ( ) )
|
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . vizualizers . ResponseTimesDistributionGui instance = new kg . apc . jmeter . vizualizers . ResponseTimesDistributionGui ( ) ; java . lang . String result = instance . getStaticLabel ( ) ; "<AssertPlaceHolder>" ; } getStaticLabel ( ) { return kg . apc . jmeter . JMeterPluginsUtils . prefixLabel ( "Response<sp>Codes<sp>per<sp>Second" ) ; }
|
org . junit . Assert . assertTrue ( ( ( result . length ( ) ) > 0 ) )
|
decimalPointParsingTest ( ) { com . itextpdf . svg . renderers . impl . PathSvgNodeRenderer path = new com . itextpdf . svg . renderers . impl . PathSvgNodeRenderer ( ) ; java . lang . String input = "2.35.96" ; java . lang . String expected = "2.35<sp>.96" ; java . lang . String actual = path . separateDecimalPoints ( input ) ; "<AssertPlaceHolder>" ; } separateDecimalPoints ( java . lang . String ) { java . lang . StringBuilder res = new java . lang . StringBuilder ( ) ; boolean decimalPointEncountered = false ; for ( int i = 0 ; i < ( input . length ( ) ) ; i ++ ) { char c = input . charAt ( i ) ; if ( decimalPointEncountered && ( ( c == '-' ) || ( java . lang . Character . isWhitespace ( c ) ) ) ) { decimalPointEncountered = false ; } if ( c == '.' ) { if ( decimalPointEncountered ) { res . append ( "<sp>" ) ; } else { decimalPointEncountered = true ; } } else if ( c == '-' ) { res . append ( "<sp>" ) ; } res . append ( c ) ; } return res . toString ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testParser ( ) { java . lang . String response = "{\"ok\":<sp>true}" ; "<AssertPlaceHolder>" ; } getResponseParser ( ) { return new com . urbanairship . api . client . ResponseParser < com . urbanairship . api . reports . model . ResponseReport > ( ) { @ com . urbanairship . api . reports . Override public com . urbanairship . api . reports . model . ResponseReport parse ( java . lang . String response ) throws java . io . IOException { return com . urbanairship . api . reports . parse . ReportsObjectMapper . getInstance ( ) . readValue ( response , com . urbanairship . api . reports . model . ResponseReport . class ) ; } } ; }
|
org . junit . Assert . assertEquals ( response , request . getResponseParser ( ) . parse ( response ) )
|
testPutValue ( ) { subject . put ( org . eclipse . smarthome . core . cache . ExpiringCacheMapTest . FIRST_TEST_KEY , org . eclipse . smarthome . core . cache . ExpiringCacheMapTest . CACHE_ACTION ) ; subject . putValue ( org . eclipse . smarthome . core . cache . ExpiringCacheMapTest . FIRST_TEST_KEY , "test" ) ; java . lang . String value = subject . get ( org . eclipse . smarthome . core . cache . ExpiringCacheMapTest . FIRST_TEST_KEY ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return get ( typeUID , null ) ; }
|
org . junit . Assert . assertEquals ( "test" , value )
|
testFunction ( ) { org . apache . commons . jexl2 . parser . JexlNode queryA = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( "(FOO<sp>==<sp>'blah1'<sp>&&<sp>FOO<sp>==<sp>'blah2'<sp>&&<sp>content:phrase(termOffsetMap,<sp>'twisted',<sp>'pair'))" ) ; org . apache . commons . jexl2 . parser . JexlNode queryB = datawave . query . jexl . JexlASTHelper . parseJexlQuery ( "(content:phrase(termOffsetMap,<sp>'twisted',<sp>'pair')<sp>&&<sp>FOO<sp>==<sp>'blah1'<sp>&&<sp>FOO<sp>==<sp>'blah2')" ) ; "<AssertPlaceHolder>" ; } getNodeHash ( org . apache . commons . jexl2 . parser . JexlNode ) { datawave . query . jexl . visitors . TreeHashVisitor vis = new datawave . query . jexl . visitors . TreeHashVisitor ( ) ; datawave . query . jexl . nodes . TreeHashNode inte = new datawave . query . jexl . nodes . TreeHashNode ( ) ; root . jjtAccept ( vis , inte ) ; return inte ; }
|
org . junit . Assert . assertEquals ( datawave . query . jexl . visitors . TreeHashVisitor . getNodeHash ( queryA ) , datawave . query . jexl . visitors . TreeHashVisitor . getNodeHash ( queryB ) )
|
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . person . language . PersonLanguage context = new org . lnu . is . domain . person . language . PersonLanguage ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonLanguage<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . language . PersonLanguage > 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 ( expectedQuery , actualQuery )
|
testGetReadPreferenceFromClient ( ) { final com . allanbank . mongodb . ReadPreference defaultReadPreference = com . allanbank . mongodb . ReadPreference . preferSecondary ( ) ; expect ( myMockClient . getDefaultReadPreference ( ) ) . andReturn ( defaultReadPreference ) ; replay ( ) ; final com . allanbank . mongodb . ReadPreference result = myTestInstance . getReadPreference ( ) ; "<AssertPlaceHolder>" ; verify ( ) ; } getReadPreference ( ) { com . allanbank . mongodb . ReadPreference result = myReadPreference ; if ( result == null ) { result = myDatabase . getReadPreference ( ) ; } return result ; }
|
org . junit . Assert . assertSame ( defaultReadPreference , result )
|
testOk ( ) { final nl . moderniseringgba . isc . esb . message . sync . impl . BlokkeringAntwoordBericht antwoord = new nl . moderniseringgba . isc . esb . message . sync . impl . BlokkeringAntwoordBericht ( ) ; antwoord . setStatus ( StatusType . OK ) ; final java . util . Map < java . lang . String , java . lang . Object > parameters = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; parameters . put ( "blokkeringAntwoordBericht" , antwoord ) ; "<AssertPlaceHolder>" ; } execute ( java . util . Map ) { nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "execute(parameters={})" , parameters ) ; final java . lang . Long berichtId = ( ( java . lang . Long ) ( parameters . get ( "input" ) ) ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht input = ( ( nl . bzk . migratiebrp . bericht . model . lo3 . Lo3Bericht ) ( berichtenDao . leesBericht ( berichtId ) ) ) ; final nl . bzk . migratiebrp . bericht . model . sync . SyncBericht verzoek = maakZoekPersoonVerzoekBericht ( input ) ; final java . lang . Long verzoekId = berichtenDao . bewaarBericht ( verzoek ) ; final java . util . Map < java . lang . String , java . lang . Object > result = new java . util . HashMap ( ) ; result . put ( "zoekPersoonVerzoek" , verzoekId ) ; nl . bzk . migratiebrp . isc . jbpm . uc1003 . MaakZoekPersoonBerichtAction . LOG . debug ( "result:<sp>{}" , result ) ; return result ; }
|
org . junit . Assert . assertEquals ( null , subject . execute ( parameters ) )
|
testNewPDBAtom_IElement ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder builder = org . openscience . cdk . AbstractChemObjectBuilderTest . rootObject . getBuilder ( ) ; org . openscience . cdk . interfaces . IPDBAtom atom = builder . newInstance ( org . openscience . cdk . interfaces . IPDBAtom . class , builder . newInstance ( org . openscience . cdk . interfaces . IElement . class ) ) ; "<AssertPlaceHolder>" ; } newInstance ( java . lang . Class , java . lang . Object [ ] ) { return factory . ofClass ( clazz , params ) ; }
|
org . junit . Assert . assertNotNull ( atom )
|
testGetProperties ( ) { java . util . Set < java . lang . String > properties = new java . util . HashSet ( ) ; org . apache . ambari . server . api . query . QueryInfo info = new org . apache . ambari . server . api . query . QueryInfo ( new org . apache . ambari . server . api . resources . ClusterResourceDefinition ( ) , properties ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
|
org . junit . Assert . assertEquals ( properties , info . getProperties ( ) )
|
testColor ( ) { net . kyori . text . Component component = TextParsers . XML_PARSER . parse ( "<color<sp>color=\"gray\">foo</color>" ) ; net . kyori . text . TextComponent expected = net . kyori . text . TextComponent . of ( "" ) . append ( net . kyori . text . TextComponent . of ( "foo" ) . color ( TextColor . GRAY ) ) ; "<AssertPlaceHolder>" ; } color ( org . bukkit . Color ) { this . color = color ; return this ; }
|
org . junit . Assert . assertEquals ( expected , component )
|
subSupSpaceUnicode ( ) { java . lang . String input = "R<sub>1<sp></sub>" ; java . lang . String expect = "R₁<sp>" ; java . lang . String actual = format . getSimpleHtml ( input ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expect , actual )
|
testAddVisibleHandlerOnVisiblePresenter ( com . gwtplatform . mvp . client . PresenterWidgetTest$PresenterWidgetD ) { "<AssertPlaceHolder>" ; presenterWidgetD . internalReveal ( ) ; presenterWidgetD . addVisibleHandler ( typeA , handlerA ) ; verify ( eventBusA ) . addHandler ( typeA , handlerA ) ; presenterWidgetD . internalHide ( ) ; verify ( registrationA ) . removeHandler ( ) ; } isVisible ( ) { return visible ; }
|
org . junit . Assert . assertFalse ( presenterWidgetD . isVisible ( ) )
|
badFlowOngeldigeLa01ZonderPf03 ( ) { startProcess ( maakUc811Bericht ( "0599" , 1231231234L ) ) ; controleerBerichten ( 0 , 1 , 0 ) ; final nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht lq01Bericht = getBericht ( nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht . class ) ; lq01Bericht . setANummer ( "9876543210" ) ; signalVospg ( maakLa01Bericht ( lq01Bericht , true ) ) ; signalHumanTask ( "restartAtVragen" ) ; controleerBerichten ( 0 , 1 , 0 ) ; getBericht ( nl . bzk . migratiebrp . bericht . model . lo3 . impl . Lq01Bericht . class ) ; signalVospg ( maakLa01Bericht ( lq01Bericht , true ) ) ; signalHumanTask ( "endWithoutPf03" ) ; controleerBerichten ( 0 , 0 , 0 ) ; "<AssertPlaceHolder>" ; } processEnded ( ) { final org . jbpm . JbpmContext jbpmContext = org . jbpm . JbpmConfiguration . getInstance ( ) . createJbpmContext ( ) ; try { final org . jbpm . graph . exe . ProcessInstance processInstance = jbpmContext . loadProcessInstance ( processInstanceId ) ; return processInstance . hasEnded ( ) ; } finally { jbpmContext . close ( ) ; } }
|
org . junit . Assert . assertTrue ( processEnded ( ) )
|
testReadingHTDFromFS ( ) { final java . lang . String name = "testReadingHTDFromFS" ; org . apache . hadoop . fs . FileSystem fs = org . apache . hadoop . fs . FileSystem . get ( org . apache . hadoop . hbase . util . TestFSTableDescriptors . UTIL . getConfiguration ( ) ) ; org . apache . hadoop . hbase . util . HTableDescriptor htd = new org . apache . hadoop . hbase . util . HTableDescriptor ( name ) ; org . apache . hadoop . fs . Path rootdir = org . apache . hadoop . hbase . util . TestFSTableDescriptors . UTIL . getDataTestDir ( name ) ; createHTDInFS ( fs , rootdir , htd ) ; org . apache . hadoop . hbase . util . HTableDescriptor htd2 = org . apache . hadoop . hbase . util . FSTableDescriptors . getTableDescriptor ( fs , rootdir , htd . getNameAsString ( ) ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( other instanceof org . apache . hadoop . hbase . KeyValue ) ) { return false ; } org . apache . hadoop . hbase . KeyValue kv = ( ( org . apache . hadoop . hbase . KeyValue ) ( other ) ) ; return org . apache . hadoop . hbase . util . Bytes . equals ( getBuffer ( ) , getKeyOffset ( ) , getKeyLength ( ) , kv . getBuffer ( ) , kv . getKeyOffset ( ) , kv . getKeyLength ( ) ) ; }
|
org . junit . Assert . assertTrue ( htd . equals ( htd2 ) )
|
percent_encoding_should_round_trip ( ) { byte [ ] q = new byte [ 90 ] ; byte [ ] b = new byte [ 90 ] ; for ( int i = 0 ; i < ( b . length ) ; i ++ ) { q [ i ] = ( ( byte ) ( i ) ) ; b [ i ] = ( ( byte ) ( 'A' ) ) ; } au . edu . wehi . idsv . VariantContextDirectedEvidence e = ( ( au . edu . wehi . idsv . VariantContextDirectedEvidence ) ( minimalBreakend ( ) . breakend ( new au . edu . wehi . idsv . BreakendSummary ( 0 , FWD , 1 ) , b , q ) . make ( ) ) ) ; e = ( ( au . edu . wehi . idsv . VariantContextDirectedEvidence ) ( au . edu . wehi . idsv . IdsvVariantContext . create ( getContext ( ) , null , e ) ) ) ; "<AssertPlaceHolder>" ; } getBreakendQuality ( ) { return null ; }
|
org . junit . Assert . assertArrayEquals ( q , e . getBreakendQuality ( ) )
|
testWithArbitraryGranularity ( ) { java . io . File tmpDir = temporaryFolder . newFolder ( ) ; java . io . File tmpFile = java . io . File . createTempFile ( "druid" , "index" , tmpDir ) ; try ( java . io . BufferedWriter writer = com . google . common . io . Files . newWriter ( tmpFile , StandardCharsets . UTF_8 ) ) { writer . write ( "2014-01-01T00:00:10Z,a,1\n" ) ; writer . write ( "2014-01-01T01:00:20Z,b,1\n" ) ; writer . write ( "2014-01-01T02:00:30Z,c,1\n" ) ; } org . apache . druid . indexing . common . task . IndexTask indexTask = new org . apache . druid . indexing . common . task . IndexTask ( null , null , createIngestionSpec ( tmpDir , null , new org . apache . druid . segment . indexing . granularity . ArbitraryGranularitySpec ( org . apache . druid . java . util . common . granularity . Granularities . MINUTE , java . util . Collections . singletonList ( org . apache . druid . java . util . common . Intervals . of ( "2014-01-01/2014-01-02" ) ) ) , org . apache . druid . indexing . common . task . IndexTaskTest . createTuningConfigWithMaxRowsPerSegment ( 10 , true ) , false ) , null , org . apache . druid . server . security . AuthTestUtils . TEST_AUTHORIZER_MAPPER , null , rowIngestionMetersFactory ) ; final java . util . List < org . apache . druid . timeline . DataSegment > segments = runTask ( indexTask ) . rhs ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( size ) < 0 ) { size = 0 ; for ( int i = 0 ; i <= ( lastWordIndex ) ; i ++ ) { int w = words [ i ] ; if ( org . apache . druid . extendedset . intset . ConciseSet . isLiteral ( w ) ) { size += org . apache . druid . extendedset . intset . ConciseSet . getLiteralBitCount ( w ) ; } else { if ( org . apache . druid . extendedset . intset . ConciseSet . isZeroSequence ( w ) ) { if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) ++ ; } } else { size += org . apache . druid . extendedset . intset . ConciseSet . maxLiteralLengthMultiplication ( ( ( org . apache . druid . extendedset . intset . ConciseSet . getSequenceCount ( w ) ) + 1 ) ) ; if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) -- ; } } } } } return size ; }
|
org . junit . Assert . assertEquals ( 1 , segments . size ( ) )
|
collectionOid_withNoVersion ( ) { org . apache . isis . core . metamodel . adapter . oid . RootOid parentOid = org . apache . isis . core . metamodel . adapter . oid . RootOid . create ( org . apache . isis . core . metamodel . spec . ObjectSpecId . of ( "CUS" ) , "123" ) ; org . apache . isis . core . metamodel . adapter . oid . ParentedCollectionOid oid = new org . apache . isis . core . metamodel . adapter . oid . ParentedCollectionOid ( parentOid , "items" ) ; final java . lang . String enString = oid . enString ( ) ; final org . apache . isis . core . metamodel . adapter . oid . ParentedCollectionOid deString = org . apache . isis . core . metamodel . adapter . oid . ParentedCollectionOid . deString ( enString ) ; "<AssertPlaceHolder>" ; } is ( org . apache . isis . core . metamodel . spec . feature . Contributed ) { return new com . google . common . base . Predicate < T > ( ) { @ org . apache . isis . core . metamodel . specloader . specimpl . Override public boolean apply ( org . apache . isis . core . metamodel . spec . feature . ObjectMember input ) { return contributed . isIncluded ( ) ; } } ; }
|
org . junit . Assert . assertThat ( deString , org . hamcrest . CoreMatchers . is ( oid ) )
|
noGroupsResolved ( ) { org . springframework . restdocs . constraints . Constraint constraint = new org . springframework . restdocs . constraints . Constraint ( "Constraint" , java . util . Collections . < java . lang . String , java . lang . Object > emptyMap ( ) ) ; java . util . List < java . lang . Class < ? > > groups = resolver . getGroups ( constraint ) ; "<AssertPlaceHolder>" ; } getGroups ( org . springframework . restdocs . constraints . Constraint ) { return descriptionResolver . getGroups ( constraint ) ; }
|
org . junit . Assert . assertThat ( groups . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
testGetContentDigest ( ) { final java . lang . String checksum = checksumString ( org . fcrepo . kernel . modeshape . UrlBinaryTest . EXPECTED_CONTENT ) ; mockProxyProperty ( ) ; mockChecksumProperty ( checksum ) ; testObj . setExternalContent ( mimeType , singleton ( new java . net . URI ( checksum ) ) , null , org . fcrepo . kernel . modeshape . PROXY , "contents.txt" ) ; final java . net . URI digestUri = testObj . getContentDigest ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder b = new java . lang . StringBuilder ( ) ; b . append ( value ) ; if ( hasDatatypeUri ( ) ) { b . append ( org . fcrepo . kernel . modeshape . FedoraJcrConstants . FIELD_DELIMITER ) ; b . append ( datatypeUri ) ; } else if ( hasLang ( ) ) { b . append ( org . fcrepo . kernel . modeshape . FedoraJcrConstants . FIELD_DELIMITER ) ; } if ( hasLang ( ) ) { b . append ( org . fcrepo . kernel . modeshape . FedoraJcrConstants . FIELD_DELIMITER ) ; b . append ( lang ) ; } return b . toString ( ) ; }
|
org . junit . Assert . assertEquals ( checksum , digestUri . toString ( ) )
|
testExtractRemovedObjects ( ) { java . util . Set < org . opendaylight . yangtools . yang . binding . InstanceIdentifier < org . opendaylight . yangtools . yang . binding . DataObject > > iids = new java . util . HashSet ( ) ; org . powermock . api . mockito . PowerMockito . doReturn ( iids ) . when ( org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . class ) ; org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractRemoved ( any ( org . opendaylight . ovsdb . southbound . ovsdb . transact . DataChangeEvent . class ) , eq ( org . opendaylight . yangtools . yang . binding . DataObject . class ) ) ; java . util . Map < org . opendaylight . yangtools . yang . binding . InstanceIdentifier < org . opendaylight . yangtools . yang . binding . DataObject > , org . opendaylight . yangtools . yang . binding . DataObject > result = new java . util . HashMap ( ) ; org . powermock . api . mockito . PowerMockito . doReturn ( result ) . when ( org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . class ) ; org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractOriginal ( any ( org . opendaylight . ovsdb . southbound . ovsdb . transact . DataChangeEvent . class ) , eq ( org . opendaylight . yangtools . yang . binding . DataObject . class ) ) ; java . lang . Class < org . opendaylight . yangtools . yang . binding . DataObject > klazz = org . opendaylight . yangtools . yang . binding . DataObject . class ; org . opendaylight . ovsdb . southbound . ovsdb . transact . DataChangeEvent changes = mock ( org . opendaylight . ovsdb . southbound . ovsdb . transact . DataChangeEvent . class ) ; "<AssertPlaceHolder>" ; } extractRemovedObjects ( org . opendaylight . ovsdb . southbound . ovsdb . transact . DataChangeEvent , java . lang . Class ) { java . util . Set < org . opendaylight . yangtools . yang . binding . InstanceIdentifier < T > > iids = org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractRemoved ( changes , klazz ) ; return com . google . common . collect . Maps . filterKeys ( org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractOriginal ( changes , klazz ) , com . google . common . base . Predicates . in ( iids ) ) ; }
|
org . junit . Assert . assertEquals ( com . google . common . collect . Maps . filterKeys ( result , com . google . common . base . Predicates . in ( iids ) ) , org . opendaylight . ovsdb . southbound . ovsdb . transact . TransactUtils . extractRemovedObjects ( changes , klazz ) )
|
testInvalidHostName ( ) { com . streamsets . pipeline . stage . destination . datalake . DataLakeTarget target = new com . streamsets . pipeline . stage . destination . datalake . DataLakeTargetBuilder ( ) . accountFQDN ( "dummy:9000" ) . authTokenEndpoint ( "dummy:9500" ) . build ( ) ; com . streamsets . pipeline . sdk . TargetRunner targetRunner = new com . streamsets . pipeline . sdk . TargetRunner . Builder ( com . streamsets . pipeline . stage . destination . datalake . DataLakeDTarget . class , target ) . build ( ) ; java . util . List < com . streamsets . pipeline . api . Stage . ConfigIssue > issues = targetRunner . runValidateConfigs ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return delegate . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , issues . size ( ) )
|
test_adjust2 ( ) { org . threeten . extra . chrono . CopticDate base = org . threeten . extra . chrono . CopticDate . of ( 1728 , 13 , 2 ) ; org . threeten . extra . chrono . CopticDate test = base . with ( java . time . temporal . TemporalAdjusters . lastDayOfMonth ( ) ) ; "<AssertPlaceHolder>" ; } of ( int , int , int ) { return org . threeten . extra . chrono . CopticDate . create ( prolepticYear , month , dayOfMonth ) ; }
|
org . junit . Assert . assertEquals ( org . threeten . extra . chrono . CopticDate . of ( 1728 , 13 , 5 ) , test )
|
testGeenLandAanvang ( ) { final nl . bzk . brp . model . bericht . kern . HuwelijkGeregistreerdPartnerschapBericht relatieBericht = maakRelatie ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_1 , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_2 , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . NEDERLAND ) ; relatieBericht . getStandaard ( ) . setLandGebiedAanvang ( null ) ; final java . util . Map < java . lang . String , nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView > bestaandeBetrokkenen = maakBestaandeBetrokkenen ( nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_1 , nl . bzk . brp . bijhouding . business . regels . impl . bijhouding . huwelijkgeregistreerdpartnerschap . acties . registratieaanvanghuwelijkpartnerschap . BRBY0409Test . BSN_PERSOON_2 , true , true , true , true ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > resultaat = brby0409 . voerRegelUit ( null , relatieBericht , null , bestaandeBetrokkenen ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , resultaat . size ( ) )
|
test11 ( ) { System . out . println ( "test11" ) ; "<AssertPlaceHolder>" ; } println ( java . lang . String ) { org . ops4j . pax . exam . forked . provision . Info . println ( null , message ) ; }
|
org . junit . Assert . assertEquals ( 2 , 2 )
|
testCleaningFileEntryWithNoImageDoesNothing ( ) { com . liferay . portal . kernel . service . ServiceContext serviceContext = com . liferay . portal . kernel . test . util . ServiceContextTestUtil . getServiceContext ( _group , com . liferay . portal . kernel . test . util . TestPropsValues . getUserId ( ) ) ; final com . liferay . portal . kernel . repository . model . FileEntry fileEntry = _addNonimageFileEntry ( serviceContext ) ; _amImageProcessor . cleanUp ( fileEntry . getLatestFileVersion ( true ) ) ; java . util . stream . Stream < com . liferay . adaptive . media . AdaptiveMedia < com . liferay . adaptive . media . image . processor . AMImageProcessor > > adaptiveMediaStream = _amImageFinder . getAdaptiveMediaStream ( ( amImageQueryBuilder ) -> amImageQueryBuilder . forFileEntry ( fileEntry ) . done ( ) ) ; "<AssertPlaceHolder>" ; } count ( ) { return com . liferay . portal . kernel . servlet . PortalSessionContext . _sessionPool . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , adaptiveMediaStream . count ( ) )
|
testToString ( ) { com . wdtinc . mapbox_vector_tile . adapt . jts . model . JtsLayer layer1 = new com . wdtinc . mapbox_vector_tile . adapt . jts . model . JtsLayer ( "apples" ) ; java . lang . String actual = layer1 . toString ( ) ; java . lang . String expected = "Layer{name='apples',<sp>geometries=[]}" ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "(" + ( x ) ) + "," ) + ( y ) ) + ")" ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
doesntUpdatePriorityOfNonExistentChild ( ) { com . google . firebase . database . core . CompoundWrite compoundWrite = com . google . firebase . database . core . CompoundWrite . emptyWrite ( ) ; java . util . Map < java . lang . String , java . lang . Object > base = new com . google . firebase . database . MapBuilder ( ) . put ( "child-1" , "value-1" ) . put ( "child-2" , "value-2" ) . build ( ) ; com . google . firebase . database . snapshot . Node baseNode = com . google . firebase . database . snapshot . NodeUtilities . NodeFromJSON ( base ) ; com . google . firebase . database . core . Path path = new com . google . firebase . database . core . Path ( "child-3/.priority" ) ; compoundWrite = compoundWrite . addWrite ( path , com . google . firebase . database . core . CompoundWriteTest . PRIO_NODE ) ; "<AssertPlaceHolder>" ; } apply ( com . google . firebase . database . snapshot . Node ) { return applySubtreeWrite ( com . google . firebase . database . core . Path . getEmptyPath ( ) , this . writeTree , node ) ; }
|
org . junit . Assert . assertEquals ( baseNode , compoundWrite . apply ( baseNode ) )
|
testGetInstanceFleetsWhenInputListContainsNullElement ( ) { java . util . List < org . finra . herd . model . api . xml . EmrClusterDefinitionInstanceFleet > emrClusterDefinitionInstanceFleets = new java . util . ArrayList ( ) ; emrClusterDefinitionInstanceFleets . add ( null ) ; java . util . List < com . amazonaws . services . elasticmapreduce . model . InstanceFleetConfig > result = emrDaoImpl . getInstanceFleets ( emrClusterDefinitionInstanceFleets ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
|
org . junit . Assert . assertEquals ( new java . util . ArrayList ( ) , result )
|
remoteProcessGroupStatusOutputPorts ( ) { populateRemoteProcessGroup ( false , false ) ; java . lang . String statusRequest = "remoteProcessGroup:all:outputPorts" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController , statusRequest , org . slf4j . LoggerFactory . getLogger ( org . apache . nifi . minifi . status . StatusConfigReporterTest . class ) ) ; org . apache . nifi . minifi . commons . status . FlowStatusReport expected = new org . apache . nifi . minifi . commons . status . FlowStatusReport ( ) ; expected . setErrorsGeneratingReport ( Collections . EMPTY_LIST ) ; addExpectedRemoteProcessGroupStatus ( expected , false , false , true , false , false , false ) ; "<AssertPlaceHolder>" ; } addExpectedRemoteProcessGroupStatus ( org . apache . nifi . minifi . commons . status . FlowStatusReport , boolean , boolean , boolean , boolean , boolean , boolean ) { org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupStatusBean expectedRemoteProcessGroupStatus = new org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupStatusBean ( ) ; expectedRemoteProcessGroupStatus . setName ( "rpg1" ) ; if ( addHealth ) { org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupHealth remoteProcessGroupHealth = new org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupHealth ( ) ; remoteProcessGroupHealth . setTransmissionStatus ( "Transmitting" ) ; remoteProcessGroupHealth . setHasBulletins ( populateBulletins ) ; remoteProcessGroupHealth . setActivePortCount ( 1 ) ; remoteProcessGroupHealth . setInactivePortCount ( 2 ) ; expectedRemoteProcessGroupStatus . setRemoteProcessGroupHealth ( remoteProcessGroupHealth ) ; } if ( addBulletins ) { if ( populateBulletins ) { org . apache . nifi . minifi . commons . status . common . BulletinStatus bulletinStatus = new org . apache . nifi . minifi . commons . status . common . BulletinStatus ( ) ; bulletinStatus . setMessage ( "Bulletin<sp>message" ) ; bulletinStatus . setTimestamp ( new java . util . Date ( 1464019245000L ) ) ; expectedRemoteProcessGroupStatus . setBulletinList ( java . util . Collections . singletonList ( bulletinStatus ) ) ; } else { expectedRemoteProcessGroupStatus . setBulletinList ( Collections . EMPTY_LIST ) ; } } if ( addInputPort ) { org . apache . nifi . minifi . commons . status . rpg . PortStatus expectedInputPortStatus = new org . apache . nifi . minifi . commons . status . rpg . PortStatus ( ) ; expectedInputPortStatus . setName ( "inputPort" ) ; expectedInputPortStatus . setTargetExists ( true ) ; expectedInputPortStatus . setTargetRunning ( false ) ; expectedRemoteProcessGroupStatus . setInputPortStatusList ( java . util . Collections . singletonList ( expectedInputPortStatus ) ) ; } if ( addOutputPort ) { org . apache . nifi . minifi . commons . status . rpg . PortStatus expectedOutputPortStatus = new org . apache . nifi . minifi . commons . status . rpg . PortStatus ( ) ; expectedOutputPortStatus . setName ( "outputPort" ) ; expectedOutputPortStatus . setTargetExists ( true ) ; expectedOutputPortStatus . setTargetRunning ( false ) ; expectedRemoteProcessGroupStatus . setOutputPortStatusList ( java . util . Collections . singletonList ( expectedOutputPortStatus ) ) ; } if ( addStats ) { org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupStats remoteProcessGroupStats = new org . apache . nifi . minifi . commons . status . rpg . RemoteProcessGroupStats ( ) ; remoteProcessGroupStats . setActiveThreads ( 3 ) ; remoteProcessGroupStats . setSentContentSize ( 4L ) ; remoteProcessGroupStats . setSentCount ( 5 ) ; expectedRemoteProcessGroupStatus . setRemoteProcessGroupStats ( remoteProcessGroupStats ) ; } flowStatusReport . setRemoteProcessGroupStatusList ( java . util . Collections . singletonList ( expectedRemoteProcessGroupStatus ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testBuildWithDisabledStatusConstraint ( ) { unit . setActive ( false ) ; org . lnu . is . domain . person . award . PersonAward context = new org . lnu . is . domain . person . award . PersonAward ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAward<sp>e<sp>WHERE<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . award . PersonAward > 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 ( expectedQuery , actualQuery )
|
testWithInterfaces6Broken1 ( ) { java . lang . reflect . Type selectedType = new javax . enterprise . util . TypeLiteral < org . jboss . weld . tests . unit . hierarchy . discovery . event . Interface5 < java . util . Set < java . util . Set < java . lang . Long > > > > ( ) { } . getType ( ) ; java . lang . reflect . Type type = org . jboss . weld . tests . unit . hierarchy . discovery . event . EventTypeResolutionTest . resolveType ( selectedType , org . jboss . weld . tests . unit . hierarchy . discovery . event . Charlie . class ) ; "<AssertPlaceHolder>" ; } getCanonicalType ( java . lang . Class ) { if ( clazz . isArray ( ) ) { java . lang . Class < ? > componentType = clazz . getComponentType ( ) ; java . lang . reflect . Type resolvedComponentType = org . jboss . weld . util . Types . getCanonicalType ( componentType ) ; if ( componentType != resolvedComponentType ) { return new org . jboss . weld . util . reflection . GenericArrayTypeImpl ( resolvedComponentType ) ; } } if ( ( clazz . getTypeParameters ( ) . length ) > 0 ) { java . lang . reflect . Type [ ] actualTypeParameters = clazz . getTypeParameters ( ) ; return new org . jboss . weld . util . reflection . ParameterizedTypeImpl ( clazz , actualTypeParameters , clazz . getDeclaringClass ( ) ) ; } return clazz ; }
|
org . junit . Assert . assertEquals ( org . jboss . weld . util . Types . getCanonicalType ( org . jboss . weld . tests . unit . hierarchy . discovery . event . Charlie . class ) , type )
|
testReadNullString ( ) { com . fasterxml . jackson . databind . ObjectMapper om = objectMapper ; java . lang . String json = "{\"size\":null}" ; eu . trentorise . opendata . jackan . model . CkanResource r = om . readValue ( json , eu . trentorise . opendata . jackan . model . CkanResource . class ) ; "<AssertPlaceHolder>" ; } getSize ( ) { return size ; }
|
org . junit . Assert . assertTrue ( ( ( r . getSize ( ) ) == null ) )
|
shouldDeleteIndexForSpecifiedIndexName ( ) { elasticsearchTemplate . createIndex ( org . springframework . data . elasticsearch . entities . SampleEntity . class ) ; elasticsearchTemplate . refresh ( org . springframework . data . elasticsearch . entities . SampleEntity . class ) ; elasticsearchTemplate . deleteIndex ( "test-index" ) ; "<AssertPlaceHolder>" ; } indexExists ( java . lang . String ) { return client . admin ( ) . indices ( ) . exists ( indicesExistsRequest ( indexName ) ) . actionGet ( ) . isExists ( ) ; }
|
org . junit . Assert . assertThat ( elasticsearchTemplate . indexExists ( "test-index" ) , is ( false ) )
|
testException ( ) { java . lang . RuntimeException runtimeException = new java . lang . RuntimeException ( ) ; when ( delegate . acceptsURL ( testUrl ) ) . thenReturn ( true ) ; when ( delegate . connect ( testUrl , properties ) ) . thenThrow ( runtimeException ) ; try { hiveDriver . connect ( testUrl , properties ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; throw e ; } } connect ( java . lang . String , java . util . Properties ) { if ( checkIfUsesBigDataDriver ( url ) ) { initializeCluster ( url ) ; } return null ; }
|
org . junit . Assert . assertEquals ( runtimeException , e )
|
testBookKeeperProtoShade ( ) { java . lang . Class . forName ( "dlshade.org.apache.bookkeeper.proto.BookkeeperProtocol" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
testLista ( ) { log . debug ( "Debiera<sp>monstrar<sp>lista<sp>TEmporada" ) ; mx . edu . um . mateo . general . model . Usuario asociado = this . obtieneAsociado ( ) ; authenticate ( asociado , asociado . getPassword ( ) , new java . util . ArrayList < org . springframework . security . core . GrantedAuthority > ( asociado . getRoles ( ) ) ) ; for ( int i = 0 ; i < 20 ; i ++ ) { mx . edu . um . mateo . colportor . model . Temporada temporada = new mx . edu . um . mateo . colportor . model . Temporada ( ( "test" + i ) ) ; temporada . setOrganizacion ( asociado . getEmpresa ( ) . getOrganizacion ( ) ) ; currentSession ( ) . save ( temporada ) ; "<AssertPlaceHolder>" ; } this . mockMvc . perform ( get ( Constantes . PATH_TEMPORADA ) ) . andExpect ( forwardedUrl ( ( ( "/WEB-INF/jsp/" + ( mx . edu . um . mateo . general . utils . Constantes . PATH_TEMPORADA_LISTA ) ) + ".jsp" ) ) ) . andExpect ( model ( ) . attributeExists ( Constantes . TEMPORADA_LIST ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINACION ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINAS ) ) . andExpect ( model ( ) . attributeExists ( Constantes . CONTAINSKEY_PAGINA ) ) ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( temporada . getId ( ) )
|
testGetStartUrlwDownloadFromTableRequest ( ) { org . sagebionetworks . repo . model . table . DownloadFromTableRequest request = new org . sagebionetworks . repo . model . table . DownloadFromTableRequest ( ) ; request . setEntityId ( tableId ) ; org . sagebionetworks . client . AsynchJobType type = AsynchJobType . TableCSVDownload ; java . lang . String actual = type . getStartUrl ( request ) ; java . lang . String expected = "/entity/0123456/table/download/csv/async/start" ; "<AssertPlaceHolder>" ; } getStartUrl ( org . sagebionetworks . repo . model . asynch . AsynchronousRequestBody ) { java . lang . String entityId = getEntityIdFromRequest ( request ) ; if ( entityId != null ) { return ( ( "/entity/" + entityId ) + ( prefix ) ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_START ) ; } else { return ( prefix ) + ( org . sagebionetworks . client . SynapseClientImpl . ASYNC_START ) ; } }
|
org . junit . Assert . assertEquals ( actual , expected )
|
testMethodWithAnnotatedParameter ( ) { com . openpojo . reflection . PojoClass aClassWithMethodWithAnnotatedParemeters = com . openpojo . reflection . impl . PojoClassFactory . getPojoClass ( com . openpojo . reflection . impl . PojoParameterImplTest . AClassWithMethodWithAnnotatedParemeters . class ) ; java . util . List < com . openpojo . reflection . PojoMethod > allMethods = aClassWithMethodWithAnnotatedParemeters . getPojoMethods ( ) ; java . util . List < com . openpojo . reflection . PojoMethod > methods = new java . util . ArrayList < com . openpojo . reflection . PojoMethod > ( ) ; for ( com . openpojo . reflection . PojoMethod method : allMethods ) { if ( ! ( method . isConstructor ( ) ) ) methods . add ( method ) ; } "<AssertPlaceHolder>" ; shouldHaveOneAnnotatedParameter ( methods ) ; } size ( ) { return pojoClassFilters . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , methods . size ( ) )
|
testOnFishingSelfDamage ( ) { org . bukkit . entity . FishHook hook = mock ( org . bukkit . entity . FishHook . class ) ; org . bukkit . event . player . PlayerFishEvent pfe = new org . bukkit . event . player . PlayerFishEvent ( player , player , hook , null ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( player , org . mockito . Mockito . never ( ) ) . sendMessage ( org . mockito . Mockito . anyString ( ) ) ; } isCancelled ( ) { return cancelled ; }
|
org . junit . Assert . assertFalse ( pfe . isCancelled ( ) )
|
checkLessThanMustFailIfArgumentIsEqualToExpected ( ) { final int n = 1 ; final int actual = org . jctools . util . RangeUtil . checkLessThan ( 1 , 1 , "var" ) ; "<AssertPlaceHolder>" ; } checkLessThan ( int , int , java . lang . String ) { if ( n >= expected ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( name + ":<sp>" ) + n ) + "<sp>(expected:<sp><<sp>" ) + expected ) + ')' ) ) ; } return n ; }
|
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( n ) ) )
|
testResourceLoadingNoClass_noPackage ( ) { java . io . InputStream stream = org . reficio . ws . common . ResourceUtils . getResourceAsStream ( "/org/reficio/ws/common/test/soapEncoding.xsd" ) ; "<AssertPlaceHolder>" ; } getResourceAsStream ( java . lang . String ) { org . reficio . ws . common . ResourceUtils . Path path = org . reficio . ws . common . ResourceUtils . parsePath ( resourcePath ) ; return org . reficio . ws . common . ResourceUtils . getResourceWithAbsolutePackagePathAsStream ( path . packagePath , path . resourcePath ) ; }
|
org . junit . Assert . assertNotNull ( stream )
|
testConvertIntValueToDate ( ) { int conv = testConvertValue ( org . apache . avro . Schema . create ( Schema . Type . INT ) , 17498 , TypeConverterProperties . TypeConverterOutputTypes . Date , "" , org . talend . components . processing . runtime . typeconverter . Integer . class ) ; "<AssertPlaceHolder>" ; } create ( org . talend . components . kinesis . KinesisDatasetProperties ) { return org . talend . components . kinesis . runtime . KinesisClient . getProvider ( dataset ) . getKinesisClient ( ) ; }
|
org . junit . Assert . assertThat ( conv , org . hamcrest . Matchers . is ( 17498 ) )
|
longString6 ( ) { org . diirt . support . ca . JCAChannelHandler channel = new org . diirt . support . ca . JCAChannelHandler ( "test<sp>{\"longString\":true}" , dataSource ) ; "<AssertPlaceHolder>" ; } isLongString ( ) { return longString ; }
|
org . junit . Assert . assertThat ( channel . isLongString ( ) , equalTo ( true ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.