input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testInvariantNotCalled ( ) { de . vksi . c4j . systemtest . config . purebehaviorempty . PureBehaviorEmptySystemTest . ContractClass . invariantCalled = false ; target . pureMethod ( ) ; "<AssertPlaceHolder>" ; } pureMethod ( ) { }
org . junit . Assert . assertTrue ( de . vksi . c4j . systemtest . config . purebehaviorempty . PureBehaviorEmptySystemTest . ContractClass . invariantCalled )
testCloning ( ) { com . flowpowered . math . vector . VectorNf vector = new com . flowpowered . math . vector . VectorNf ( 1 , 2 , 3 ) ; "<AssertPlaceHolder>" ; } clone ( ) { return new com . flowpowered . math . vector . Vector4l ( this ) ; }
org . junit . Assert . assertEquals ( vector , vector . clone ( ) )
testTopKWithIncrement ( ) { com . clearspring . analytics . stream . ConcurrentStreamSummary < java . lang . String > vs = new com . clearspring . analytics . stream . ConcurrentStreamSummary < java . lang . String > ( 3 ) ; java . lang . String [ ] stream = new java . lang . String [ ] { "X" , "X" , "Y" , "Z" , "A" , "B" , "C" , "X" , "X" , "A" , "C" , "A" , "A" } ; for ( java . lang . String i : stream ) { vs . offer ( i , 10 ) ; } java . util . List < com . clearspring . analytics . stream . ScoredItem < java . lang . String > > topK = vs . peekWithScores ( 3 ) ; for ( com . clearspring . analytics . stream . ScoredItem < java . lang . String > c : topK ) { "<AssertPlaceHolder>" ; } } getItem ( ) { return item ; }
org . junit . Assert . assertTrue ( java . util . Arrays . asList ( "A" , "C" , "X" ) . contains ( c . getItem ( ) ) )
testSelectClause3 ( ) { boolean result = false ; java . lang . String cql = "select<sp>previous(1,a,b,c)<sp>as<sp>a<sp>from<sp>S1" ; com . huawei . streaming . cql . semanticanalyzer . parser . IParser parser = com . huawei . streaming . cql . semanticanalyzer . parser . ParserFactory . createApplicationParser ( ) ; com . huawei . streaming . cql . semanticanalyzer . parser . context . SelectStatementContext ast = ( ( com . huawei . streaming . cql . semanticanalyzer . parser . context . SelectStatementContext ) ( parser . parse ( cql ) ) ) ; com . huawei . streaming . cql . hooks . SemanticAnalyzeHook hook = new com . huawei . streaming . cql . hooks . PreviousValidateHook ( ) ; try { hook . validate ( ast ) ; hook . preAnalyze ( null , ast ) ; } catch ( java . lang . Exception e ) { result = true ; } "<AssertPlaceHolder>" ; } preAnalyze ( com . huawei . streaming . cql . DriverContext , com . huawei . streaming . cql . semanticanalyzer . parser . context . ParseContext ) { }
org . junit . Assert . assertTrue ( result )
testGetMedia_1 ( ) { org . jinstagram . entity . users . basicinfo . Counts fixture = new org . jinstagram . entity . users . basicinfo . Counts ( ) ; fixture . setFollows ( 1 ) ; fixture . setMedia ( 1 ) ; fixture . setFollowedBy ( 1 ) ; int result = fixture . getMedia ( ) ; "<AssertPlaceHolder>" ; } getMedia ( ) { return media ; }
org . junit . Assert . assertEquals ( 1 , result )
testSplitMergePerf30 ( ) { java . util . Random rnd = new java . util . Random ( 0 ) ; int K = 2 ; long [ ] l = new long [ K ] ; for ( int i = 0 ; i < ( ( ch . ethz . globis . phtree . bits . TestBitsToolsSplitMergeVarLong . MUL ) * ( ch . ethz . globis . phtree . bits . TestBitsToolsSplitMergeVarLong . MUL ) ) ; i ++ ) { for ( int k = 0 ; k < K ; k ++ ) { l [ k ] = rnd . nextLong ( ) ; } long [ ] x = mergeLong64 ( 64 , l ) ; long [ ] l2 = ch . ethz . globis . phtree . util . BitTools . splitLong ( K , 64 , x ) ; "<AssertPlaceHolder>" ; } } splitLong ( int , int , long [ ] ) { long [ ] trg = new long [ dims ] ; long maskTrg = 1L << ( nBitsPerValue - 1 ) ; for ( int k = 0 ; k < nBitsPerValue ; k ++ ) { for ( int j = 0 ; j < ( trg . length ) ; j ++ ) { int posBit = ( k * ( trg . length ) ) + j ; boolean bit = ch . ethz . globis . phtree . util . BitTools . getBit ( toSplit , posBit ) ; if ( bit ) { trg [ j ] |= maskTrg ; } } maskTrg >>>= 1 ; } return trg ; }
org . junit . Assert . assertArrayEquals ( l , l2 )
creationOfNumberedTransactionId ( ) { io . motown . domain . api . chargingstation . TransactionId transactionId = io . motown . domain . api . chargingstation . TransactionIdFactory . createTransactionId ( "1234" , io . motown . domain . api . chargingstation . CHARGING_STATION_ID , io . motown . domain . api . chargingstation . PROTOCOL ) ; "<AssertPlaceHolder>" ; } createTransactionId ( java . lang . String , io . motown . domain . api . chargingstation . ChargingStationId , java . lang . String ) { return ( com . google . common . primitives . Ints . tryParse ( checkNotNull ( transactionNumber ) ) ) != null ? new io . motown . domain . api . chargingstation . NumberedTransactionId ( chargingStationId , protocol , com . google . common . primitives . Ints . tryParse ( transactionNumber ) ) : new io . motown . domain . api . chargingstation . UuidTransactionId ( java . util . UUID . fromString ( transactionNumber ) ) ; }
org . junit . Assert . assertTrue ( ( transactionId instanceof io . motown . domain . api . chargingstation . NumberedTransactionId ) )
testReframeExplicitVertex ( ) { final com . syncleus . ferma . TVertex v1 = p1 . reframeExplicit ( com . syncleus . ferma . TVertex . class ) ; "<AssertPlaceHolder>" ; } getId ( ) { return ( ( N ) ( getElement ( ) . id ( ) ) ) ; }
org . junit . Assert . assertEquals ( ( ( java . lang . Long ) ( p1 . getId ( ) ) ) , ( ( java . lang . Long ) ( v1 . getId ( ) ) ) )
cartesianProduct ( ) { org . eclipse . collections . api . LazyIterable < org . eclipse . collections . api . tuple . primitive . BooleanBooleanPair > booleanBooleanPairs = org . eclipse . collections . impl . factory . primitive . BooleanSets . cartesianProduct ( BooleanSets . mutable . with ( true , false ) , BooleanSets . mutable . with ( true , false ) ) ; java . util . Set < org . eclipse . collections . api . tuple . primitive . BooleanBooleanPair > expected = Sets . mutable . with ( org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( true , false ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( true , true ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( false , true ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( false , false ) ) ; "<AssertPlaceHolder>" ; } toSet ( ) { return null ; }
org . junit . Assert . assertEquals ( expected , booleanBooleanPairs . toSet ( ) )
testCreateCaseType ( ) { java . lang . String title = "My<sp>Case<sp>Type" ; java . lang . String description = "My<sp>Case<sp>Type<sp>Description" ; org . xeneo . core . task . CaseType ct = engine . createCaseType ( title , description ) ; org . xeneo . db . JdbcCaseTypeTest . logger . info ( ( ( ( ( ( "CaseType<sp>created<sp>with<sp>URI:<sp>" + ( ct . getCaseTypeURI ( ) ) ) + ",<sp>Title:<sp>" ) + ( ct . getTitle ( ) ) ) + "<sp>and<sp>Description:<sp>" ) + ( ct . getDescription ( ) ) ) ) ; "<AssertPlaceHolder>" ; } getCaseTypeURI ( ) { if ( updateMe ) { updateMe ( ) ; } return this . caseTypeURI ; }
org . junit . Assert . assertTrue ( ( ( ( ! ( ct . getCaseTypeURI ( ) . isEmpty ( ) ) ) && ( ! ( ct . getTitle ( ) . isEmpty ( ) ) ) ) && ( ! ( ct . getDescription ( ) . isEmpty ( ) ) ) ) )
testRememberAction ( ) { com . hp . mwtests . ts . arjuna . resources . ExtendedObject bo = new com . hp . mwtests . ts . arjuna . resources . ExtendedObject ( ) ; final com . arjuna . ats . arjuna . common . Uid u = bo . get_uid ( ) ; bo . activate ( ) ; bo . deactivate ( ) ; bo = new com . hp . mwtests . ts . arjuna . resources . ExtendedObject ( u ) ; com . arjuna . ats . arjuna . AtomicAction A = new com . arjuna . ats . arjuna . AtomicAction ( ) ; A . begin ( ) ; "<AssertPlaceHolder>" ; A . commit ( ) ; } remember ( com . arjuna . ats . arjuna . coordinator . BasicAction ) { return super . rememberAction ( act , RecordType . ACTIVATION , ObjectStatus . ACTIVE ) ; }
org . junit . Assert . assertTrue ( bo . remember ( A ) )
testOrtho ( ) { com . hackoeur . jglm . Mat4 got = com . hackoeur . jglm . Matrices . ortho ( ( - 1.0F ) , 1.0F , ( - 1.0F ) , 1.0F , 1.5F , 20.0F ) ; com . hackoeur . jglm . Mat4 expected = new com . hackoeur . jglm . Mat4 ( ( + 1.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( + 1.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( + 0.0F ) , ( - 0.10810811F ) , ( + 0.0F ) , ( - 0.0F ) , ( - 0.0F ) , ( - 1.1621622F ) , ( + 1.0F ) ) ; System . out . println ( got ) ; "<AssertPlaceHolder>" ; } ortho ( float , float , float , float , float , float ) { final float m00 = 2.0F / ( right - left ) ; final float m11 = 2.0F / ( top - bottom ) ; final float m22 = ( - 2.0F ) / ( zFar - zNear ) ; final float m30 = ( - ( right + left ) ) / ( right - left ) ; final float m31 = ( - ( top + bottom ) ) / ( top - bottom ) ; final float m32 = ( - ( zFar + zNear ) ) / ( zFar - zNear ) ; return new com . hackoeur . jglm . Mat4 ( m00 , 0.0F , 0.0F , 0.0F , 0.0F , m11 , 0.0F , 0.0F , 0.0F , 0.0F , m22 , 0.0F , m30 , m31 , m32 , 1.0F ) ; }
org . junit . Assert . assertEquals ( expected , got )
_2BytesOfData_thenTableChecksumDoesNotThrowException ( ) { org . mabb . fontverter . opentype . TestOpenTypeTable . CannedOpenTypeTable table = new org . mabb . fontverter . opentype . TestOpenTypeTable . CannedOpenTypeTable ( ) ; org . mabb . fontverter . io . FontDataOutputStream writer = new org . mabb . fontverter . io . FontDataOutputStream ( org . mabb . fontverter . io . FontDataOutputStream . OPEN_TYPE_CHARSET ) ; writer . writeUnsignedShort ( 55 ) ; table . fillerData = writer . toByteArray ( ) ; long checksum = table . checksum ( ) ; "<AssertPlaceHolder>" ; } checksum ( ) { return org . mabb . fontverter . FontVerterUtils . getTableChecksum ( getData ( ) ) ; }
org . junit . Assert . assertEquals ( ( 55 << 16 ) , checksum )
testGet ( ) { java . lang . String mediaId = java . lang . System . getProperty ( "weixin.mediaid" ) ; com . belerweb . social . bean . Result < com . belerweb . social . weixin . bean . Media > result = weixin . getMedia ( ) . get ( mediaId ) ; "<AssertPlaceHolder>" ; com . belerweb . social . weixin . api . MediaTest . logger . info ( result . getResult ( ) . getContentType ( ) ) ; com . belerweb . social . weixin . api . MediaTest . logger . info ( result . getResult ( ) . getName ( ) ) ; } success ( ) { return ( error ) == null ; }
org . junit . Assert . assertTrue ( result . success ( ) )
zeroDisconnectConnectionDelay ( ) { waggleDanceConfiguration . setDisconnectConnectionDelay ( 0 ) ; java . util . Set < javax . validation . ConstraintViolation < com . hotels . bdp . waggledance . conf . WaggleDanceConfiguration > > violations = validator . validate ( waggleDanceConfiguration ) ; "<AssertPlaceHolder>" ; } size ( ) { return whiteList . size ( ) ; }
org . junit . Assert . assertThat ( violations . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
testBucketScriptPipelineAggregation ( ) { com . liferay . portal . search . script . Script script = null ; com . liferay . portal . search . aggregation . pipeline . BucketScriptPipelineAggregation bucketScriptPipelineAggregation = com . liferay . portal . search . aggregations . test . AggregationsInstantiationTest . _aggregations . bucketScript ( "name" , script ) ; "<AssertPlaceHolder>" ; } bucketScript ( java . lang . String , com . liferay . portal . search . script . Script ) { return new com . liferay . portal . search . internal . aggregation . pipeline . BucketScriptPipelineAggregationImpl ( name , script ) ; }
org . junit . Assert . assertNotNull ( bucketScriptPipelineAggregation )
testPickWithNullInstance ( ) { org . easymock . EasyMock . expect ( serviceProvider . getInstance ( ) ) . andReturn ( null ) . anyTimes ( ) ; org . easymock . EasyMock . replay ( serviceProvider ) ; org . apache . druid . client . selector . Server server = serverDiscoverySelector . pick ( ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( serviceProvider ) ; } pick ( ) { synchronized ( this ) { if ( ! ( historicalServers . isEmpty ( ) ) ) { return strategy . pick ( historicalServers , segment . get ( ) ) ; } return strategy . pick ( realtimeServers , segment . get ( ) ) ; } }
org . junit . Assert . assertNull ( server )
testGetFloatPosition ( ) { final long [ ] initial = new long [ ] { 532 , 632 , 987421 } ; final net . imglib2 . Point p = new net . imglib2 . Point ( initial ) ; for ( int i = 0 ; i < ( initial . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getFloatPosition ( int ) { return source . getFloatPosition ( d ) ; }
org . junit . Assert . assertEquals ( initial [ i ] , p . getFloatPosition ( i ) , 0 )
testSimpleEquality ( ) { com . github . davidmoten . rtree3d . geometry . Box r = com . github . davidmoten . rtree3d . geometry . RectangleTest . box ( 0 , 0 , 2 , 1 ) ; com . github . davidmoten . rtree3d . geometry . Box r2 = com . github . davidmoten . rtree3d . geometry . RectangleTest . box ( 0 , 0 , 2 , 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { com . google . common . base . Optional < com . github . davidmoten . rtree3d . geometry . Point > other = com . github . davidmoten . util . ObjectsHelper . asClass ( obj , com . github . davidmoten . rtree3d . geometry . Point . class ) ; if ( other . isPresent ( ) ) { return com . google . common . base . Objects . equal ( mbr , other . get ( ) . mbb ( ) ) ; } else return false ; }
org . junit . Assert . assertTrue ( r . equals ( r2 ) )
shouldFindAnnotatedGeoMarkersInRangeForGivenCriteriaQuery ( ) { loadAnnotationBaseEntities ( ) ; org . springframework . data . elasticsearch . core . query . CriteriaQuery geoLocationCriteriaQuery = new org . springframework . data . elasticsearch . core . query . CriteriaQuery ( new org . springframework . data . elasticsearch . core . query . Criteria ( "locationAsArray" ) . within ( "51.001000,<sp>0.10100" , "1km" ) ) ; java . util . List < org . springframework . data . elasticsearch . core . geo . LocationMarkerEntity > geoAuthorsForGeoCriteria = elasticsearchTemplate . queryForList ( geoLocationCriteriaQuery , org . springframework . data . elasticsearch . core . geo . LocationMarkerEntity . class ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Object ) { queryCriteria . add ( new org . springframework . data . elasticsearch . core . query . Criteria . CriteriaEntry ( org . springframework . data . elasticsearch . core . query . Criteria . OperationKey . EQUALS , o ) ) ; return this ; }
org . junit . Assert . assertThat ( geoAuthorsForGeoCriteria . size ( ) , is ( 3 ) )
testOneServerDown ( ) { java . lang . Object result = new java . lang . Object ( ) ; when ( serviceAddressLocator . getServiceList ( any ( ) ) ) . thenReturn ( java . util . Arrays . asList ( mockService ( serviceOne ) , mockService ( serviceTwo ) , mockService ( serviceThree ) ) ) ; when ( restTemplate . getForObject ( ( ( ( serviceOne ) + "/" ) + ( path ) ) , java . lang . Object . class ) ) . thenThrow ( socketTimeoutException ) ; when ( restTemplate . getForObject ( ( ( ( serviceTwo ) + "/" ) + ( path ) ) , java . lang . Object . class ) ) . thenReturn ( result ) ; when ( restTemplate . getForObject ( ( ( ( serviceThree ) + "/" ) + ( path ) ) , java . lang . Object . class ) ) . thenThrow ( connectTimeoutException ) ; java . lang . Object o = retryableRestTemplate . get ( Env . DEV , path , java . lang . Object . class ) ; verify ( restTemplate ) . getForObject ( ( ( ( serviceOne ) + "/" ) + ( path ) ) , java . lang . Object . class ) ; verify ( restTemplate ) . getForObject ( ( ( ( serviceTwo ) + "/" ) + ( path ) ) , java . lang . Object . class ) ; verify ( restTemplate , times ( 0 ) ) . getForObject ( ( ( ( serviceThree ) + "/" ) + ( path ) ) , java . lang . Object . class ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . String , java . lang . String ) { com . ctrip . framework . apollo . biz . entity . Namespace namespace = namespaceService . findOne ( appId , clusterName , namespaceName ) ; if ( namespace == null ) throw new com . ctrip . framework . apollo . common . exception . NotFoundException ( java . lang . String . format ( "namespace<sp>not<sp>found<sp>for<sp>%s<sp>%s<sp>%s" , appId , clusterName , namespaceName ) ) ; return com . ctrip . framework . apollo . common . utils . BeanUtils . transform ( com . ctrip . framework . apollo . common . dto . NamespaceDTO . class , namespace ) ; }
org . junit . Assert . assertEquals ( result , o )
setName ( ) { org . apache . servicecomb . foundation . common . cache . VersionedCache cache = new org . apache . servicecomb . foundation . common . cache . VersionedCache ( ) . name ( "n" ) ; "<AssertPlaceHolder>" ; } name ( ) { return org . apache . servicecomb . bizkeeper . ThrowExceptionFallbackPolicy . POLICY_NAME ; }
org . junit . Assert . assertEquals ( "n" , cache . name ( ) )
ManyMessageTransferPosTest ( ) { java . nio . ByteBuffer byteBuffer = java . nio . ByteBuffer . allocate ( 20 ) ; byteBuffer . putInt ( 20 ) ; org . apache . rocketmq . store . GetMessageResult getMessageResult = new org . apache . rocketmq . store . GetMessageResult ( ) ; org . apache . rocketmq . broker . pagecache . ManyMessageTransfer manyMessageTransfer = new org . apache . rocketmq . broker . pagecache . ManyMessageTransfer ( byteBuffer , getMessageResult ) ; "<AssertPlaceHolder>" ; } position ( ) { int pos = byteBufferHeader . position ( ) ; java . util . List < java . nio . ByteBuffer > messageBufferList = this . getMessageResult . getMessageBufferList ( ) ; for ( java . nio . ByteBuffer bb : messageBufferList ) { pos += bb . position ( ) ; } return pos ; }
org . junit . Assert . assertEquals ( manyMessageTransfer . position ( ) , 4 )
testZippel3_random_sparse_vars ( ) { org . apache . commons . math3 . random . RandomGenerator rnd = getRandom ( ) ; cc . redberry . rings . util . RandomDataGenerator rndd = getRandomData ( ) ; cc . redberry . rings . IntegersZp64 ring = Zp64 ( cc . redberry . rings . primes . SmallPrimes . nextPrime ( ( 1 << 20 ) ) ) ; org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics zippel = new org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics ( ) ; org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics brown = new org . apache . commons . math3 . stat . descriptive . DescriptiveStatistics ( ) ; int nIterations = its ( 50 , 100 ) ; int nVars = 100 ; int degree = 7 ; for ( int i = 0 ; i < nIterations ; ++ i ) { cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 a = cc . redberry . rings . poly . multivar . RandomMultivariatePolynomials . randomSharpPolynomial ( nVars , degree , rndd . nextInt ( 1 , 20 ) , ring , cc . redberry . rings . poly . multivar . MonomialOrder . LEX , rnd ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 b = cc . redberry . rings . poly . multivar . RandomMultivariatePolynomials . randomSharpPolynomial ( nVars , degree , rndd . nextInt ( 1 , 20 ) , ring , cc . redberry . rings . poly . multivar . MonomialOrder . LEX , rnd ) ; while ( ( a . nUsedVariables ( ) ) >= 5 ) a = a . evaluate ( rnd . nextInt ( nVars ) , 1 ) ; while ( ( b . nUsedVariables ( ) ) >= 5 ) b = b . evaluate ( rnd . nextInt ( nVars ) , 1 ) ; int variable ; do { variable = rnd . nextInt ( nVars ) ; } while ( ( ( a . degree ( variable ) ) == 0 ) && ( ( b . degree ( variable ) ) == 0 ) ) ; long start ; start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 actual = ZippelResultant ( a , b , variable ) ; zippel . addValue ( ( ( java . lang . System . nanoTime ( ) ) - start ) ) ; System . out . println ( ( "Zippel:<sp>" + ( nanosecondsToString ( ( ( java . lang . System . nanoTime ( ) ) - start ) ) ) ) ) ; start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 expected = BrownResultant ( a , b , variable ) ; brown . addValue ( ( ( java . lang . System . nanoTime ( ) ) - start ) ) ; System . out . println ( ( "Brown:<sp>" + ( nanosecondsToString ( ( ( java . lang . System . nanoTime ( ) ) - start ) ) ) ) ) ; "<AssertPlaceHolder>" ; System . out . println ( ) ; } System . out . println ( ( "Zippel's<sp>" + zippel ) ) ; System . out . println ( ( "Brown's<sp>" + brown ) ) ; } nanosecondsToString ( long ) { java . lang . String pf = "ns" ; if ( ( nano / 1000 ) > 1 ) { pf = "us" ; nano /= 1000 ; } if ( ( nano / 1000 ) > 1 ) { pf = "ms" ; nano /= 1000 ; } if ( ( nano / 1000 ) > 1 ) { pf = "s" ; nano /= 1000 ; } return nano + pf ; }
org . junit . Assert . assertEquals ( expected , actual )
testArrayObjectAssert ( ) { final org . kie . api . runtime . StatelessKieSession session = getSession2 ( "statelessSessionTest.drl" ) ; final org . drools . compiler . Cheese stilton = new org . drools . compiler . Cheese ( "stilton" , 5 ) ; session . execute ( java . util . Arrays . asList ( new java . lang . Object [ ] { stilton } ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { return rulesFired . get ( index ) ; }
org . junit . Assert . assertEquals ( "stilton" , list . get ( 0 ) )
testArrayCopy ( ) { System . out . println ( "arrayCopy" ) ; double [ ] xArray = x . arrayCopy ( ) ; for ( int i = 0 ; i < ( x . length ( ) ) ; i ++ ) "<AssertPlaceHolder>" ; } get ( int ) { if ( index < ( w . length ( ) ) ) return w . get ( index ) ; else if ( index == ( w . length ( ) ) ) return b [ 0 ] ; else throw new java . lang . IndexOutOfBoundsException ( ) ; }
org . junit . Assert . assertEquals ( x . get ( i ) , xArray [ i ] , 0.0 )
showRep ( ) { org . mariadb . jdbc . UrlParser urlParser = org . mariadb . jdbc . UrlParser . parse ( initialGaleraUrl ) ; java . util . List < org . mariadb . jdbc . HostAddress > initAddresses = urlParser . getHostAddresses ( ) ; for ( int i = 0 ; i < ( initAddresses . size ( ) ) ; i ++ ) { urlParser . setHostAddresses ( java . util . Arrays . asList ( initAddresses . get ( i ) ) ) ; try ( java . sql . Connection master = org . mariadb . jdbc . MariaDbConnection . newConnection ( urlParser , null ) ) { java . sql . Statement stmt = master . createStatement ( ) ; java . sql . ResultSet rs = stmt . executeQuery ( "show<sp>status<sp>like<sp>'wsrep_local_state'" ) ; "<AssertPlaceHolder>" ; System . out . println ( ( ( ( "host:" + ( initAddresses . get ( i ) ) ) + "<sp>status:" ) + ( rs . getString ( 2 ) ) ) ) ; } } } next ( ) { if ( isClosed ) { throw new java . sql . SQLException ( "Operation<sp>not<sp>permit<sp>on<sp>a<sp>closed<sp>resultSet" , "HY000" ) ; } if ( ( rowPointer ) < ( ( dataSize ) - 1 ) ) { ( rowPointer ) ++ ; return true ; } else { if ( ( streaming ) && ( ! ( isEof ) ) ) { lock . lock ( ) ; try { if ( ! ( isEof ) ) { nextStreamingValue ( ) ; } } catch ( java . io . IOException ioe ) { throw handleIoException ( ioe ) ; } finally { lock . unlock ( ) ; } if ( ( resultSetScrollType ) == ( TYPE_FORWARD_ONLY ) ) { rowPointer = 0 ; return ( dataSize ) > 0 ; } else { ( rowPointer ) ++ ; return ( dataSize ) > ( rowPointer ) ; } } rowPointer = dataSize ; return false ; } }
org . junit . Assert . assertTrue ( rs . next ( ) )
should_create_new_instance_with_default_constructor ( ) { org . fest . reflect . core . Reflection_constructor_Test . Person person = org . fest . reflect . core . Reflection . constructor ( ) . in ( org . fest . reflect . core . Reflection_constructor_Test . Person . class ) . newInstance ( ) ; "<AssertPlaceHolder>" ; } in ( java . lang . Object ) { return new org . fest . reflect . beanproperty . PropertyAccessor < T > ( propertyName , value . rawType ( ) , target ) ; }
org . junit . Assert . assertNotNull ( person )
resourcePoolNormal ( ) { alluxio . resource . ResourcePoolTest . TestResourcePool testPool = new alluxio . resource . ResourcePoolTest . TestResourcePool ( 2 ) ; int resource1 = testPool . acquire ( ) ; testPool . release ( resource1 ) ; int resource2 = testPool . acquire ( ) ; "<AssertPlaceHolder>" ; } acquire ( ) { return acquire ( alluxio . resource . ResourcePool . WAIT_INDEFINITELY , null ) ; }
org . junit . Assert . assertEquals ( resource1 , resource2 )
handlesIllegalAutosubscribeChannels ( ) { java . lang . String configurationString = ( "" + ( Configuration . CONFIGURATION_CHANNELS_AUTOSUBSCRIBE ) ) + "=not-a-jid$$\n" ; configuration . load ( org . apache . commons . io . IOUtils . toInputStream ( configurationString ) ) ; "<AssertPlaceHolder>" ; } getAutosubscribeChannels ( ) { setupCollections ( ) ; return autosubscribeChannels ; }
org . junit . Assert . assertEquals ( 0 , configuration . getAutosubscribeChannels ( ) . size ( ) )
testGet ( ) { c . stubGet ( "/listings" , "listing.json" , 200 ) ; com . sparkplatform . api . core . Response r = c . get ( "/listings" , new java . util . HashMap < com . sparkplatform . api . core . ApiParameter , java . lang . String > ( ) ) ; "<AssertPlaceHolder>" ; com . sparkplatform . api . models . Listing m = r . getResults ( com . sparkplatform . api . models . Listing . class ) . get ( 0 ) ; validate ( m ) ; } stubGet ( java . lang . String , java . lang . String , int ) { java . lang . String s = setupRequest ( path , "" , new java . util . HashMap < java . lang . String , java . lang . String > ( ) ) ; con . stubGet ( s , fixture , status ) ; }
org . junit . Assert . assertNotNull ( r )
testUpdateJob ( ) { org . finra . herd . model . api . xml . JobUpdateRequest jobUpdateRequest = new org . finra . herd . model . api . xml . JobUpdateRequest ( org . finra . herd . model . api . xml . JobActionEnum . RESUME ) ; org . finra . herd . model . api . xml . Job job = new org . finra . herd . model . api . xml . Job ( ) ; job . setId ( org . finra . herd . rest . JOB_ID ) ; when ( jobService . updateJob ( org . finra . herd . rest . JOB_ID , jobUpdateRequest ) ) . thenReturn ( job ) ; org . finra . herd . model . api . xml . Job result = jobRestController . updateJob ( org . finra . herd . rest . JOB_ID , jobUpdateRequest ) ; verify ( jobService ) . updateJob ( org . finra . herd . rest . JOB_ID , jobUpdateRequest ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( job , result )
testWrite ( ) { java . util . List < java . lang . String > readOnly = com . google . common . collect . ImmutableList . of ( "/content" , "/content/a/b/c" ) ; for ( java . lang . String p : readOnly ) { try { org . apache . jackrabbit . oak . util . NodeUtil content = new org . apache . jackrabbit . oak . util . NodeUtil ( testRoot . getTree ( p ) ) ; content . addChild ( "writeTest" , org . apache . jackrabbit . oak . spi . security . authorization . cug . impl . NT_OAK_UNSTRUCTURED ) ; testRoot . commit ( ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . jackrabbit . oak . api . CommitFailedException e ) { "<AssertPlaceHolder>" ; } finally { testRoot . refresh ( ) ; } } } isAccessViolation ( ) { return isOfType ( org . apache . jackrabbit . oak . api . CommitFailedException . ACCESS ) ; }
org . junit . Assert . assertTrue ( e . isAccessViolation ( ) )
addAndRemoveRandomly ( ) { org . roaringbitmap . FastRankRoaringBitmap b = new org . roaringbitmap . FastRankRoaringBitmap ( ) ; java . util . Random r = new java . util . Random ( 0 ) ; int problemSize = 10 * 1000 ; int nbReallyAdded = addSelectRemoveRandomly ( b , r , problemSize , 0 ) ; "<AssertPlaceHolder>" ; } getLongCardinality ( ) { if ( doCacheCardinalities ) { if ( highToBitmap . isEmpty ( ) ) { return 0L ; } int indexOk = ensureCumulatives ( highestHigh ( ) ) ; if ( highToBitmap . isEmpty ( ) ) { return 0L ; } return sortedCumulatedCardinality [ ( indexOk - 1 ) ] ; } else { long cardinality = 0L ; for ( org . roaringbitmap . BitmapDataProvider bitmap : highToBitmap . values ( ) ) { cardinality += bitmap . getLongCardinality ( ) ; } return cardinality ; } }
org . junit . Assert . assertEquals ( nbReallyAdded , b . getLongCardinality ( ) )
shouldGetRedistributedPartitions ( ) { partitionService . createPartitionDistribution ( regionId , initialReplicaCount ) ; final cs . bilkent . joker . engine . partition . PartitionDistribution distribution = partitionService . rebalancePartitionDistribution ( regionId , newReplicaCount ) ; "<AssertPlaceHolder>" ; } getPartitionDistribution ( int ) { return distributions . get ( regionId ) ; }
org . junit . Assert . assertEquals ( distribution , partitionService . getPartitionDistribution ( regionId ) )
testValidButOutOfPlaceCharOnDifferentLine ( ) { java . lang . String templates = "foo()<sp>::=<sp>\"hi<sp><\n" + ".><sp>mom\"\n" ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . misc . ErrorBuffer errors = new org . stringtemplate . v4 . misc . ErrorBuffer ( ) ; org . stringtemplate . v4 . STGroupFile group = new org . stringtemplate . v4 . STGroupFile ( ( ( ( tmpdir ) + "/" ) + "t.stg" ) ) ; group . setListener ( errors ) ; group . load ( ) ; java . lang . String expected = "[t.stg<sp>1:15:<sp>\\n<sp>in<sp>string,<sp>t.stg<sp>1:14:<sp>doesn\'t<sp>look<sp>like<sp>an<sp>expression]" ; java . lang . String result = errors . errors . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( expected , result )
testGetFileAttributesOfFileAfterMove ( ) { java . nio . file . Files . createFile ( moveTo . resolve ( "newFile" ) ) ; java . nio . file . attribute . BasicFileAttributeView view = fixture . getFileAttributeView ( root . getFileSystem ( ) . getPath ( "newFile" ) , java . nio . file . attribute . BasicFileAttributeView . class ) ; java . nio . file . Files . move ( moveTo , moveTo . getParent ( ) . resolve ( "movedAgain" ) ) ; long lastModified = view . readAttributes ( ) . lastModifiedTime ( ) . toMillis ( ) ; "<AssertPlaceHolder>" ; } resolve ( com . github . sbridges . ephemeralfs . EphemeralFsPath ) { com . github . sbridges . ephemeralfs . ResolvedPath resolved = com . github . sbridges . ephemeralfs . ResolvedPath . resolve ( path , noFollowLinks ) ; if ( ! ( resolved . didResolve ( ) ) ) { throw new java . nio . file . NoSuchFileException ( pathProvider . toString ( ) ) ; } return resolved ; }
org . junit . Assert . assertTrue ( ( lastModified > 0 ) )
testException06 ( ) { java . lang . String source = "function<sp>compare(x,<sp>y)<sp>{if<sp>(x<sp>===<sp>y)<sp>{return<sp>true;}<sp>if(x!=null<sp>||<sp>y!=<sp>null)<sp>{return<sp>false;}<sp>if(x.size()<sp>!=<sp>y.size()){return<sp>false;}for<sp>(var<sp>index=0;<sp>index<sp><<sp>x.size();<sp>index++)<sp>{if<sp>(y.indexOf(x.get(index))<sp>==<sp>-1)<sp>{return<sp>false;}}<sp>for<sp>(var<sp>index=0;<sp>index<sp><<sp>y.size();<sp>index++)<sp>{if<sp>(x.indexOf(y.get(index))<sp>==<sp>-1)<sp>{return<sp>false;}}<sp>return<sp>true;}compare($installedManifestsCur,<sp>$installedManifestsRef);" ; com . ebay . cloud . cms . expression . IExpression expr = getEngine ( ) . compile ( source ) ; com . ebay . cloud . cms . expression . entity . SampleEntity entity = new com . ebay . cloud . cms . expression . entity . SampleEntity ( ) ; java . util . ArrayList < java . lang . String > installedManifestsCurList = new java . util . ArrayList < java . lang . String > ( ) ; installedManifestsCurList . add ( "test2" ) ; installedManifestsCurList . add ( "test1" ) ; entity . addFieldValue ( "installedManifestsRef" , null ) ; entity . addFieldValue ( "installedManifestsCur" , installedManifestsCurList ) ; com . ebay . cloud . cms . expression . IExpressionContext context = new com . ebay . cloud . cms . expression . entity . SampleEntityExpressionContext ( entity ) ; java . lang . Object result = getEngine ( ) . evaluate ( expr , context ) ; "<AssertPlaceHolder>" ; } evaluate ( com . ebay . cloud . cms . dal . search . impl . criteria . FieldSearchCriteria , java . util . List ) { java . util . List < java . lang . Object > criteriaValueList = criteria . getValueList ( ) ; boolean evalRes = false ; com . ebay . cloud . cms . dal . search . impl . criteria . FieldSearchCriteria . FieldOperatorEnum op = criteria . getOperator ( ) ; switch ( op ) { case IN : evalRes = evalIn ( fieldValues , criteriaValueList ) ; break ; case NIN : evalRes = evalNotIn ( fieldValues , criteriaValueList ) ; break ; default : throw new java . lang . IllegalArgumentException ( ( "Unsupport<sp>comparision<sp>operator:<sp>" + op ) ) ; } return evalRes ; }
org . junit . Assert . assertEquals ( false , result )
sexEqualAndAgeGreaterthanequalOrSexEqual ( ) { java . lang . String sqlite = "SELECT<sp>*<sp>FROM<sp>users<sp>WHERE<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>or<sp>sex<sp>=<sp>'female'<sp>LIMIT<sp>10" ; java . lang . String api = "select<sp>*<sp>where<sp>sex<sp>=<sp>'male'<sp>and<sp>age<sp>>=<sp>35<sp>or<sp>sex<sp>=<sp>'female'" ; org . apache . usergrid . query . validator . QueryRequest request = new org . apache . usergrid . query . validator . QueryRequest ( ) ; request . setDbQuery ( sqlite ) ; request . getApiQuery ( ) . setQuery ( api ) ; org . apache . usergrid . query . validator . QueryResponse response = validator . execute ( request , new org . apache . usergrid . query . validator . QueryResultsMatcher ( ) { @ org . apache . usergrid . query . validator . users . Override public boolean equals ( java . util . List < org . apache . usergrid . persistence . Entity > expectedEntities , java . util . List < org . apache . usergrid . persistence . Entity > actuallyEntities ) { boolean equals = ( expectedEntities . size ( ) ) == ( expectedEntities . size ( ) ) ; if ( ! equals ) return false ; for ( org . apache . usergrid . persistence . Entity entity : actuallyEntities ) { int age = ( ( java . lang . Integer ) ( entity . getProperty ( "age" ) ) ) ; java . lang . String sex = ( ( java . lang . String ) ( entity . getProperty ( "sex" ) ) ) ; if ( ( ( ( org . apache . usergrid . utils . StringUtils . equals ( "male" , sex ) ) && ( age >= 35 ) ) || ( org . apache . usergrid . utils . StringUtils . equals ( "female" , sex ) ) ) == false ) { return false ; } } return equals ; } } ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ( serviceName ) != null ) { sb . append ( "/" ) ; sb . append ( serviceName ) ; } for ( int i = 0 ; i < ( parameters . size ( ) ) ; i ++ ) { org . apache . usergrid . services . ServiceParameter p = parameters . get ( i ) ; if ( p instanceof org . apache . usergrid . services . ServiceParameter . QueryParameter ) { if ( i == ( ( parameters . size ( ) ) - 1 ) ) { sb . append ( '?' ) ; } else { sb . append ( ';' ) ; } boolean has_prev_param = false ; java . lang . String q = p . toString ( ) ; if ( isNotBlank ( q ) ) { try { sb . append ( "ql=" ) . append ( java . net . URLEncoder . encode ( q , "UTF-8" ) ) ; } catch ( java . io . UnsupportedEncodingException e ) { org . apache . usergrid . services . ServiceRequest . logger . error ( "Unable<sp>to<sp>encode<sp>url" , e ) ; } has_prev_param = true ; } int limit = p . getQuery ( ) . getLimit ( ) ; if ( limit != ( org . apache . usergrid . persistence . Query . DEFAULT_LIMIT ) ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "limit=" ) . append ( limit ) ; has_prev_param = true ; } if ( ( p . getQuery ( ) . getStartResult ( ) ) != null ) { if ( has_prev_param ) { sb . append ( '&' ) ; } sb . append ( "start=" ) . append ( p . getQuery ( ) . getStartResult ( ) ) ; has_prev_param = true ; } } else { sb . append ( '/' ) ; sb . append ( p . toString ( ) ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertTrue ( response . toString ( ) , response . result ( ) )
testIfCommandIsDispatchedAndCorrelationIdIsNotNull ( ) { org . axonframework . commandhandling . CommandMessage < java . lang . Object > command = new org . axonframework . commandhandling . GenericCommandMessage ( new java . lang . Object ( ) ) ; gateway . sendAndWaitForEvent ( command , mock ( io . motown . domain . utils . axon . EventCallback . class ) , io . motown . domain . utils . axon . EventWaitingGatewayTest . HIGH_TIMEOUT_IN_MILLIS ) ; io . motown . domain . api . chargingstation . CorrelationToken correlationToken = verifyDispatchAndCaptureCorrelationToken ( ) ; "<AssertPlaceHolder>" ; } verifyDispatchAndCaptureCorrelationToken ( ) { org . mockito . ArgumentCaptor < org . axonframework . commandhandling . CommandMessage > commandMessageArgumentCaptor = org . mockito . ArgumentCaptor . forClass ( org . axonframework . commandhandling . CommandMessage . class ) ; verify ( commandBus ) . dispatch ( commandMessageArgumentCaptor . capture ( ) ) ; org . junit . Assert . assertNotNull ( commandMessageArgumentCaptor . getValue ( ) . getMetaData ( ) . get ( CorrelationToken . KEY ) ) ; return ( ( io . motown . domain . api . chargingstation . CorrelationToken ) ( commandMessageArgumentCaptor . getValue ( ) . getMetaData ( ) . get ( CorrelationToken . KEY ) ) ) ; }
org . junit . Assert . assertTrue ( ( correlationToken != null ) )
testSkipAllSubmittedJobs ( ) { org . apache . phoenix . mapreduce . index . automation . PhoenixAsyncIndex [ ] jobs = new org . apache . phoenix . mapreduce . index . automation . PhoenixAsyncIndex [ candidateJobs . size ( ) ] ; candidateJobs . values ( ) . toArray ( jobs ) ; submittedJobs . add ( java . lang . String . format ( IndexTool . INDEX_JOB_NAME_TEMPLATE , jobs [ 0 ] . getTableSchem ( ) , jobs [ 0 ] . getDataTableName ( ) , jobs [ 0 ] . getTableName ( ) ) ) ; submittedJobs . add ( java . lang . String . format ( IndexTool . INDEX_JOB_NAME_TEMPLATE , jobs [ 1 ] . getTableSchem ( ) , jobs [ 1 ] . getDataTableName ( ) , jobs [ 1 ] . getTableName ( ) ) ) ; org . apache . phoenix . mapreduce . index . automation . PhoenixMRJobSubmitter submitter = new org . apache . phoenix . mapreduce . index . automation . PhoenixMRJobSubmitter ( ) ; java . util . Set < org . apache . phoenix . mapreduce . index . automation . PhoenixAsyncIndex > jobsToSubmit = submitter . getJobsToSubmit ( candidateJobs , submittedJobs ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . delegatee . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , jobsToSubmit . size ( ) )
testFindUnique_NoResults ( ) { org . kuali . rice . core . api . criteria . QueryByCriteria criteria = QueryByCriteria . Builder . create ( ) . build ( ) ; org . kuali . rice . core . api . criteria . QueryResults < java . lang . Object > emptyResults = GenericQueryResults . Builder . < java . lang . Object > create ( ) . build ( ) ; when ( mockProvider . findMatching ( java . lang . Object . class , criteria ) ) . thenReturn ( emptyResults ) ; java . lang . Object singleResult = service . findUnique ( java . lang . Object . class , criteria ) ; "<AssertPlaceHolder>" ; } findUnique ( java . lang . Class , org . kuali . rice . core . api . criteria . QueryByCriteria ) { org . kuali . rice . core . api . criteria . QueryResults < T > results = findMatching ( type , queryByCriteria ) ; if ( results . getResults ( ) . isEmpty ( ) ) { return null ; } else if ( ( results . getResults ( ) . size ( ) ) > 1 ) { throw new org . springframework . dao . IncorrectResultSizeDataAccessException ( ( ( ( ( "Attempted<sp>to<sp>find<sp>single<sp>result<sp>but<sp>found<sp>more<sp>than<sp>" + "one<sp>for<sp>class<sp>" ) + type ) + "<sp>and<sp>criteria<sp>" ) + queryByCriteria ) , 1 , results . getResults ( ) . size ( ) ) ; } else { return results . getResults ( ) . get ( 0 ) ; } }
org . junit . Assert . assertNull ( singleResult )
testEmptyState ( ) { org . apache . flink . runtime . state . filesystem . FsCheckpointStreamFactory . CheckpointStateOutputStream stream = new org . apache . flink . runtime . state . filesystem . FsCheckpointStreamFactory . FsCheckpointStateOutputStream ( org . apache . flink . core . fs . Path . fromLocalFile ( tempDir . newFolder ( ) ) , org . apache . flink . core . fs . FileSystem . getLocalFileSystem ( ) , 1024 , 512 ) ; org . apache . flink . runtime . state . StreamStateHandle handle = stream . closeAndGetHandle ( ) ; "<AssertPlaceHolder>" ; } closeAndGetHandle ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertTrue ( ( handle == null ) )
testGetProperties ( ) { java . util . Map < java . lang . String , java . lang . String > properties = new java . util . HashMap ( ) ; properties . put ( "p1" , "v1" ) ; properties . put ( "p2" , "v2" ) ; org . apache . ambari . server . view . events . EventImpl event = org . apache . ambari . server . view . events . EventImplTest . getEvent ( "MyEvent" , properties , org . apache . ambari . server . view . events . EventImplTest . view_xml ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
org . junit . Assert . assertEquals ( properties , event . getProperties ( ) )
givenValidJsonStringWithSingleQuotesThenSuccessfullyRemoveEmpty ( ) { jsonStringInput = "{'removed1':'',<sp>'removed2':[],<sp>'removed3':null,<sp>'expected':'value'}<sp>" ; expectedJsonStringOutput = "{'expected':'value'}" ; actualJsonStringOutput = jsonServiceUnderTest . removeEmptyElementsJson ( jsonStringInput ) ; "<AssertPlaceHolder>" ; } removeEmptyElementsJson ( java . lang . String ) { java . lang . String normalizedJson = json . trim ( ) ; char wrappingQuote = retrieveWrappingQuoteTypeOfJsonMemberNames ( normalizedJson ) ; java . util . Map < java . lang . String , java . lang . Object > jsonMap ; try { parseJsonForInconsistencies ( normalizedJson ) ; jsonMap = com . jayway . jsonpath . JsonPath . read ( normalizedJson , "$" ) ; } catch ( io . cloudslang . content . json . services . com . jayway | io . cloudslang . content . json . services . com . google ije ) { throw new io . cloudslang . content . json . exceptions . RemoveEmptyElementException ( ije ) ; } removeEmptyElementsFromMap ( jsonMap ) ; return generateResultingJsonString ( wrappingQuote , jsonMap ) ; }
org . junit . Assert . assertEquals ( expectedJsonStringOutput , actualJsonStringOutput )
testRepositoryNotFound_Smart ( ) { org . eclipse . jgit . transport . URIish uri = toURIish ( "/smart.none/not-found" ) ; org . eclipse . jgit . lib . Repository dst = createBareRepository ( ) ; try ( org . eclipse . jgit . transport . Transport t = org . eclipse . jgit . transport . Transport . open ( dst , uri ) ) { try { t . openFetch ( ) ; org . junit . Assert . fail ( "connection<sp>opened<sp>to<sp>not<sp>found<sp>repository" ) ; } catch ( org . eclipse . jgit . errors . NoRemoteRepositoryException err ) { java . lang . String exp = ( ( uri + ":<sp>" ) + uri ) + "/info/refs?service=git-upload-pack<sp>not<sp>found" ; "<AssertPlaceHolder>" ; } } } getMessage ( ) { return java . text . MessageFormat . format ( org . eclipse . jgit . internal . JGitText . get ( ) . commandRejectedByHook , hookName , super . getMessage ( ) ) ; }
org . junit . Assert . assertEquals ( exp , err . getMessage ( ) )
testSimpleInEquality3 ( ) { com . github . davidmoten . rtree . geometry . Rectangle r = com . github . davidmoten . rtree . geometry . Geometries . rectangle ( 0 , 0 , 2 , 1 ) ; com . github . davidmoten . rtree . geometry . Rectangle r2 = com . github . davidmoten . rtree . geometry . Geometries . rectangle ( 0 , 1 , 2 , 1 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { @ com . github . davidmoten . rtree . internal . SuppressWarnings ( "rawtypes" ) com . github . davidmoten . guavamini . Optional < com . github . davidmoten . rtree . internal . EntryDefault > other = com . github . davidmoten . rtree . internal . util . ObjectsHelper . asClass ( obj , com . github . davidmoten . rtree . internal . EntryDefault . class ) ; if ( other . isPresent ( ) ) { return ( com . github . davidmoten . guavamini . Objects . equal ( value , other . get ( ) . value ) ) && ( com . github . davidmoten . guavamini . Objects . equal ( geometry , other . get ( ) . geometry ) ) ; } else return false ; }
org . junit . Assert . assertFalse ( r . equals ( r2 ) )
testRegressionEvalTimeSeriesSplit ( ) { org . nd4j . linalg . api . ndarray . INDArray out1 = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 3 , 5 , 20 } ) ; org . nd4j . linalg . api . ndarray . INDArray outSub1 = out1 . get ( all ( ) , all ( ) , interval ( 0 , 10 ) ) ; org . nd4j . linalg . api . ndarray . INDArray outSub2 = out1 . get ( all ( ) , all ( ) , interval ( 10 , 20 ) ) ; org . nd4j . linalg . api . ndarray . INDArray label1 = org . nd4j . linalg . factory . Nd4j . rand ( new int [ ] { 3 , 5 , 20 } ) ; org . nd4j . linalg . api . ndarray . INDArray labelSub1 = label1 . get ( all ( ) , all ( ) , interval ( 0 , 10 ) ) ; org . nd4j . linalg . api . ndarray . INDArray labelSub2 = label1 . get ( all ( ) , all ( ) , interval ( 10 , 20 ) ) ; org . deeplearning4j . eval . RegressionEvaluation e1 = new org . deeplearning4j . eval . RegressionEvaluation ( ) ; org . deeplearning4j . eval . RegressionEvaluation e2 = new org . deeplearning4j . eval . RegressionEvaluation ( ) ; e1 . eval ( label1 , out1 ) ; e2 . eval ( labelSub1 , outSub1 ) ; e2 . eval ( labelSub2 , outSub2 ) ; "<AssertPlaceHolder>" ; } eval ( org . nd4j . linalg . api . ndarray . INDArray , org . nd4j . linalg . api . ndarray . INDArray ) { eval ( labels , predictions , ( ( org . nd4j . linalg . api . ndarray . INDArray ) ( null ) ) ) ; }
org . junit . Assert . assertEquals ( e1 , e2 )
test8populateRangerAccessTypeDefToXXNullValue ( ) { org . apache . ranger . plugin . model . RangerServiceDef . RangerAccessTypeDef rangerAccessTypeDefObj = null ; org . apache . ranger . entity . XXAccessTypeDef accessTypeDefObj = null ; org . apache . ranger . entity . XXServiceDef serviceDefObj = null ; org . mockito . Mockito . when ( restErrorUtil . createRESTException ( "RangerServiceDef<sp>cannot<sp>be<sp>null." , MessageEnums . DATA_NOT_FOUND ) ) . thenThrow ( new javax . ws . rs . WebApplicationException ( ) ) ; thrown . expect ( javax . ws . rs . WebApplicationException . class ) ; org . apache . ranger . entity . XXAccessTypeDef dbAccessTypeDef = rangerServiceDefService . populateRangerAccessTypeDefToXX ( rangerAccessTypeDefObj , accessTypeDefObj , serviceDefObj , 1 ) ; "<AssertPlaceHolder>" ; } populateRangerAccessTypeDefToXX ( org . apache . ranger . plugin . model . RangerServiceDef . RangerAccessTypeDef , org . apache . ranger . service . XXAccessTypeDef , org . apache . ranger . service . XXServiceDef , int ) { if ( serviceDef == null ) { org . apache . ranger . service . RangerServiceDefServiceBase . LOG . error ( "RangerServiceDefServiceBase.populateRangerAccessTypeDefToXX,<sp>serviceDef<sp>can<sp>not<sp>be<sp>null" ) ; throw restErrorUtil . createRESTException ( "RangerServiceDef<sp>cannot<sp>be<sp>null." , MessageEnums . DATA_NOT_FOUND ) ; } xObj = rangerAuditFields . populateAuditFields ( xObj , serviceDef ) ; xObj . setDefid ( serviceDef . getId ( ) ) ; xObj . setItemId ( vObj . getItemId ( ) ) ; xObj . setName ( vObj . getName ( ) ) ; xObj . setLabel ( vObj . getLabel ( ) ) ; xObj . setRbkeylabel ( vObj . getRbKeyLabel ( ) ) ; xObj . setOrder ( AppConstants . DEFAULT_SORT_ORDER ) ; return xObj ; }
org . junit . Assert . assertNull ( dbAccessTypeDef )
testFetchByPrimaryKeyExisting ( ) { com . liferay . expando . kernel . model . ExpandoColumn newExpandoColumn = addExpandoColumn ( ) ; com . liferay . expando . kernel . model . ExpandoColumn existingExpandoColumn = _persistence . fetchByPrimaryKey ( newExpandoColumn . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertEquals ( existingExpandoColumn , newExpandoColumn )
testIdentityToStringAppendable ( ) { final java . lang . Integer i = java . lang . Integer . valueOf ( 121 ) ; final java . lang . String expected = "java.lang.Integer@" + ( java . lang . Integer . toHexString ( java . lang . System . identityHashCode ( i ) ) ) ; try { final java . lang . Appendable appendable = new java . lang . StringBuilder ( ) ; org . apache . commons . lang3 . ObjectUtils . identityToString ( appendable , i ) ; "<AssertPlaceHolder>" ; } catch ( java . io . IOException ex ) { org . junit . Assert . fail ( "IOException<sp>unexpected" ) ; } try { org . apache . commons . lang3 . ObjectUtils . identityToString ( ( ( java . lang . Appendable ) ( null ) ) , "tmp" ) ; org . junit . Assert . fail ( "NullPointerException<sp>expected" ) ; } catch ( final java . lang . NullPointerException npe ) { } catch ( java . io . IOException ex ) { } try { org . apache . commons . lang3 . ObjectUtils . identityToString ( ( ( java . lang . Appendable ) ( new java . lang . StringBuilder ( ) ) ) , null ) ; org . junit . Assert . fail ( "NullPointerException<sp>expected" ) ; } catch ( final java . lang . NullPointerException npe ) { } catch ( java . io . IOException ex ) { } } 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 ( expected , appendable . toString ( ) )
testGetBranchNoBranch ( ) { setUpTestRepository ( ) ; java . io . File root = new java . io . File ( repository . getSourceRoot ( ) , "cvs_test/cvsrepo" ) ; org . opengrok . indexer . history . CVSRepository cvsrepo = ( ( org . opengrok . indexer . history . CVSRepository ) ( org . opengrok . indexer . history . RepositoryFactory . getRepository ( root ) ) ) ; "<AssertPlaceHolder>" ; } getBranch ( ) { return branch ; }
org . junit . Assert . assertEquals ( null , cvsrepo . getBranch ( ) )
convert_NULL_REFERENCES_EXTERNAL_IDS ( ) { eu . dnetlib . iis . transformers . metadatamerger . schemas . ExtractedDocumentMetadataMergedWithOriginal docMetadata = baseDocMetadataBuilder . setReferences ( com . google . common . collect . Lists . newArrayList ( buildReferenceMetadata ( 24 , null ) ) ) . build ( ) ; eu . dnetlib . iis . citationmatching . direct . schemas . DocumentMetadata retDocDirectCitationMetadata = converter . convert ( docMetadata ) ; eu . dnetlib . iis . citationmatching . direct . schemas . DocumentMetadata expectedDocDirectCitationMetadata = baseDocDirectCitationMetadataBuilder . setReferences ( com . google . common . collect . Lists . newArrayList ( ) ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { org . jdom . Element affNode = createAffNode ( ) ; eu . dnetlib . iis . common . importer . CermineAffiliation cAff = builder . build ( affNode ) ; org . junit . Assert . assertEquals ( "PolandInterdyscyplinarne<sp>Centrum<sp>ModelowaniaUniwersytet<sp>Warszawski<sp>Prosta<sp>69,<sp>Warszawa" , cAff . getRawText ( ) ) ; org . junit . Assert . assertEquals ( "Poland" , cAff . getCountryName ( ) ) ; org . junit . Assert . assertEquals ( "PL" , cAff . getCountryCode ( ) ) ; org . junit . Assert . assertEquals ( "Prosta<sp>69,<sp>Warszawa" , cAff . getAddress ( ) ) ; org . junit . Assert . assertEquals ( "Interdyscyplinarne<sp>Centrum<sp>Modelowania,<sp>Uniwersytet<sp>Warszawski" , cAff . getInstitution ( ) ) ; }
org . junit . Assert . assertEquals ( expectedDocDirectCitationMetadata , retDocDirectCitationMetadata )
testGetParametersWithDefaultEntityAndDisabledSecurity ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . enrolment . Enrolment entity = new org . lnu . is . domain . enrolment . Enrolment ( ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
org . junit . Assert . assertEquals ( expected , actual )
testGridInfosWithProjParamsAreNotEqual ( ) { org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfo gridInfo1 = new org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfo ( "testName" , ( - 120 ) , 50 , ( - 100 ) , 40 , "Sinusoidal" ) ; gridInfo1 . setProjectionParameter ( org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfoTest . PROJ_PARAMS ) ; org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfo gridInfo2 = new org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfo ( "testName" , ( - 120 ) , 50 , ( - 100 ) , 40 , "Sinusoidal" ) ; double [ ] projParams2 = org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfoTest . PROJ_PARAMS . clone ( ) ; projParams2 [ 4 ] = 42.42 ; gridInfo2 . setProjectionParameter ( projParams2 ) ; "<AssertPlaceHolder>" ; } equalProjections ( org . esa . beam . dataio . netcdf . metadata . profiles . hdfeos . HdfEosGridInfo ) { if ( ( this ) == that ) return true ; if ( ( java . lang . Double . compare ( that . lowerRightLat , lowerRightLat ) ) != 0 ) return false ; if ( ( java . lang . Double . compare ( that . lowerRightLon , lowerRightLon ) ) != 0 ) return false ; if ( ( java . lang . Double . compare ( that . upperLeftLat , upperLeftLat ) ) != 0 ) return false ; if ( ( java . lang . Double . compare ( that . upperLeftLon , upperLeftLon ) ) != 0 ) return false ; if ( ! ( java . util . Arrays . equals ( that . projectionParameter , projectionParameter ) ) ) return false ; if ( ! ( projection . equals ( that . projection ) ) ) return false ; return true ; }
org . junit . Assert . assertFalse ( gridInfo1 . equalProjections ( gridInfo2 ) )
givenRoleViewer_whenCallGetSystemYear_returnAccessDenied ( ) { java . lang . String systemYear = systemService . getSystemYear ( ) ; "<AssertPlaceHolder>" ; } getSystemYear ( ) { return "2017" ; }
org . junit . Assert . assertEquals ( "2017" , systemYear )
testDetectMediaTypesWithInputStream ( ) { for ( edu . illinois . library . cantaloupe . image . Format format : edu . illinois . library . cantaloupe . image . MediaTypeTest . files . keySet ( ) ) { edu . illinois . library . cantaloupe . image . MediaType preferredMediaType = format . getPreferredMediaType ( ) ; java . nio . file . Path file = edu . illinois . library . cantaloupe . image . MediaTypeTest . files . get ( format ) ; try ( java . io . InputStream is = new java . io . BufferedInputStream ( java . nio . file . Files . newInputStream ( file ) ) ) { boolean result = edu . illinois . library . cantaloupe . image . MediaType . detectMediaTypes ( is ) . contains ( preferredMediaType ) ; if ( ! result ) { System . err . println ( ( ( ( ( "detection<sp>failed:" + "\tformat:<sp>" ) + format ) + "\tfile:<sp>" ) + ( file . getFileName ( ) ) ) ) ; } if ( ! ( java . util . Set . of ( "avi" , "webm" ) . contains ( file . getFileName ( ) . toString ( ) ) ) ) { "<AssertPlaceHolder>" ; } } } } toString ( ) { return ( factor ) + "" ; }
org . junit . Assert . assertTrue ( result )
testGetGroupCalendarResourceDoesNotCreateLiveCalendarResource ( ) { com . liferay . portal . kernel . test . util . GroupTestUtil . enableLocalStaging ( _group ) ; com . liferay . portal . kernel . service . ServiceContext serviceContext = new com . liferay . portal . kernel . service . ServiceContext ( ) ; com . liferay . calendar . model . CalendarResource calendarResource = com . liferay . calendar . util . CalendarResourceUtil . getGroupCalendarResource ( _group . getGroupId ( ) , serviceContext ) ; "<AssertPlaceHolder>" ; } getGroupId ( ) { return _groupId ; }
org . junit . Assert . assertNull ( calendarResource )
testTimeoutLessThanLongMaxValueWithDefaultTimeoutRetries ( ) { org . opennms . netmgt . icmp . proxy . PingSweepRequestDTO request = new org . opennms . netmgt . icmp . proxy . PingSweepRequestDTO ( ) ; request . addIpRange ( new org . opennms . netmgt . icmp . proxy . IPRangeDTO ( "127.0.0.1" , "127.5.118.25" , org . opennms . netmgt . icmp . PingConstants . DEFAULT_TIMEOUT , org . opennms . netmgt . icmp . PingConstants . DEFAULT_RETRIES ) ) ; "<AssertPlaceHolder>" ; } getTimeToLiveMs ( ) { return ( ( 1 + ( retries ) ) * ( timeout ) ) * 2 ; }
org . junit . Assert . assertTrue ( ( ( Long . MAX_VALUE ) > ( request . getTimeToLiveMs ( ) ) ) )
testInequalityToNull ( ) { com . github . davidmoten . rtree . geometry . Point p1 = com . github . davidmoten . rtree . geometry . Geometries . point ( 1 , 2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { com . github . davidmoten . guavamini . Optional < com . github . davidmoten . rtree . geometry . internal . RectangleDouble > other = com . github . davidmoten . rtree . internal . util . ObjectsHelper . asClass ( obj , com . github . davidmoten . rtree . geometry . internal . RectangleDouble . class ) ; if ( other . isPresent ( ) ) { return ( ( ( com . github . davidmoten . guavamini . Objects . equal ( x1 , other . get ( ) . x1 ) ) && ( com . github . davidmoten . guavamini . Objects . equal ( x2 , other . get ( ) . x2 ) ) ) && ( com . github . davidmoten . guavamini . Objects . equal ( y1 , other . get ( ) . y1 ) ) ) && ( com . github . davidmoten . guavamini . Objects . equal ( y2 , other . get ( ) . y2 ) ) ; } else return false ; }
org . junit . Assert . assertFalse ( p1 . equals ( null ) )
testCanonicalURLWithFriendlyURL ( ) { java . lang . String portalDomain = "localhost" ; java . lang . String completeURL = generateURL ( portalDomain , "8080" , StringPool . BLANK , _group . getFriendlyURL ( ) , ( ( com . liferay . portal . kernel . util . Portal . FRIENDLY_URL_SEPARATOR ) + "content-name" ) , false ) ; java . lang . String expectedURL = completeURL ; completeURL = com . liferay . portal . kernel . util . HttpUtil . addParameter ( completeURL , "_ga" , "2.237928582.786466685.1515402734-1365236376" ) ; com . liferay . portal . kernel . theme . ThemeDisplay themeDisplay = createThemeDisplay ( portalDomain , _group , 8080 , false ) ; java . lang . String canonicalURL = com . liferay . portal . kernel . util . PortalUtil . getCanonicalURL ( completeURL , themeDisplay , _layout1 , false , false ) ; "<AssertPlaceHolder>" ; } getCanonicalURL ( java . lang . String , com . liferay . portal . kernel . theme . ThemeDisplay , com . liferay . portal . kernel . model . Layout , boolean , boolean ) { return com . liferay . portal . kernel . util . PortalUtil . getPortal ( ) . getCanonicalURL ( completeURL , themeDisplay , layout , forceLayoutFriendlyURL , includeQueryString ) ; }
org . junit . Assert . assertEquals ( expectedURL , canonicalURL )
testF ( ) { org . openscience . cdk . isomorphism . matchers . Expr expr = new org . openscience . cdk . isomorphism . matchers . Expr ( FALSE ) ; org . openscience . cdk . interfaces . IAtom atom = mock ( org . openscience . cdk . interfaces . IAtom . class ) ; "<AssertPlaceHolder>" ; } matches ( org . openscience . cdk . interfaces . IAtomContainer ) { return matches ( atomContainer , true ) ; }
org . junit . Assert . assertFalse ( expr . matches ( atom ) )
tesBerichtSyntaxException ( ) { final java . lang . String berichtOrigineel = org . apache . commons . io . IOUtils . toString ( nl . moderniseringgba . isc . esb . message . brp . impl . VoornaamswijzingingVerzoekBerichtTest . class . getResourceAsStream ( "voornaamswijzigingVerzoekBerichtSyntaxExceptionBericht.xml" ) ) ; final nl . moderniseringgba . isc . esb . message . brp . BrpBericht brpBericht = factory . getBericht ( berichtOrigineel ) ; "<AssertPlaceHolder>" ; } getBericht ( java . lang . String ) { try { final javax . xml . bind . JAXBElement < ? > element = NotificatieXml . SINGLETON . stringToElement ( berichtAlsString ) ; return maakBericht ( element . getValue ( ) ) ; } catch ( final javax . xml . bind . JAXBException e ) { nl . bzk . migratiebrp . bericht . model . notificatie . factory . NotificatieBerichtFactory . LOG . warn ( "Verwerken<sp>bericht<sp>mislukt" , e ) ; return new nl . bzk . migratiebrp . bericht . model . notificatie . impl . OngeldigBericht ( berichtAlsString , e . getMessage ( ) ) ; } }
org . junit . Assert . assertTrue ( ( brpBericht instanceof nl . moderniseringgba . isc . esb . message . brp . impl . OngeldigBericht ) )
testCorruptChunkedInputStreamTruncatedCRLF ( ) { final java . lang . String s = "5\r\n01234" ; final org . apache . hc . core5 . http . io . SessionInputBuffer inBuffer = new org . apache . hc . core5 . http . impl . io . SessionInputBufferImpl ( 16 ) ; final java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( s . getBytes ( StandardCharsets . ISO_8859_1 ) ) ; final org . apache . hc . core5 . http . impl . io . ChunkedInputStream in = new org . apache . hc . core5 . http . impl . io . ChunkedInputStream ( inBuffer , inputStream ) ; final byte [ ] tmp = new byte [ 5 ] ; "<AssertPlaceHolder>" ; in . read ( ) ; in . close ( ) ; } read ( byte [ ] ) { final int bytesRead = in . read ( b ) ; if ( bytesRead != ( - 1 ) ) { wire . input ( b , 0 , bytesRead ) ; } return bytesRead ; }
org . junit . Assert . assertEquals ( 5 , in . read ( tmp ) )
testCreateCustomTLVValue ( ) { byte [ ] tlv = org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLV . createCustomTLVValue ( org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLVTest . CUSTOM_TLV_ULTIMATE ) ; byte [ ] expectedCustomTlv = com . google . common . primitives . Bytes . concat ( new byte [ ] { 0 , 38 , ( ( byte ) ( 225 ) ) , 0 } , org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLVTest . CUSTOM_TLV_ULTIMATE_BIN ) ; com . google . common . io . BaseEncoding be = com . google . common . io . BaseEncoding . base16 ( ) . withSeparator ( "<sp>" , 2 ) . lowerCase ( ) ; org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLVTest . LOG . debug ( "expected:<sp>{}" , be . encode ( expectedCustomTlv ) ) ; org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLVTest . LOG . debug ( "actual<sp>:<sp>{}" , be . encode ( tlv ) ) ; "<AssertPlaceHolder>" ; } createCustomTLVValue ( java . lang . String ) { byte [ ] customByteArray = customString . getBytes ( java . nio . charset . Charset . defaultCharset ( ) ) ; return org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLV . createCustomTLVValue ( org . opendaylight . openflowplugin . libraries . liblldp . LLDPTLV . CUSTOM_TLV_SUB_TYPE_NODE_CONNECTOR_ID , customByteArray ) ; }
org . junit . Assert . assertArrayEquals ( expectedCustomTlv , tlv )
getServiceParameterList_nullSubscription ( ) { org . oscm . domobjects . Subscription subscription = null ; java . util . List < org . oscm . provisioning . data . ServiceParameter > parameterList = org . oscm . applicationservice . filter . ParameterFilter . getServiceParameterList ( subscription , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , parameterList . size ( ) )
testGetStaticLabel ( ) { System . out . println ( "getStaticLabel" ) ; kg . apc . jmeter . vizualizers . DbMonGui instance = new kg . apc . jmeter . vizualizers . DbMonGui ( ) ; 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 ) )
runsForEverySingleArgumentOfIterable ( ) { org . junit . runner . Result result = org . junit . runner . JUnitCore . runClasses ( org . junit . tests . running . classes . ParameterizedTestTest . SingleArgumentTestWithIterable . class ) ; "<AssertPlaceHolder>" ; } getRunCount ( ) { return count . get ( ) ; }
org . junit . Assert . assertEquals ( 2 , result . getRunCount ( ) )
test_parse_returnvalue_invoke ( ) { java . lang . String s = "$a.x().f('m',<sp>false)" ; org . nutz . ioc . java . ChainNode cn = org . nutz . ioc . java . ChainParsingTest . N ( s ) ; "<AssertPlaceHolder>" ; } toString ( ) { return toSql ( null ) ; }
org . junit . Assert . assertEquals ( s , cn . toString ( ) )
resolveAfterThenHandlerAdded ( ) { final com . b2international . snowowl . core . events . util . Promise < java . lang . Object > p = new com . b2international . snowowl . core . events . util . Promise ( ) ; final java . util . concurrent . CountDownLatch latch = new java . util . concurrent . CountDownLatch ( 1 ) ; p . then ( new com . b2international . commons . collections . Procedure < java . lang . Object > ( ) { @ com . b2international . snowowl . core . events . util . Override protected void doApply ( java . lang . Object input ) { "<AssertPlaceHolder>" ; latch . countDown ( ) ; } } ) ; p . resolve ( resolution ) ; latch . await ( 100 , TimeUnit . MILLISECONDS ) ; } doApply ( T ) { if ( deferredResult . isSetOrExpired ( ) ) { com . b2international . snowowl . api . rest . util . DeferredResults . LOG . warn ( "Deferred<sp>result<sp>is<sp>already<sp>set<sp>or<sp>expired,<sp>could<sp>not<sp>deliver<sp>result<sp>{}." , input ) ; } else { deferredResult . setResult ( input ) ; } }
org . junit . Assert . assertEquals ( resolution , input )
getLast ( ) { org . eclipse . collections . api . list . ImmutableList < java . lang . Integer > integers = this . classUnderTest ( ) ; "<AssertPlaceHolder>" ; } getLast ( ) { return null ; }
org . junit . Assert . assertNull ( integers . getLast ( ) )
testGetParent ( ) { org . apache . jena . tools . schemagen . SchemagenOptions so = new org . apache . jena . tools . schemagen . SchemagenOptions ( ) ; "<AssertPlaceHolder>" ; } getParent ( ) { return parent ; }
org . junit . Assert . assertNull ( so . getParent ( ) )
testMessageBoundaryEventMessageCorrelation ( ) { org . camunda . bpm . model . bpmn . BpmnModelInstance model = org . camunda . bpm . model . bpmn . Bpmn . createExecutableProcess ( "Process_1" ) . startEvent ( ) . subProcess ( "SubProcess_1" ) . embeddedSubProcess ( ) . startEvent ( ) . userTask ( "UserTask_1" ) . camundaInputParameter ( "localVar" , "${loopVar}" ) . camundaInputParameter ( "newValue" 3 , "someValue" ) . boundaryEvent ( "newValue" 2 ) . message ( org . camunda . bpm . engine . test . api . runtime . MessageCorrelationByLocalVariablesTest . TEST_MESSAGE_NAME ) . userTask ( "UserTask_2" ) . endEvent ( ) . subProcessDone ( ) . multiInstance ( ) . camundaCollection ( "${vars}" ) . camundaElementVariable ( "newValue" 1 ) . multiInstanceDone ( ) . endEvent ( ) . done ( ) ; testHelper . deploy ( model ) ; java . util . Map < java . lang . String , java . lang . Object > variables = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; variables . put ( "newValue" 0 , java . util . Arrays . asList ( 1 , 2 , 3 ) ) ; org . camunda . bpm . engine . runtime . ProcessInstance processInstance = engineRule . getRuntimeService ( ) . startProcessInstanceByKey ( "Process_1" , variables ) ; java . lang . String messageName = org . camunda . bpm . engine . test . api . runtime . MessageCorrelationByLocalVariablesTest . TEST_MESSAGE_NAME ; java . util . Map < java . lang . String , java . lang . Object > correlationKeys = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; int correlationKey = 1 ; correlationKeys . put ( "localVar" , correlationKey ) ; correlationKeys . put ( "newValue" 3 , "someValue" ) ; java . util . Map < java . lang . String , java . lang . Object > messagePayload = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; messagePayload . put ( "newVar" , "newValue" ) ; org . camunda . bpm . engine . runtime . MessageCorrelationResult messageCorrelationResult = engineRule . getRuntimeService ( ) . createMessageCorrelation ( messageName ) . localVariablesEqual ( correlationKeys ) . setVariables ( messagePayload ) . correlateWithResult ( ) ; checkExecutionMessageCorrelationResult ( messageCorrelationResult , processInstance , "UserTask_1" ) ; java . util . List < org . camunda . bpm . engine . runtime . Execution > uncorrelatedExecutions = engineRule . getRuntimeService ( ) . createExecutionQuery ( ) . activityId ( "UserTask_1" ) . list ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
org . junit . Assert . assertEquals ( 2 , uncorrelatedExecutions . size ( ) )
asBoolean ( ) { org . onosproject . cfg . ConfigProperty p = org . onosproject . cfg . ConfigProperty . defineProperty ( "foo" , org . onosproject . cfg . BOOLEAN , "true" , "Foo<sp>Prop" ) ; validate ( p , "foo" , org . onosproject . cfg . BOOLEAN , "true" , "true" ) ; "<AssertPlaceHolder>" ; } asBoolean ( ) { org . onosproject . cfg . ConfigProperty p = org . onosproject . cfg . ConfigProperty . defineProperty ( "foo" , org . onosproject . cfg . BOOLEAN , "true" , "Foo<sp>Prop" ) ; validate ( p , "foo" , org . onosproject . cfg . BOOLEAN , "true" , "true" ) ; org . junit . Assert . assertEquals ( "incorrect<sp>value" , true , p . asBoolean ( ) ) ; }
org . junit . Assert . assertEquals ( "incorrect<sp>value" , true , p . asBoolean ( ) )
whenCallEnsureThatStateOverloadedShouldThrowIllegalStateExceptionUsingSuppliedMessage ( ) { try { org . apache . isis . core . commons . ensure . Ensure . ensureThatState ( "foo" , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . nullValue ( ) ) , "my<sp>message" ) ; org . junit . Assert . fail ( ) ; } catch ( final java . lang . IllegalStateException ex ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertThat ( ex . getMessage ( ) , org . hamcrest . CoreMatchers . is ( "my<sp>message" ) )
testPreExecute ( ) { javax . servlet . http . HttpServletRequest request = new org . oscm . ui . stubs . HttpServletRequestStub ( ) ; "<AssertPlaceHolder>" ; } preExecute ( javax . servlet . http . HttpServletRequest ) { return request ; }
org . junit . Assert . assertEquals ( request , server . preExecute ( request ) )
setValue ( ) { com . vaadin . v7 . data . util . MethodProperty < java . lang . String > mp = new com . vaadin . v7 . data . util . MethodProperty < java . lang . String > ( testObject , "street" ) ; mp . setValue ( "Foo<sp>street" ) ; "<AssertPlaceHolder>" ; } getStreet ( ) { return street ; }
org . junit . Assert . assertEquals ( "Foo<sp>street" , testObject . getStreet ( ) )
testPoint ( ) { final java . lang . String json = "{<sp>'type':<sp>'Point',<sp>'coordinates':<sp>[5.1,6.2]<sp>}" ; final com . allanbank . mongodb . bson . Document jsonDoc = com . allanbank . mongodb . bson . json . Json . parse ( json ) ; final com . allanbank . mongodb . bson . Document geoDoc = com . allanbank . mongodb . builder . GeoJson . point ( com . allanbank . mongodb . builder . GeoJson . p ( 5.1 , 6.2 ) ) ; "<AssertPlaceHolder>" ; } p ( double , double ) { return new java . awt . geom . Point2D . Double ( x , y ) ; }
org . junit . Assert . assertEquals ( jsonDoc , geoDoc )
whenLog10IntegerValues_shouldLog10ThemAndReturnTheResultForCeilingRounding ( ) { int result = com . google . common . math . IntMath . log10 ( 30 , RoundingMode . CEILING ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 2 , result )
testRethrow_Throwable ( ) { java . lang . Throwable throwable = new java . lang . Throwable ( ) ; try { throw com . hazelcast . simulator . tests . helpers . HazelcastTestUtils . rethrow ( throwable ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } getCause ( ) { return cause ; }
org . junit . Assert . assertEquals ( throwable , e . getCause ( ) )
testOverrideRunMethodAndCallNewMethod ( ) { hudson . model . Run run = mock ( hudson . model . Run . class ) ; hudson . model . Node node = mock ( hudson . model . Node . class ) ; hudson . model . EnvironmentContributingActionTest . OverrideRun overrideRun = new hudson . model . EnvironmentContributingActionTest . OverrideRun ( ) ; overrideRun . buildEnvironment ( run , envVars ) ; "<AssertPlaceHolder>" ; } wasNewMethodCalled ( ) { return wasCalled ; }
org . junit . Assert . assertTrue ( overrideRun . wasNewMethodCalled ( ) )
testVoorbeeld3 ( ) { final java . util . List < nl . bzk . migratiebrp . conversie . model . lo3 . Lo3Stapel < nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3AfnemersindicatieInhoud > > afnemersIndicatieStapels = new java . util . ArrayList ( ) ; afnemersIndicatieStapels . add ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Stapel ( maakLo3Categorie ( "000007" , 20010101 , 0 , 0 ) , maakLo3Categorie ( "000007" , 19960101 , 0 , 1 ) , maakLo3Categorie ( "000007" , 19930101 , 0 , 2 ) ) ) ; afnemersIndicatieStapels . add ( nl . bzk . migratiebrp . conversie . model . proces . brpnaarlo3 . Lo3StapelHelper . lo3Stapel ( maakLo3Categorie ( "000007" , 19950101 , 1 , 0 ) , maakLo3Categorie ( "000007" , 19920101 , 1 , 1 ) ) ) ; final nl . bzk . migratiebrp . conversie . model . brp . autorisatie . BrpAfnemersindicaties resultaat = test ( "VOORBEELD-3" , new nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3Afnemersindicatie ( "4862398753" , afnemersIndicatieStapels ) ) ; "<AssertPlaceHolder>" ; } getAfnemersindicaties ( ) { return afnemersindicatiesAntwoordType . getAfnemersindicatie ( ) ; }
org . junit . Assert . assertEquals ( 1 , resultaat . getAfnemersindicaties ( ) . size ( ) )
testBlockBlobCompactionClose ( ) { org . apache . hadoop . fs . Path path = getBlobPathWithTestName ( org . apache . hadoop . fs . azure . ITestOutputStreamSemantics . BLOCK_BLOB_COMPACTION_DIR ) ; try ( org . apache . hadoop . fs . FSDataOutputStream stream = fs . create ( path ) ) { "<AssertPlaceHolder>" ; byte [ ] buffer = getRandomBytes ( ) ; stream . write ( buffer ) ; stream . close ( ) ; validate ( path , buffer , true ) ; } } isBlockBlobAppendStreamWrapper ( org . apache . hadoop . fs . FSDataOutputStream ) { return ( ( ( org . apache . hadoop . fs . azure . SyncableDataOutputStream ) ( ( ( org . apache . hadoop . fs . azure . NativeAzureFileSystem . NativeAzureFsOutputStream ) ( stream . getWrappedStream ( ) ) ) . getOutStream ( ) ) ) . getOutStream ( ) ) instanceof org . apache . hadoop . fs . azure . BlockBlobAppendStream ; }
org . junit . Assert . assertTrue ( isBlockBlobAppendStreamWrapper ( stream ) )
testDurationComparator ( ) { paths . sort ( new org . opentripplanner . routing . impl . DurationComparator ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( paths , java . util . Arrays . asList ( a , c , b ) )
testGetColorFlag ( ) { System . out . println ( "getColorFlag" ) ; kg . apc . jmeter . reporters . LoadosophiaUploader instance = new kg . apc . jmeter . reporters . LoadosophiaUploaderTest . LoadosophiaUploaderEmul ( ) ; java . lang . String expResult = "" ; java . lang . String result = instance . getColorFlag ( ) ; "<AssertPlaceHolder>" ; } getColorFlag ( ) { return getPropertyAsString ( kg . apc . jmeter . reporters . LoadosophiaUploader . COLOR ) ; }
org . junit . Assert . assertEquals ( expResult , result )
ttrue ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( true )
unescapeJSON_3 ( ) { java . lang . String input = "\\/" ; java . lang . String unescaped = org . oscm . json . EscapeUtils . unescapeJSON ( input ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( "/" , unescaped )
testReplaceThenDeleteMiddleIndex ( ) { org . antlr . v4 . tool . LexerGrammar g = new org . antlr . v4 . tool . LexerGrammar ( ( "lexer<sp>grammar<sp>T;\n" + ( ( "A<sp>:<sp>\'a\';\n" + "B<sp>:<sp>\'b\';\n" ) + "C<sp>:<sp>\'c\';\n" ) ) ) ; java . lang . String input = "abc" ; org . antlr . v4 . runtime . LexerInterpreter lexEngine = g . createLexerInterpreter ( new org . antlr . v4 . runtime . ANTLRInputStream ( input ) ) ; org . antlr . v4 . runtime . CommonTokenStream stream = new org . antlr . v4 . runtime . CommonTokenStream ( lexEngine ) ; stream . fill ( ) ; org . antlr . v4 . runtime . TokenStreamRewriter tokens = new org . antlr . v4 . runtime . TokenStreamRewriter ( stream ) ; tokens . replace ( 1 , "x" ) ; tokens . delete ( 1 ) ; java . lang . String result = tokens . getText ( ) ; java . lang . String expecting = "ac" ; "<AssertPlaceHolder>" ; } getText ( ) { return delegate . getText ( ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testShow ( ) { org . kie . workbench . common . stunner . lienzo . toolbox . items . tooltip . ToolboxTextTooltip cascade = tested . show ( ) ; "<AssertPlaceHolder>" ; verify ( delegate , times ( 1 ) ) . show ( ) ; } show ( ) { getElement ( ) . getClassList ( ) . add ( org . kie . workbench . common . dmn . client . widgets . grid . controls . list . ListSelectorViewImpl . OPEN ) ; }
org . junit . Assert . assertEquals ( tested , cascade )
testGetTaggedHistogram ( ) { tags . put ( "a" , "b" ) ; tags . put ( "c" , "d" ) ; java . lang . String name = "foo" ; com . github . sps . metrics . TaggedHistogram counter = registry . taggedHistogram ( mock ( com . codahale . metrics . Reservoir . class ) , name , tags ) ; java . util . Map < java . lang . String , java . lang . String > searchTags = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; searchTags . put ( "a" , "b" ) ; com . github . sps . metrics . TaggedHistogram actual = registry . getTaggedHistogram ( "foo" , searchTags ) ; "<AssertPlaceHolder>" ; } getTaggedHistogram ( java . lang . String , java . util . Map ) { return ( ( com . github . sps . metrics . TaggedHistogram ) ( getTaggedMetric ( name , searchTags ) ) ) ; }
org . junit . Assert . assertEquals ( counter , actual )
shouldTrimSETInsteadOfCOMMAForBothConditions ( ) { final java . lang . String expected = "UPDATE<sp>BLOG<sp>SET<sp>ID<sp>=<sp>?,<sp>NAME<sp>=<sp>?" ; org . apache . ibatis . scripting . xmltags . DynamicSqlSource source = createDynamicSqlSource ( new org . apache . ibatis . scripting . xmltags . TextSqlNode ( "UPDATE<sp>BLOG" ) , new org . apache . ibatis . scripting . xmltags . SetSqlNode ( new org . apache . ibatis . session . Configuration ( ) , mixedContents ( new org . apache . ibatis . scripting . xmltags . IfSqlNode ( mixedContents ( new org . apache . ibatis . scripting . xmltags . TextSqlNode ( "<sp>ID<sp>=<sp>?,<sp>" ) ) , "true" ) , new org . apache . ibatis . scripting . xmltags . IfSqlNode ( mixedContents ( new org . apache . ibatis . scripting . xmltags . TextSqlNode ( "<sp>NAME<sp>=<sp>?,<sp>" ) ) , "true" ) ) ) ) ; org . apache . ibatis . mapping . BoundSql boundSql = source . getBoundSql ( null ) ; "<AssertPlaceHolder>" ; } getSql ( ) { return sql ; }
org . junit . Assert . assertEquals ( expected , boundSql . getSql ( ) )
testFieldInjectionByTypeWhereNoMatch ( ) { com . picocontainer . MutablePicoContainer pico = new com . picocontainer . DefaultPicoContainer ( ) ; pico . setName ( "parent" ) ; pico . addAdapter ( new com . picocontainer . injectors . TypedFieldInjection . TypedFieldInjector < com . picocontainer . injectors . TypedFieldInjectorTestCase . Helicopter > ( . class , . class , new com . picocontainer . monitors . NullComponentMonitor ( ) , ( ( ( ( ( . class . getName ( ) ) + "<sp>" ) + ( . class . getName ( ) ) ) + "<sp>" ) + ( . class . getName ( ) ) ) , true ) ) ; pico . addComponent ( com . picocontainer . injectors . TypedFieldInjectorTestCase . Hulahoop . class , new com . picocontainer . injectors . TypedFieldInjectorTestCase . Hulahoop ( ) ) ; try { pico . getComponent ( com . picocontainer . injectors . TypedFieldInjectorTestCase . Helicopter . class ) ; org . junit . Assert . fail ( "should<sp>have<sp>barfed" ) ; } catch ( com . picocontainer . injectors . AbstractInjector e ) { e . printStackTrace ( ) ; java . lang . String expected = "Helicopter<sp>has<sp>unsatisfied<sp>dependency<sp>for<sp>fields<sp>[<sp>Helicopter.pogo<sp>(field's<sp>type<sp>is<sp>PogoStick)<sp>]<sp>from<sp>parent:2<|" ; java . lang . String actual = e . getMessage ( ) ; actual = actual . replace ( ( ( com . picocontainer . injectors . TypedFieldInjectorTestCase . class . getName ( ) ) + "$" ) , "" ) ; "<AssertPlaceHolder>" ; } } getName ( ) { return ( ( java . lang . reflect . Field ) ( member ) ) . getName ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testCount ( ) { "<AssertPlaceHolder>" ; } getContadorDao ( ) { return fwktd_sir_contadorDao ; }
org . junit . Assert . assertEquals ( 1 , getContadorDao ( ) . count ( ) )
southernTowEdgeEastCrossing ( ) { getNorthSouthDownwardCrossingGraph ( ) ; int crossingCount = initCounterForLayerWithIndexAndCountInLayer ( 0 ) ; "<AssertPlaceHolder>" ; } initCounterForLayerWithIndexAndCountInLayer ( int ) { setUpIds ( ) ; int numPorts = 0 ; for ( org . eclipse . elk . alg . layered . graph . Layer l : getGraph ( ) ) { for ( org . eclipse . elk . alg . layered . graph . LNode lNode : l ) { numPorts += lNode . getPorts ( ) . size ( ) ; } } org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter counter = new org . eclipse . elk . alg . layered . p3order . counting . CrossingsCounter ( new int [ numPorts ] ) ; return counter . countNorthSouthPortCrossingsInLayer ( getGraph ( ) . toNodeArray ( ) [ layerIndex ] ) ; }
org . junit . Assert . assertThat ( crossingCount , org . hamcrest . CoreMatchers . is ( 1 ) )
getShouldReturnFalseOnException ( ) { doThrow ( new net . usikkert . kouchat . misc . CommandException ( "Don't<sp>run" ) ) . when ( command ) . runCommand ( ) ; asyncTask . execute ( ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertFalse ( asyncTask . get ( ) )
getNumberOfSProcessInstanceFailed_should_return_number_of_distinct_process_instances ( ) { repository . add ( buildFailedProcessInstance ( 1 ) ) ; final org . bonitasoft . engine . core . process . instance . model . impl . SProcessInstanceImpl processInstanceWithFailedFlowNode = new org . bonitasoft . engine . core . process . instance . model . impl . SProcessInstanceImpl ( "process2" , 10L ) ; processInstanceWithFailedFlowNode . setId ( 2 ) ; processInstanceWithFailedFlowNode . setTenantId ( PersistentObjectBuilder . DEFAULT_TENANT_ID ) ; repository . add ( processInstanceWithFailedFlowNode ) ; repository . add ( buildFailedGateway ( 852 , processInstanceWithFailedFlowNode . getId ( ) ) ) ; final org . bonitasoft . engine . core . process . instance . model . impl . SProcessInstanceImpl failedProcessInstanceWithFailedFlowNode = repository . add ( buildFailedProcessInstance ( 3 ) ) ; repository . add ( buildFailedGateway ( 56 , failedProcessInstanceWithFailedFlowNode . getId ( ) ) ) ; final long numberOfSProcessInstanceFailed = repository . getNumberOfSProcessInstanceFailed ( ) ; "<AssertPlaceHolder>" ; } getNumberOfSProcessInstanceFailed ( ) { getSession ( ) . enableFilter ( "tenantFilter" ) . setParameter ( "tenantId" , PersistentObjectBuilder . DEFAULT_TENANT_ID ) ; final org . hibernate . Query namedQuery = getNamedQuery ( "getNumberOfSProcessInstanceFailed" ) ; return ( ( java . lang . Number ) ( namedQuery . uniqueResult ( ) ) ) . longValue ( ) ; }
org . junit . Assert . assertEquals ( 3 , numberOfSProcessInstanceFailed )
testStem2 ( ) { edu . nyu . jet . tipster . Document doc = prepare ( "This<sp>sentence<sp>is<sp>going<sp>to<sp>be<sp>stemmed." ) ; edu . nyu . jet . lex . StemmerTest . stemmer . tagStem ( doc , doc . fullSpan ( ) ) ; java . util . Vector < edu . nyu . jet . tipster . Annotation > tokens = doc . annotationsOfType ( "token" ) ; java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "this" , null , "be" , "go" , null , null , "stem" , null ) ; java . util . List < java . lang . String > actual = getFeatureList ( tokens , "stem" ) ; "<AssertPlaceHolder>" ; } getFeatureList ( java . util . Vector , java . lang . String ) { java . util . List < T > result = new java . util . ArrayList < T > ( ) ; for ( edu . nyu . jet . tipster . Annotation ann : anns ) { result . add ( ( ( T ) ( ann . get ( name ) ) ) ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testEqualsWithSameAttributes ( ) { com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ddmFormFieldValue1 = createDDMFormFieldValue ( "xhsy" , "Test" , new com . liferay . dynamic . data . mapping . model . UnlocalizedValue ( "Value" ) ) ; ddmFormFieldValue1 . addNestedDDMFormFieldValue ( createDDMFormFieldValue ( "jamy" , "Nested" , new com . liferay . dynamic . data . mapping . model . UnlocalizedValue ( "Nested<sp>Value" ) ) ) ; com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ddmFormFieldValue2 = createDDMFormFieldValue ( "xhsy" , "Test" , new com . liferay . dynamic . data . mapping . model . UnlocalizedValue ( "Value" ) ) ; ddmFormFieldValue2 . addNestedDDMFormFieldValue ( createDDMFormFieldValue ( "jamy" , "Nested" , new com . liferay . dynamic . data . mapping . model . UnlocalizedValue ( "Nested<sp>Value" ) ) ) ; "<AssertPlaceHolder>" ; } createDDMFormFieldValue ( java . lang . String , java . lang . String , com . liferay . dynamic . data . mapping . model . Value ) { com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ddmFormFieldValue = new com . liferay . dynamic . data . mapping . storage . DDMFormFieldValue ( ) ; ddmFormFieldValue . setInstanceId ( instanceId ) ; ddmFormFieldValue . setName ( name ) ; ddmFormFieldValue . setValue ( value ) ; return ddmFormFieldValue ; }
org . junit . Assert . assertEquals ( ddmFormFieldValue1 , ddmFormFieldValue2 )
batch_fileSource_distributed ( ) { java . io . File textFile = createTestFile ( ) ; com . hazelcast . jet . pipeline . BatchSource < java . lang . String > fileSource = com . hazelcast . jet . pipeline . SourceBuilder . batch ( "distributed-file-source" , ( ctx ) -> fileReader ( textFile ) ) . < java . lang . String > fillBufferFn ( ( in , buf ) -> { java . lang . String line = in . readLine ( ) ; if ( line != null ) { buf . add ( line ) ; } else { buf . close ( ) ; } } ) . destroyFn ( BufferedReader :: close ) . distributed ( com . hazelcast . jet . pipeline . SourceBuilderTest . PREFERRED_LOCAL_PARALLELISM ) . build ( ) ; com . hazelcast . jet . pipeline . Pipeline p = com . hazelcast . jet . pipeline . Pipeline . create ( ) ; p . drawFrom ( fileSource ) . drainTo ( sinkList ( ) ) ; jet ( ) . newJob ( p ) . join ( ) ; java . util . Map < java . lang . String , java . lang . Integer > actual = sinkToBag ( ) ; java . util . Map < java . lang . String , java . lang . Integer > expected = java . util . stream . IntStream . range ( 0 , itemCount ) . boxed ( ) . collect ( java . util . stream . Collectors . toMap ( ( i ) -> "line" + i , ( i ) -> ( com . hazelcast . jet . pipeline . SourceBuilderTest . PREFERRED_LOCAL_PARALLELISM ) * com . hazelcast . jet . pipeline . MEMBER_COUNT ) ) ; "<AssertPlaceHolder>" ; } toMap ( com . hazelcast . jet . function . FunctionEx , com . hazelcast . jet . function . FunctionEx ) { checkSerializable ( keyFn , "keyFn" ) ; checkSerializable ( valueFn , "valueFn" ) ; return com . hazelcast . jet . aggregate . AggregateOperations . toMap ( keyFn , valueFn , ( k , v ) -> { throw new java . lang . IllegalStateException ( ( "Duplicate<sp>key:<sp>" + k ) ) ; } , HashMap :: new ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testConvertPropertyWithXmlAdapter ( ) { try { org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind edmDateType = org . apache . olingo . odata2 . jpa . processor . core . access . model . JPATypeConverter . convertToEdmSimpleType ( org . apache . olingo . odata2 . jpa . processor . core . mock . data . EntityWithXmlAdapterOnProperty . class , new org . apache . olingo . odata2 . jpa . processor . core . access . model . JPATypeConverterTest . JPAAttributeWithXmlAdapterType ( ) ) ; "<AssertPlaceHolder>" ; } catch ( org . apache . olingo . odata2 . jpa . processor . api . exception . ODataJPAModelException e ) { org . junit . Assert . fail ( ( ( ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_1 ) + ( e . getMessage ( ) ) ) + ( org . apache . olingo . odata2 . jpa . processor . core . common . ODataJPATestConstants . EXCEPTION_MSG_PART_2 ) ) ) ; } } convertToEdmSimpleType ( java . lang . Class , javax . persistence . metamodel . Attribute ) { if ( ( ( ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . String . class ) ) || ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Character . class ) ) ) || ( jpaType . equals ( char . class ) ) ) || ( jpaType . equals ( char [ ] . class ) ) ) || ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Character [ ] . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . String ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Long . class ) ) || ( jpaType . equals ( long . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Int64 ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Short . class ) ) || ( jpaType . equals ( short . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Int16 ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Integer . class ) ) || ( jpaType . equals ( int . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Int32 ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Double . class ) ) || ( jpaType . equals ( double . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Double ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Float . class ) ) || ( jpaType . equals ( float . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Single ; } else if ( jpaType . equals ( java . math . BigDecimal . class ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Decimal ; } else if ( jpaType . equals ( byte [ ] . class ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Binary ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Byte . class ) ) || ( jpaType . equals ( byte . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Byte ; } else if ( ( jpaType . equals ( org . apache . olingo . odata2 . jpa . processor . core . access . model . Boolean . class ) ) || ( jpaType . equals ( boolean . class ) ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Boolean ; } else if ( jpaType . equals ( java . sql . Time . class ) ) { return org . apache . olingo . odata2 . api . edm . EdmSimpleTypeKind . Time ; } else if ( ( ( ( jpaType . equals ( java . sql . Date . class ) ) || ( jpaType . equals ( java . util . Calendar . class ) ) ) || ( jpaType . equals ( java . sql . Timestamp . class ) ) ) || ( jpaType . equals ( java . sql . Date . class ) ) ) { try { if ( ( currentAttribute != null ) && ( ( org . apache . olingo . odata2 . jpa . processor . core . access . model . JPATypeConverter . determineTemporalType ( currentAttribute ) ) == ( javax . persistence . TemporalType . TIME ) ) ) { return org . apache .
org . junit . Assert . assertEquals ( EdmSimpleTypeKind . String , edmDateType )