input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
createTableInAccumuloNamespace ( ) { java . lang . String tableName = ( Namespace . ACCUMULO . name ( ) ) + ".1" ; "<AssertPlaceHolder>" ; c . tableOperations ( ) . create ( tableName ) ; } tableOperations ( ) { return context . tableOperations ( ) ; }
org . junit . Assert . assertFalse ( c . tableOperations ( ) . exists ( tableName ) )
testValidPartition ( ) { org . kitesdk . data . spi . PartitionKey key = org . kitesdk . data . spi . filesystem . FileSystemDatasetRepository . partitionKeyForPath ( dataset , new org . apache . hadoop . fs . Path ( testDirectory , "username_part=1" ) . toUri ( ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( new org . kitesdk . data . spi . PartitionKey ( 1 ) , key )
testGo ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . PrintStream ps = new java . io . PrintStream ( baos ) ; new org . drools . example . api . defaultkiesession . DefaultKieSessionExample ( ) . go ( ps ) ; ps . close ( ) ; java . lang . String actual = new java . lang . String ( baos . toByteArray ( ) ) ; java . lang . String expected = ( ( ( "" + "Dave:<sp>Hello,<sp>HAL.<sp>Do<sp>you<sp>read<sp>me,<sp>HAL?" ) + ( org . drools . example . api . defaultkiesession . DefaultKieSessionExampleTest . NL ) ) + "HAL:<sp>Dave.<sp>I<sp>read<sp>you." ) + ( org . drools . example . api . defaultkiesession . DefaultKieSessionExampleTest . NL ) ; "<AssertPlaceHolder>" ; } toByteArray ( ) { java . io . ByteArrayOutputStream buf = new java . io . ByteArrayOutputStream ( ) ; try { java . io . ObjectOutputStream out = new java . io . ObjectOutputStream ( buf ) ; out . writeObject ( xjcOpts ) ; out . writeObject ( systemId ) ; out . writeObject ( classes ) ; out . close ( ) ; } catch ( java . io . IOException e ) { logger . error ( "Error<sp>serializing<sp>decision<sp>table<sp>configuration." , e ) ; } return buf . toByteArray ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
setIndent ( ) { biweekly . io . xml . XCalOutputProperties properties = new biweekly . io . xml . XCalOutputProperties ( ) ; properties . setIndent ( 1 ) ; java . util . Map < java . lang . String , java . lang . String > expected = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expected . put ( OutputKeys . METHOD , "xml" ) ; expected . put ( OutputKeys . INDENT , "yes" ) ; expected . put ( biweekly . io . xml . XCalOutputPropertiesTest . INDENT_AMT , "1" ) ; "<AssertPlaceHolder>" ; } put ( K , V ) { key = sanitizeKey ( key ) ; java . util . List < V > list = map . get ( key ) ; if ( list == null ) { list = new java . util . ArrayList < V > ( ) ; map . put ( key , list ) ; } list . add ( value ) ; }
org . junit . Assert . assertEquals ( expected , properties )
setAsText_shouldSetUsingProgramUuid ( ) { org . openmrs . propertyeditor . ProgramEditor editor = new org . openmrs . propertyeditor . ProgramEditor ( ) ; editor . setAsText ( "da4a0391-ba62-4fad-ad66-1e3722d16380" ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertNotNull ( editor . getValue ( ) )
testSimpleBuilderMissingStringL1 ( ) { software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder expected = software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder . builder ( ) . longVal ( 10L ) . build ( ) ; software . amazon . kinesis . multilang . config . BuilderDynaBean builderDynaBean = new software . amazon . kinesis . multilang . config . BuilderDynaBean ( software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder . class , convertUtilsBean ) ; utilsBean . setProperty ( builderDynaBean , "longVal" , expected . longVal ) ; software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder actual = builderDynaBean . build ( software . amazon . kinesis . multilang . config . BuilderDynaBeanTest . TestSimpleBuilder . class ) ; "<AssertPlaceHolder>" ; } build ( java . util . function . Function [ ] ) { java . lang . reflect . Method builderMethod ; try { builderMethod = destinedClass . getMethod ( software . amazon . kinesis . multilang . config . DynaBeanBuilderSupport . BUILDER_METHOD_NAME ) ; } catch ( java . lang . NoSuchMethodException e ) { throw new java . lang . RuntimeException ( e ) ; } java . lang . Object source ; try { source = builderMethod . invoke ( null ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { throw new java . lang . RuntimeException ( e ) ; } for ( Map . Entry < java . lang . String , java . lang . Object > setValue : values . entrySet ( ) ) { java . lang . Object argument = getArgument ( setValue ) ; java . lang . reflect . Method mutator = properties . get ( setValue . getKey ( ) ) . stream ( ) . filter ( ( t ) -> org . apache . commons . lang3 . ClassUtils . isAssignable ( argument . getClass ( ) , t . type ) ) . findFirst ( ) . map ( ( a ) -> a . builderMethod ) . orElseThrow ( ( ) -> new java . lang . IllegalStateException ( java . lang . String . format ( "Unable<sp>to<sp>find<sp>mutator<sp>for<sp>%s<sp>of<sp>type<sp>%s" , setValue . getKey ( ) , argument . getClass ( ) . getName ( ) ) ) ) ; try { source = mutator . invoke ( source , argument ) ; } catch ( java . lang . IllegalAccessException | java . lang . reflect . InvocationTargetException e ) { throw new java . lang . RuntimeException ( e ) ; } } if ( additionalMutators != null ) { for ( java . util . function . Function < java . lang . Object , java . lang . Object > mutator : additionalMutators ) { source = mutator . apply ( source ) ; } } java . lang . reflect . Method buildMethod ; try { buildMethod = builderClass . getMethod ( software . amazon . kinesis . multilang . config . DynaBeanBuilderSupport . BUILD_METHOD_NAME ) ; return buildMethod . invoke ( source ) ; } catch ( java . lang . IllegalAccessException | java . lang . NoSuchMethodException | java . lang . reflect . InvocationTargetException e ) { throw new java . lang . RuntimeException ( e ) ; } }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . equalTo ( expected ) )
test_getLog ( ) { java . lang . String [ ] logcatResponse = new java . lang . String [ ] { "loggy" , "last" } ; when ( android . getShellReturn ( any ( com . android . ddmlib . IDevice . class ) , any ( java . lang . String . class ) ) ) . thenReturn ( logcatResponse ) ; java . lang . String [ ] testResult = rootedAndroidCollectorImpl . getLog ( ) ; "<AssertPlaceHolder>" ; } getLog ( ) { return android . getShellReturn ( device , "echo<sp>''Android<sp>version<sp>:'';getprop<sp>ro.build.version.release;logcat<sp>-d" ) ; }
org . junit . Assert . assertTrue ( testResult [ 0 ] . equals ( logcatResponse [ 0 ] ) )
testBeideLeeg ( ) { final nl . bzk . migratiebrp . conversie . model . lo3 . autorisatie . Lo3AutorisatieInhoud meestRecenteNietLegeInhoud = autorisatieConversieHelper . bepaalMeesteRecenteNietLegeInhoud ( maakStapel ( 19900101 , true , 19910101 , true ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNull ( meestRecenteNietLegeInhoud )
testNewBroadcastComparison2 ( ) { org . nd4j . linalg . api . ndarray . INDArray initial = org . nd4j . linalg . factory . Nd4j . create ( 3 , 5 ) ; org . nd4j . linalg . api . ndarray . INDArray mask = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 5 , 4 , 3 , 2 , 1 } ) ; org . nd4j . linalg . api . ndarray . INDArray exp = org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0 , 0 , 0 , 1 , 1 } ) ; for ( int i = 0 ; i < ( initial . columns ( ) ) ; i ++ ) { initial . getColumn ( i ) . assign ( i ) ; } org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . commit ( ) ; org . nd4j . linalg . factory . Nd4j . getExecutioner ( ) . exec ( new org . nd4j . linalg . BroadcastGreaterThan ( initial , mask , initial , 1 ) ) ; for ( int i = 0 ; i < ( initial . rows ( ) ) ; i ++ ) { "<AssertPlaceHolder>" ; } } getRow ( long ) { if ( ( isRowVector ( ) ) && ( r == 0 ) ) return this ; else if ( ( isRowVector ( ) ) && ( r > 0 ) ) throw new java . lang . IllegalArgumentException ( "Illegal<sp>index<sp>for<sp>row" ) ; org . nd4j . linalg . api . ndarray . INDArray result = get ( org . nd4j . linalg . api . ndarray . NDArrayIndex . point ( r ) , org . nd4j . linalg . api . ndarray . NDArrayIndex . all ( ) ) ; if ( ( ( ( ! ( this . isView ( ) ) ) && ( ( this . ordering ( ) ) == 'c' ) ) && ( ( result . elementWiseStride ( ) ) == 1 ) ) && ( ( result . ordering ( ) ) != 'c' ) ) { ( ( org . nd4j . linalg . api . ndarray . BaseNDArray ) ( result ) ) . setShapeInformation ( org . nd4j . linalg . factory . Nd4j . getShapeInfoProvider ( ) . createShapeInformation ( result . shape ( ) , result . stride ( ) , 0 , 1 , 'c' ) ) ; } return result ; }
org . junit . Assert . assertEquals ( exp , initial . getRow ( i ) )
zoekLo3VoorkomenVoorActieWelGevonden ( ) { final nl . bzk . algemeenbrp . dal . domein . brp . entity . Lo3Voorkomen result = verConvRepository . zoekLo3VoorkomenVoorActie ( 28L ) ; "<AssertPlaceHolder>" ; } zoekLo3VoorkomenVoorActie ( nl . bzk . brp . model . logisch . kern . Actie ) { if ( actie == null ) { return null ; } final java . lang . Long actieId = ( ( nl . bzk . brp . model . operationeel . kern . ActieModel ) ( actie ) ) . getID ( ) ; nl . bzk . brp . levering . lo3 . conversie . mutatie . TestVerConvRepository . LOGGER . debug ( "zoekLo3VoorkomenVoorActie;<sp>id={}" , actieId ) ; return voorkomens . get ( actieId ) ; }
org . junit . Assert . assertNotNull ( result )
testGetBadDouble ( ) { op . newOption ( alpha ) . requiredArg ( ) . done ( ) ; op . process ( com . google . common . collect . Lists . newArrayList ( "command" , "--alpha" , "a" ) ) ; "<AssertPlaceHolder>" ; op . getDouble ( alpha ) ; } has ( E ) { if ( ( longOption == null ) || ( ( longOption . toString ( ) ) == null ) ) throw new java . lang . NullPointerException ( "Long<sp>option<sp>is<sp>null." ) ; if ( ( arguments ) == null ) throw new java . lang . IllegalStateException ( "Call<sp>process()<sp>before<sp>testing<sp>for<sp>options." ) ; return arguments . containsKey ( longOption . toString ( ) . toLowerCase ( ) ) ; }
org . junit . Assert . assertTrue ( op . has ( alpha ) )
iterationFromKeyIsInOrder ( ) { for ( java . util . Map < java . lang . Integer , java . lang . Integer > any : net . java . quickcheck . generator . CombinedGeneratorsIterables . someMaps ( net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) , net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) ) ) { java . util . List < java . lang . Integer > expectedKeys = new java . util . ArrayList ( any . keySet ( ) ) ; java . lang . Integer fromKey = ( ( expectedKeys . isEmpty ( ) ) || ( net . java . quickcheck . generator . PrimitiveGenerators . booleans ( ) . next ( ) ) ) ? net . java . quickcheck . generator . PrimitiveGenerators . integers ( ) . next ( ) : expectedKeys . get ( 0 ) ; java . util . Collections . sort ( expectedKeys ) ; java . util . Iterator < java . lang . Integer > iterator = expectedKeys . iterator ( ) ; while ( iterator . hasNext ( ) ) { java . lang . Integer next = iterator . next ( ) ; if ( ( next . compareTo ( fromKey ) ) < 0 ) { iterator . remove ( ) ; } } com . google . firebase . database . collection . ImmutableSortedMap < java . lang . Integer , java . lang . Integer > map = com . google . firebase . database . collection . ArraySortedMap . fromMap ( any , com . google . firebase . database . collection . ArraySortedMapTest . IntComparator ) ; java . util . List < java . lang . Integer > actualKeys = new java . util . ArrayList ( ) ; java . util . Iterator < Map . Entry < java . lang . Integer , java . lang . Integer > > mapIterator = map . iteratorFrom ( fromKey ) ; while ( mapIterator . hasNext ( ) ) { actualKeys . add ( mapIterator . next ( ) . getKey ( ) ) ; } "<AssertPlaceHolder>" ; } } getKey ( ) { return null ; }
org . junit . Assert . assertEquals ( expectedKeys , actualKeys )
testInvalidIDPName ( ) { org . apache . jackrabbit . oak . spi . security . authentication . external . impl . jmx . SyncMBeanImpl syncMBean = createSyncMBeanImpl ( org . apache . jackrabbit . oak . spi . security . authentication . external . impl . jmx . SyncMBeanImplTest . SYNC_NAME , "invalid" ) ; "<AssertPlaceHolder>" ; try { syncMBean . syncAllExternalUsers ( ) ; org . junit . Assert . fail ( "syncAllExternalUsers<sp>with<sp>invalid<sp>IDP<sp>name<sp>must<sp>fail" ) ; } catch ( java . lang . IllegalArgumentException e ) { } } getIDPName ( ) { return idpName ; }
org . junit . Assert . assertEquals ( "invalid" , syncMBean . getIDPName ( ) )
validate_shouldPassValidationIfFieldLengthsAreCorrect ( ) { org . openmrs . PatientIdentifierType type = new org . openmrs . PatientIdentifierType ( ) ; type . setName ( "name" ) ; type . setFormat ( "format" ) ; type . setFormatDescription ( "formatDescription" ) ; type . setValidator ( "validator" ) ; type . setRetireReason ( "retireReason" ) ; org . springframework . validation . Errors errors = new org . springframework . validation . BindException ( type , "type" ) ; new org . openmrs . validator . PatientIdentifierTypeValidator ( ) . validate ( type , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; }
org . junit . Assert . assertFalse ( errors . hasErrors ( ) )
testEvalReturnArrayStrings ( ) { actual . add ( connection . eval ( "return<sp>{KEYS[1],ARGV[1]}" , ReturnType . MULTI , 1 , "foo" , "bar" ) ) ; org . springframework . data . redis . connection . List < byte [ ] > result = ( ( org . springframework . data . redis . connection . List < byte [ ] > ) ( getResults ( ) . get ( 0 ) ) ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { return delegate . get ( key ) ; }
org . junit . Assert . assertEquals ( org . springframework . data . redis . connection . Arrays . asList ( new java . lang . Object [ ] { "foo" , "bar" } ) , org . springframework . data . redis . connection . Arrays . asList ( new java . lang . Object [ ] { new java . lang . String ( result . get ( 0 ) ) , new java . lang . String ( result . get ( 1 ) ) } ) )
canGetSinglePolicyById ( ) { java . lang . String expectedName = ( testPolicyPrefix ) + "GetOne" ; double duration = 1 ; com . microsoft . windowsazure . services . media . models . AccessPolicyInfo policyToGet = service . create ( com . microsoft . windowsazure . services . media . models . AccessPolicy . create ( expectedName , duration , java . util . EnumSet . of ( AccessPolicyPermission . WRITE ) ) ) ; com . microsoft . windowsazure . services . media . models . AccessPolicyInfo retrievedPolicy = service . get ( com . microsoft . windowsazure . services . media . models . AccessPolicy . get ( policyToGet . getId ( ) ) ) ; "<AssertPlaceHolder>" ; verifyPolicyProperties ( "retrievedPolicy" , expectedName , duration , AccessPolicyPermission . WRITE , retrievedPolicy ) ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( policyToGet . getId ( ) , retrievedPolicy . getId ( ) )
boolNullEveryOther ( ) { final int count = 1024 ; try ( org . apache . arrow . vector . BitVector in = new org . apache . arrow . vector . BitVector ( "in" , allocator ) ; org . apache . arrow . vector . BitVector out = new org . apache . arrow . vector . BitVector ( "out" , allocator ) ) { in . allocateNew ( count ) ; io . netty . buffer . ArrowBuf tempBuf = allocator . buffer ( 1024 ) ; for ( int i = 0 ; i < count ; i ++ ) { if ( ( i % 2 ) == 0 ) { in . set ( i , 1 ) ; } } in . setValueCount ( count ) ; final com . dremio . sabot . op . common . ht2 . PivotDef pivot = com . dremio . sabot . op . common . ht2 . PivotBuilder . getBlockDefinition ( new com . dremio . sabot . op . common . ht2 . FieldVectorPair ( in , out ) ) ; try ( final com . dremio . sabot . op . common . ht2 . FixedBlockVector fbv = new com . dremio . sabot . op . common . ht2 . FixedBlockVector ( allocator , pivot . getBlockWidth ( ) ) ; final com . dremio . sabot . op . common . ht2 . VariableBlockVector vbv = new com . dremio . sabot . op . common . ht2 . VariableBlockVector ( allocator , pivot . getVariableCount ( ) ) ) { fbv . ensureAvailableBlocks ( count ) ; com . dremio . sabot . op . common . ht2 . Pivots . pivot ( pivot , count , fbv , vbv ) ; com . dremio . sabot . op . common . ht2 . Unpivots . unpivot ( pivot , fbv , vbv , 0 , count ) ; for ( int i = 0 ; i < count ; i ++ ) { "<AssertPlaceHolder>" ; } } tempBuf . release ( ) ; } } getObject ( int ) { if ( rowOffset < ( vector . getValueCount ( ) ) ) { return delegate . getObject ( rowOffset ) ; } return null ; }
org . junit . Assert . assertEquals ( in . getObject ( i ) , out . getObject ( i ) )
atomStereoLeftOrUnspec ( ) { org . openscience . cdk . isomorphism . matchers . Expr actual = org . openscience . cdk . smarts . SmartsExprReadTest . getAtomExpr ( "[@?]" ) ; org . openscience . cdk . isomorphism . matchers . Expr expected = org . openscience . cdk . smarts . SmartsExprReadTest . or ( org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . STEREOCHEMISTRY , IStereoElement . LEFT ) , org . openscience . cdk . smarts . SmartsExprReadTest . expr ( org . openscience . cdk . smarts . STEREOCHEMISTRY , 0 ) ) ; "<AssertPlaceHolder>" ; } expr ( org . openscience . cdk . isomorphism . matchers . Expr$Type , int ) { return new org . openscience . cdk . isomorphism . matchers . Expr ( type , val ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . CoreMatchers . is ( expected ) )
testMaxDistance_happyPath ( ) { java . lang . Double maxDistance = ( ( double ) ( org . apache . metron . stellar . common . utils . StellarProcessorUtils . run ( "GEOHASH_MAX_DIST([empireState,<sp>mosconeCenter,<sp>jutland])" , com . google . common . collect . ImmutableMap . of ( "empireState" , empireStateHash , "mosconeCenter" , mosconeCenterHash , "jutland" , jutlandHash ) ) ) ) ; double expectedDistance = 8528 ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( expectedDistance , maxDistance , 1.0 )
failSSLonPlainConnectionWrite ( ) { final org . threadly . concurrent . future . SettableListenableFuture < java . lang . Boolean > gotError = new org . threadly . concurrent . future . SettableListenableFuture < java . lang . Boolean > ( ) ; org . threadly . litesockets . TCPServer server = SE . createTCPServer ( "localhost" , port ) ; server . setSSLContext ( sslCtx ) ; server . setDoHandshake ( true ) ; serverFC . addTCPServer ( server ) ; final org . threadly . litesockets . TCPClient client = SE . createTCPClient ( "localhost" , port ) ; client . connect ( ) . get ( ) ; new org . threadly . test . concurrent . TestCondition ( ) { @ org . threadly . litesockets . tcp . Override public boolean get ( ) { return ( serverFC . getAllClients ( ) . size ( ) ) == 1 ; } } . blockTillTrue ( 5000 ) ; serverFC . getAllClients ( ) . get ( 0 ) . addCloseListener ( new org . threadly . litesockets . Client . ClientCloseListener ( ) { @ org . threadly . litesockets . tcp . Override public void onClose ( org . threadly . litesockets . Client client ) { } @ org . threadly . litesockets . tcp . Override public void onCloseWithError ( org . threadly . litesockets . Client client , java . lang . Throwable error ) { gotError . setResult ( true ) ; } } ) ; client . write ( TCPTests . SMALL_TEXT_BUFFER . duplicate ( ) ) ; new org . threadly . test . concurrent . TestCondition ( ) { @ org . threadly . litesockets . tcp . Override public boolean get ( ) { return ( SE . getClientCount ( ) ) == 0 ; } } . blockTillTrue ( 5000 ) ; "<AssertPlaceHolder>" ; } get ( ) { if ( lock . isLocked ( ) ) { if ( lock . isHeldByCurrentThread ( ) ) { final byte b = super . get ( ) ; consumedSinceBegin += 1 ; return b ; } else { throw new java . lang . IllegalStateException ( org . threadly . litesockets . buffers . TransactionalByteBuffers . ACCESS_ERROR ) ; } } else { return super . get ( ) ; } }
org . junit . Assert . assertTrue ( gotError . get ( ) )
testNotEqualsFiltered ( ) { hudson . plugins . clearcase . history . FieldFilter filter = new hudson . plugins . clearcase . history . FieldFilterTest . FieldFilterDummy ( FieldFilter . Type . NotEquals , hudson . plugins . clearcase . history . FieldFilterTest . PATTERN ) ; "<AssertPlaceHolder>" ; } accept ( java . lang . String ) { switch ( type ) { case Equals : return org . apache . commons . lang . StringUtils . equals ( value , patternText ) ; case EqualsIgnoreCase : return org . apache . commons . lang . StringUtils . equalsIgnoreCase ( value , patternText ) ; case NotEquals : return ! ( org . apache . commons . lang . StringUtils . equals ( value , patternText ) ) ; case NotEqualsIgnoreCase : return ! ( org . apache . commons . lang . StringUtils . equalsIgnoreCase ( value , patternText ) ) ; case StartsWith : return ( value != null ) && ( value . startsWith ( patternText ) ) ; case StartsWithIgnoreCase : return ( value != null ) && ( value . toLowerCase ( ) . startsWith ( patternText ) ) ; case EndsWith : return ( value != null ) && ( value . endsWith ( patternText ) ) ; case EndsWithIgnoreCase : return ( value != null ) && ( value . toLowerCase ( ) . endsWith ( patternText ) ) ; case Contains : return org . apache . commons . lang . StringUtils . contains ( value , patternText ) ; case ContainsIgnoreCase : return org . apache . commons . lang . StringUtils . contains ( org . apache . commons . lang . StringUtils . lowerCase ( value ) , patternText ) ; case DoesNotContain : return ! ( org . apache . commons . lang . StringUtils . contains ( value , patternText ) ) ; case DoesNotContainIgnoreCase : hudson . plugins . clearcase . history . FieldFilter . LOGGER . fine ( ( ( ( org . apache . commons . lang . StringUtils . lowerCase ( value ) ) + "<sp><>" ) + ( patternText ) ) ) ; return ! ( org . apache . commons . lang . StringUtils . contains ( org . apache . commons . lang . StringUtils . lowerCase ( value ) , patternText ) ) ; case ContainsRegxp : java . util . regex . Matcher m = pattern . matcher ( org . apache . commons . lang . StringUtils . defaultString ( value ) ) ; return m . find ( ) ; case DoesNotContainRegxp : java . util . regex . Matcher m2 = pattern . matcher ( org . apache . commons . lang . StringUtils . defaultString ( value ) ) ; return ! ( m2 . find ( ) ) ; } return true ; }
org . junit . Assert . assertFalse ( filter . accept ( hudson . plugins . clearcase . history . FieldFilterTest . PATTERN ) )
testList3 ( ) { final java . util . List < java . lang . Object > packages = conf . getList ( "test.threesome.three" ) ; "<AssertPlaceHolder>" ; } size ( ) { int count = 0 ; for ( final java . util . Iterator < java . lang . String > iterator = configuration . getKeys ( ) ; iterator . hasNext ( ) ; ) { iterator . next ( ) ; count ++ ; } return count ; }
org . junit . Assert . assertEquals ( 3 , packages . size ( ) )
backwardsCompatible_withPrivateDns_notPublicIp ( ) { boolean usePrivateDnsName = true ; boolean connectUsingPublicIp = false ; boolean associatePublicIp = false ; "<AssertPlaceHolder>" ; } backwardsCompatible ( boolean , boolean , boolean ) { if ( usePrivateDnsName && ( ! connectUsingPublicIp ) ) { return hudson . plugins . ec2 . ConnectionStrategy . PRIVATE_DNS ; } else if ( connectUsingPublicIp || associatePublicIp ) { return hudson . plugins . ec2 . ConnectionStrategy . PUBLIC_IP ; } else { return hudson . plugins . ec2 . ConnectionStrategy . PRIVATE_IP ; } }
org . junit . Assert . assertThat ( hudson . plugins . ec2 . ConnectionStrategy . backwardsCompatible ( usePrivateDnsName , connectUsingPublicIp , associatePublicIp ) , org . hamcrest . CoreMatchers . equalTo ( ConnectionStrategy . PRIVATE_DNS ) )
setUpdateType_allTypes_isCorrect ( ) { for ( eu . chargetime . ocpp . model . localauthlist . UpdateType type : eu . chargetime . ocpp . model . localauthlist . UpdateType . values ( ) ) { request . setUpdateType ( type ) ; "<AssertPlaceHolder>" ; } } getUpdateType ( ) { return updateType ; }
org . junit . Assert . assertThat ( request . getUpdateType ( ) , org . hamcrest . CoreMatchers . equalTo ( type ) )
deleteAll ( ) { todoRepository . deleteAll ( ) ; "<AssertPlaceHolder>" ; } deleteAll ( ) { todoRepository . deleteAll ( ) ; org . junit . Assert . assertEquals ( 0 , todoRepository . count ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , todoRepository . count ( ) )
testEncodeDecodeSignature ( ) { com . trilead . ssh2 . signature . RSAKeyAlgorithm testCase = new com . trilead . ssh2 . signature . RSAKeyAlgorithm ( ) ; java . security . KeyPairGenerator factory = java . security . KeyPairGenerator . getInstance ( "RSA" ) ; java . security . interfaces . RSAPrivateKey privateKey = ( ( java . security . interfaces . RSAPrivateKey ) ( factory . generateKeyPair ( ) . getPrivate ( ) ) ) ; byte [ ] signature = testCase . generateSignature ( "Sign<sp>Me" . getBytes ( StandardCharsets . UTF_8 ) , privateKey , new java . security . SecureRandom ( ) ) ; byte [ ] encoded = testCase . encodeSignature ( signature ) ; byte [ ] decoded = testCase . decodeSignature ( encoded ) ; "<AssertPlaceHolder>" ; } decodeSignature ( byte [ ] ) { com . trilead . ssh2 . packets . TypesReader typesReader = new com . trilead . ssh2 . packets . TypesReader ( encodedSignature ) ; java . lang . String signatureFormat = typesReader . readString ( ) ; if ( ! ( signatureFormat . equals ( getKeyFormat ( ) ) ) ) { throw new java . io . IOException ( ( "Unsupported<sp>signature<sp>format:<sp>" + signatureFormat ) ) ; } byte [ ] rAndS = typesReader . readByteString ( ) ; if ( ( typesReader . remain ( ) ) != 0 ) { throw new java . io . IOException ( "Unexpected<sp>padding<sp>in<sp>ECDSA<sp>signature" ) ; } com . trilead . ssh2 . packets . TypesReader rsReader = new com . trilead . ssh2 . packets . TypesReader ( rAndS ) ; byte [ ] r = rsReader . readMPINT ( ) . toByteArray ( ) ; byte [ ] s = rsReader . readMPINT ( ) . toByteArray ( ) ; int rLength = r . length ; int sLength = s . length ; if ( ( ( r [ 0 ] ) & 128 ) != 0 ) { rLength ++ ; } if ( ( ( s [ 0 ] ) & 128 ) != 0 ) { sLength ++ ; } int totalLength = ( 6 + rLength ) + sLength ; java . io . ByteArrayOutputStream os = new java . io . ByteArrayOutputStream ( totalLength ) ; os . write ( 48 ) ; com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . writeLength ( ( totalLength - 2 ) , os ) ; os . write ( com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . ANS1_INTEGER ) ; com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . writeLength ( rLength , os ) ; if ( rLength != ( r . length ) ) { os . write ( com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . ANS1_ZERO ) ; } os . write ( r ) ; os . write ( com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . ANS1_INTEGER ) ; com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . writeLength ( sLength , os ) ; if ( sLength != ( s . length ) ) { os . write ( com . trilead . ssh2 . signature . ECDSAKeyAlgorithm . ANS1_ZERO ) ; } os . write ( s ) ; return os . toByteArray ( ) ; }
org . junit . Assert . assertArrayEquals ( signature , decoded )
fileSearchSkipStartWith ( ) { final java . lang . String str = getClass ( ) . getResource ( "/skipped" ) . toString ( ) ; final java . lang . String baseDir = str . substring ( ( ( str . indexOf ( ":/" ) ) + 1 ) ) ; final com . github . wuic . path . DirectoryPath directoryPath = com . github . wuic . path . DirectoryPath . class . cast ( com . github . wuic . util . IOUtils . buildPath ( baseDir , java . nio . charset . Charset . defaultCharset ( ) . displayName ( ) , com . github . wuic . test . UtilityTest . temporaryFileManager . getTemporaryFileManager ( ) ) ) ; final java . util . List < java . lang . String > res = com . github . wuic . util . IOUtils . listFile ( directoryPath , java . util . regex . Pattern . compile ( ".*.js" ) , java . util . Arrays . asList ( "ignore" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return com . github . wuic . nut . InMemoryNut . class . cast ( getWrapped ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , res . size ( ) )
testAddShellStepToEmrCluster ( ) { org . finra . herd . model . api . xml . EmrShellStepAddRequest emrShellStepAddRequest = new org . finra . herd . model . api . xml . EmrShellStepAddRequest ( NAMESPACE , EMR_CLUSTER_DEFINITION_NAME , EMR_CLUSTER_NAME , EMR_STEP_NAME , EMR_STEP_SCRIPT_LOCATION , java . util . Arrays . asList ( org . finra . herd . rest . ATTRIBUTE_NAME_1_MIXED_CASE ) , CONTINUE_ON_ERROR , EMR_CLUSTER_ID , AWS_ACCOUNT_ID ) ; org . finra . herd . model . api . xml . EmrShellStep emrShellStep = new org . finra . herd . model . api . xml . EmrShellStep ( EMR_STEP_ID , NAMESPACE , EMR_CLUSTER_DEFINITION_NAME , EMR_CLUSTER_NAME , EMR_STEP_NAME , EMR_STEP_SCRIPT_LOCATION , java . util . Arrays . asList ( org . finra . herd . rest . ATTRIBUTE_NAME_1_MIXED_CASE ) , CONTINUE_ON_ERROR , EMR_CLUSTER_ID ) ; when ( emrService . addStepToCluster ( emrShellStepAddRequest ) ) . thenReturn ( emrShellStep ) ; org . finra . herd . model . api . xml . EmrShellStep result = emrRestController . addShellStepToEmrCluster ( emrShellStepAddRequest ) ; verify ( emrService ) . addStepToCluster ( emrShellStepAddRequest ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( emrShellStep , result )
testClassPathWithWildcardIsBuildCorrectlyUsingRelativePath ( ) { java . lang . String wildcard = ( info . novatec . testit . livingdoc . server . domain . RunnerTest . classpathDirectory . getAbsolutePath ( ) ) + "/*.html" ; info . novatec . testit . livingdoc . server . domain . Runner runner = info . novatec . testit . livingdoc . server . domain . Runner . newInstance ( "RUNNER" ) ; runner . getClasspaths ( ) . add ( wildcard ) ; java . util . Collection < java . lang . String > resolvedClassPaths = runner . resolveClassPathsWildcards ( runner . getClasspaths ( ) ) ; "<AssertPlaceHolder>" ; } getClasspaths ( ) { return classpaths ; }
org . junit . Assert . assertEquals ( 2 , resolvedClassPaths . size ( ) )
testMutableAdd ( ) { System . out . println ( "mutableAdd" ) ; cvec . mutableAdd ( ( - 1 ) , dvec ) ; for ( int i = 0 ; i < ( dvec . 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 ( 0.0 , cvec . get ( i ) , 0.0 )
testGetApisMessageByHashcode ( ) { final java . lang . String hash = "1122233" ; gov . gtas . model . ApisMessage m = new gov . gtas . model . ApisMessage ( ) ; m . setHashCode ( hash ) ; m . setCreateDate ( new java . util . Date ( ) ) ; m . setFilePath ( "/tmp/nothing.txt" ) ; apisMessageRepository . save ( m ) ; gov . gtas . model . ApisMessage m2 = apisMessageRepository . findByHashCode ( hash ) ; "<AssertPlaceHolder>" ; } save ( gov . gtas . model . lookup . AppConfiguration ) { appConfigurationRepository . save ( appConfig ) ; return appConfig ; }
org . junit . Assert . assertEquals ( m , m2 )
testSetLanguageSuccessNull ( ) { java . lang . String languageNull = null ; simpleWizard . setLanguage ( languageNull ) ; "<AssertPlaceHolder>" ; } getLanguage ( ) { return language ; }
org . junit . Assert . assertEquals ( languageNull , simpleWizard . getLanguage ( ) )
testFilterConjunction ( ) { org . apache . accumulo . core . iterators . SortedMapIterator source = new org . apache . accumulo . core . iterators . SortedMapIterator ( createKeyValues ( ) ) ; org . apache . accumulo . core . iterators . user . RowFilter filter0 = new org . apache . accumulo . core . iterators . user . RowFilterTest . RowZeroOrOneFilter ( ) ; filter0 . init ( source , java . util . Collections . emptyMap ( ) , new org . apache . accumulo . core . iterators . DefaultIteratorEnvironment ( ) ) ; org . apache . accumulo . core . iterators . user . RowFilter filter = new org . apache . accumulo . core . iterators . user . RowFilterTest . RowOneOrTwoFilter ( ) ; filter . init ( filter0 , java . util . Collections . emptyMap ( ) , new org . apache . accumulo . core . iterators . DefaultIteratorEnvironment ( ) ) ; filter . seek ( new org . apache . accumulo . core . data . Range ( ) , java . util . Collections . emptySet ( ) , false ) ; "<AssertPlaceHolder>" ; } getRows ( java . util . Iterator ) { final java . util . List < java . util . List < java . util . Map . Entry < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > > > result = new java . util . ArrayList ( ) ; final org . apache . accumulo . core . client . RowIterator riter = new org . apache . accumulo . core . client . RowIterator ( iter ) ; while ( riter . hasNext ( ) ) { final java . util . Iterator < java . util . Map . Entry < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > > row = riter . next ( ) ; final java . util . List < java . util . Map . Entry < org . apache . accumulo . core . data . Key , org . apache . accumulo . core . data . Value > > rlist = new java . util . ArrayList ( ) ; while ( row . hasNext ( ) ) rlist . add ( row . next ( ) ) ; result . add ( rlist ) ; } return result ; }
org . junit . Assert . assertEquals ( new java . util . HashSet ( java . util . Arrays . asList ( "1" ) ) , getRows ( filter ) )
testSetImageReturnsDescriptor ( ) { com . eclipsesource . tabris . ui . Action action = mock ( com . eclipsesource . tabris . ui . Action . class ) ; java . io . InputStream image = com . eclipsesource . tabris . internal . ui . ActionDescriptorTest . class . getResourceAsStream ( "testImage.png" ) ; com . eclipsesource . tabris . internal . ui . ActionDescriptor descriptor = new com . eclipsesource . tabris . internal . ui . ActionDescriptor ( "foo" , action ) ; com . eclipsesource . tabris . internal . ui . ActionDescriptor actualDescriptor = descriptor . setImage ( com . eclipsesource . tabris . internal . ui . ImageUtil . getBytes ( image ) ) ; "<AssertPlaceHolder>" ; } getBytes ( java . io . InputStream ) { byte [ ] result = null ; if ( stream != null ) { try { java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; int read ; byte [ ] data = new byte [ 16384 ] ; while ( ( read = stream . read ( data , 0 , data . length ) ) != ( - 1 ) ) { buffer . write ( data , 0 , read ) ; } buffer . flush ( ) ; result = buffer . toByteArray ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . IllegalStateException ( e ) ; } } return result ; }
org . junit . Assert . assertSame ( descriptor , actualDescriptor )
shouldReturnListForGivenStringQuery ( ) { java . lang . String documentId = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity1 = org . springframework . data . elasticsearch . entities . SampleEntity . builder ( ) . id ( documentId ) . message ( "test<sp>message" ) . version ( java . lang . System . currentTimeMillis ( ) ) . build ( ) ; java . lang . String documentId2 = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity2 = org . springframework . data . elasticsearch . entities . SampleEntity . builder ( ) . id ( documentId2 ) . message ( "test<sp>test" ) . rate ( 5 ) . version ( java . lang . System . currentTimeMillis ( ) ) . build ( ) ; java . lang . String documentId3 = randomNumeric ( 5 ) ; org . springframework . data . elasticsearch . entities . SampleEntity sampleEntity3 = org . springframework . data . elasticsearch . entities . SampleEntity . builder ( ) . id ( documentId3 ) . message ( "some<sp>message" ) . rate ( 15 ) . version ( java . lang . System . currentTimeMillis ( ) ) . build ( ) ; java . util . List < org . springframework . data . elasticsearch . core . IndexQuery > indexQueries = getIndexQueries ( java . util . Arrays . asList ( sampleEntity1 , sampleEntity2 , sampleEntity3 ) ) ; elasticsearchTemplate . bulkIndex ( indexQueries ) ; elasticsearchTemplate . refresh ( org . springframework . data . elasticsearch . entities . SampleEntity . class ) ; org . springframework . data . elasticsearch . core . StringQuery stringQuery = new org . springframework . data . elasticsearch . core . StringQuery ( matchAllQuery ( ) . toString ( ) ) ; java . util . List < org . springframework . data . elasticsearch . entities . SampleEntity > sampleEntities = elasticsearchTemplate . queryForList ( stringQuery , org . springframework . data . elasticsearch . entities . SampleEntity . 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 ( sampleEntities . size ( ) , is ( 3 ) )
testToevoegenOnderzoekAanPersoon ( ) { "<AssertPlaceHolder>" ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . PersoonIndicatieHistorie indicatieHistorie = maakPersoonIndicatie ( bestaandPersoon ) ; final nl . bzk . migratiebrp . synchronisatie . dal . service . impl . mapper . strategie . OnderzoekMapper onderzoekMapper = new nl . bzk . migratiebrp . synchronisatie . dal . service . impl . mapper . strategie . OnderzoekMapperImpl ( nieuwPersoon , maakPartij ( ) ) ; onderzoekMapper . mapOnderzoek ( indicatieHistorie , trueWaarde , Element . PERSOON_INDICATIE_ONDERCURATELE_WAARDE ) ; final nl . bzk . algemeenbrp . dal . domein . brp . entity . Onderzoek onderzoek = onderzoekMapper . getOnderzoekSet ( ) . iterator ( ) . next ( ) ; onderzoekDeltaProces . verwerkVerschillen ( context ) ; controleerGekoppeldOnderzoek ( onderzoek ) ; controleerOnderzoek ( onderzoek ) ; } getOnderzoeken ( ) { return onderzoeken ; }
org . junit . Assert . assertTrue ( bestaandPersoon . getOnderzoeken ( ) . isEmpty ( ) )
testHedgingWhenOneFails ( ) { final org . apache . hadoop . hdfs . protocol . ClientProtocol goodMock = org . mockito . Mockito . mock ( org . apache . hadoop . hdfs . protocol . ClientProtocol . class ) ; org . mockito . Mockito . when ( goodMock . getStats ( ) ) . thenAnswer ( new org . mockito . stubbing . Answer < long [ ] > ( ) { @ org . apache . hadoop . hdfs . server . namenode . ha . Override public long [ ] answer ( org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { java . lang . Thread . sleep ( 1000 ) ; return new long [ ] { 1 } ; } } ) ; final org . apache . hadoop . hdfs . protocol . ClientProtocol badMock = org . mockito . Mockito . mock ( org . apache . hadoop . hdfs . protocol . ClientProtocol . class ) ; org . mockito . Mockito . when ( badMock . getStats ( ) ) . thenThrow ( new java . io . IOException ( "Bad<sp>mock<sp>!!" ) ) ; org . apache . hadoop . hdfs . server . namenode . ha . RequestHedgingProxyProvider < org . apache . hadoop . hdfs . protocol . ClientProtocol > provider = new org . apache . hadoop . hdfs . server . namenode . ha . RequestHedgingProxyProvider ( conf , nnUri , org . apache . hadoop . hdfs . protocol . ClientProtocol . class , createFactory ( badMock , goodMock ) ) ; long [ ] stats = provider . getProxy ( ) . proxy . getStats ( ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( badMock ) . getStats ( ) ; org . mockito . Mockito . verify ( goodMock ) . getStats ( ) ; } getStats ( ) { rpcServer . checkOperation ( NameNode . OperationCategory . UNCHECKED ) ; org . apache . hadoop . hdfs . server . federation . router . RemoteMethod method = new org . apache . hadoop . hdfs . server . federation . router . RemoteMethod ( "getStats" ) ; java . util . Set < org . apache . hadoop . hdfs . server . federation . resolver . FederationNamespaceInfo > nss = namenodeResolver . getNamespaces ( ) ; java . util . Map < org . apache . hadoop . hdfs . server . federation . resolver . FederationNamespaceInfo , long [ ] > results = rpcClient . invokeConcurrent ( nss , method , true , false , long [ ] . class ) ; long [ ] combinedData = new long [ STATS_ARRAY_LENGTH ] ; for ( long [ ] data : results . values ( ) ) { for ( int i = 0 ; ( i < ( combinedData . length ) ) && ( i < ( data . length ) ) ; i ++ ) { if ( ( data [ i ] ) >= 0 ) { combinedData [ i ] += data [ i ] ; } } } return combinedData ; }
org . junit . Assert . assertTrue ( ( ( stats . length ) == 1 ) )
testCheckMapExactly_DifferKeys ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( false ) )
testUnaryExpression ( ) { org . antlr . runtime . tree . CommonTree tree_empty = unaryExpression ( "" ) ; "<AssertPlaceHolder>" ; } unaryExpression ( java . lang . String ) { try { setInput ( content ) ; return parser . unaryExpression ( ) . getTree ( ) ; } catch ( org . antlr . runtime . RecognitionException e ) { return null ; } }
org . junit . Assert . assertEquals ( null , tree_empty )
testIp ( ) { byte [ ] bytes = org . spongycastle . util . encoders . Hex . decode ( "41043e96222332ea7848323c08116dddafbfa917b8e37f0bdf63841628267148588a09a43540942d58d49717ad3fabfe14978cf4f0a8b84d2435dad16e9aa4d7f935ac" ) ; com . google . litecoin . core . Script s = new com . google . litecoin . core . Script ( com . google . litecoin . core . ScriptTest . params , bytes , 0 , bytes . length ) ; "<AssertPlaceHolder>" ; } isSentToRawPubKey ( ) { if ( ( chunks . size ( ) ) != 2 ) return false ; return ( ( chunks . get ( 1 ) . equalsOpCode ( com . google . litecoin . core . Script . OP_CHECKSIG ) ) && ( ! ( chunks . get ( 0 ) . isOpCode ) ) ) && ( ( chunks . get ( 0 ) . data . length ) > 1 ) ; }
org . junit . Assert . assertTrue ( s . isSentToRawPubKey ( ) )
testDefaultLeafToNullChangedToFalse_NoNullInOutput ( ) { org . pentaho . di . trans . steps . jsoninput . JsonInputField id = new org . pentaho . di . trans . steps . jsoninput . JsonInputField ( "id" ) ; id . setPath ( "$..id" ) ; id . setType ( ValueMetaInterface . TYPE_STRING ) ; org . pentaho . di . trans . steps . jsoninput . JsonInputField name = new org . pentaho . di . trans . steps . jsoninput . JsonInputField ( "name" ) ; name . setPath ( "$..name" ) ; name . setType ( ValueMetaInterface . TYPE_STRING ) ; java . io . ByteArrayOutputStream out = new java . io . ByteArrayOutputStream ( ) ; helper . redirectLog ( out , LogLevel . ERROR ) ; org . pentaho . di . trans . steps . jsoninput . JsonInputMeta meta = createSimpleMeta ( "json" , id , name ) ; meta . setDefaultPathLeafToNull ( false ) ; meta . setIgnoreMissingPath ( true ) ; final java . lang . String input = org . pentaho . di . trans . steps . jsoninput . JsonInputTest . getPDI17060Json ( ) ; org . pentaho . di . trans . steps . jsoninput . JsonInput jsonInput = createJsonInput ( "json" , meta , new java . lang . Object [ ] { input } ) ; jsonInput . addRowListener ( new org . pentaho . di . trans . steps . jsoninput . JsonInputTest . RowComparatorListener ( new java . lang . Object [ ] { input , "acquisitions" , "Acquisitions" } ) ) ; processRows ( jsonInput , 8 ) ; disposeJsonInput ( jsonInput ) ; "<AssertPlaceHolder>" ; } getLinesWritten ( ) { return linesWritten ; }
org . junit . Assert . assertEquals ( 1 , jsonInput . getLinesWritten ( ) )
nonClusterableNodeStoreAndLeaseTimeout ( ) { nodeStore = new org . apache . jackrabbit . oak . plugins . memory . MemoryNodeStore ( ) ; injectDefaultServices ( ) ; java . util . Map < java . lang . String , java . lang . Object > config = com . google . common . collect . ImmutableMap . < java . lang . String , java . lang . Object > of ( "asyncConfigs" , new java . lang . String [ ] { "async:5" } , "leaseTimeOutMinutes" , "20" ) ; org . apache . sling . testing . mock . osgi . MockOsgi . activate ( service , context . bundleContext ( ) , config ) ; org . apache . jackrabbit . oak . plugins . index . AsyncIndexUpdate indexUpdate = getIndexUpdate ( "async" ) ; "<AssertPlaceHolder>" ; } getLeaseTimeOut ( ) { return leaseTimeOut ; }
org . junit . Assert . assertEquals ( 0 , indexUpdate . getLeaseTimeOut ( ) )
setParameterValue_rightDBWrongContext ( ) { liquibase . changelog . ChangeLogParameters changeLogParameters = new liquibase . changelog . ChangeLogParameters ( new liquibase . database . core . H2Database ( ) ) ; changeLogParameters . setContexts ( new liquibase . Contexts ( "junit" ) ) ; changeLogParameters . set ( "doubleSet" , "originalValue" , "anotherContext" , "anotherLabel" , "baddb,<sp>h2" , true , null ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . String , java . lang . String ) { return getValue ( ( ( namespace + "." ) + property ) ) ; }
org . junit . Assert . assertNull ( changeLogParameters . getValue ( "doubleSet" , null ) )
shouldNotAddContextPathIfNotSlashPrefixed ( ) { org . springframework . springfaces . mvc . servlet . view . BookmarkableRedirectView view = new org . springframework . springfaces . mvc . servlet . view . BookmarkableRedirectView ( "ab" , true ) ; java . lang . String actual = view . getBookmarkUrl ( null , this . request ) ; "<AssertPlaceHolder>" ; } getBookmarkUrl ( java . util . Map , javax . servlet . http . HttpServletRequest ) { return doCreateTargetUrl ( model , request ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( "ab" ) ) )
testGetAllAtomContainers_IReactionSet ( ) { "<AssertPlaceHolder>" ; } getAllAtomContainers ( org . openscience . cdk . interfaces . IReactionSet ) { return org . openscience . cdk . tools . manipulator . MoleculeSetManipulator . getAllAtomContainers ( org . openscience . cdk . tools . manipulator . ReactionSetManipulator . getAllMolecules ( set ) ) ; }
org . junit . Assert . assertEquals ( 3 , org . openscience . cdk . tools . manipulator . ReactionSetManipulator . getAllAtomContainers ( set ) . size ( ) )
testTimer ( ) { com . vladmihalcea . flexypool . metric . micrometer . MicrometerMetrics micrometerMetrics = new com . vladmihalcea . flexypool . metric . micrometer . MicrometerMetrics ( configurationProperties ) ; com . vladmihalcea . flexypool . metric . Timer timer = micrometerMetrics . timer ( "timer" ) ; "<AssertPlaceHolder>" ; } timer ( java . lang . String ) { com . codahale . metrics . Timer timer = new com . codahale . metrics . Timer ( reservoirFactory . newInstance ( com . vladmihalcea . flexypool . metric . Timer . class , name ) ) ; return new com . vladmihalcea . flexypool . metric . codahale . CodahaleTimer ( metricRegistry . register ( name , timer ) ) ; }
org . junit . Assert . assertNotNull ( timer )
testCase2 ( ) { java . lang . String log = "<33>last<sp>message<sp>repeated<sp>7<sp>times" ; java . util . Map < java . lang . String , java . lang . Object > params = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; params . put ( "message" , log ) ; java . util . Map < java . lang . String , java . lang . Object > m = parser . parse ( params ) ; "<AssertPlaceHolder>" ; } parse ( java . util . Map ) { if ( logger . isDebugEnabled ( ) ) logger . debug ( "cpu_used" 9 , log ) ; java . lang . String snmpTrapOid = ( ( java . lang . String ) ( log . get ( "info" 4 ) ) ) ; if ( snmpTrapOid == null ) { logger . warn ( "araqne<sp>logparser<sp>snmptrap:<sp>invalid<sp>wapples<sp>log,<sp>null<sp>snmp<sp>trap<sp>oid<sp>[{}]" , log ) ; return null ; } try { java . text . SimpleDateFormat dateFormat = new java . text . SimpleDateFormat ( "cpu_used" 5 ) ; if ( snmpTrapOid . equals ( "1.3.6.1.4.1.9772.1.2.0.1" ) ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; m . put ( "cpu_used" 1 , dateFormat . parse ( ( ( java . lang . String ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_TIME_OID ) ) ) ) ) ; m . put ( "type" , "info" 5 ) ; m . put ( "src" , ( ( java . net . InetAddress ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_SRC_OID ) ) ) . getHostAddress ( ) ) ; m . put ( "type" 2 , ( ( java . net . InetAddress ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_DST_OID ) ) ) . getHostAddress ( ) ) ; m . put ( "type" 0 , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_URI_OID ) ) ; m . put ( "info" 8 , org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . getRuleName ( ( ( java . lang . Integer ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_RULE_ID_OID ) ) ) ) ) ; m . put ( "rawdata" , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_RAW_DATA_OID ) ) ; m . put ( "cpu_used" 2 , org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . getResponseName ( ( ( java . lang . Integer ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_RESPONSE_VALUE_OID ) ) ) ) ) ; m . put ( "info" 9 , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . DETECT_WEBSITE_HOSTNAME_OID ) ) ; return m ; } else if ( snmpTrapOid . equals ( "1.3.6.1.4.1.9772.1.2.0.2" ) ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; m . put ( "cpu_used" 1 , dateFormat . parse ( ( ( java . lang . String ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . AUDIT_TIME_OID ) ) ) ) ) ; m . put ( "type" , "type" 1 ) ; m . put ( "src" , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . AUDIT_SRC_OID ) ) ; m . put ( "info" , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . AUDIT_INFO_OID ) ) ; m . put ( "type" 3 , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . AUDIT_TYPE_OID ) ) ; m . put ( "cpu_used" 8 , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . AUDIT_MSG_TYPE_OID ) ) ; return m ; } else if ( snmpTrapOid . equals ( "info" 3 ) ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; m . put ( "cpu_used" 1 , dateFormat . parse ( ( ( java . lang . String ) ( log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . STATUS_TIME_OID ) ) ) ) ) ; m . put ( "type" , "cpu_used" 0 ) ; m . put ( "cpu_used" , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . STATUS_CPU_USED_OID ) ) ; m . put ( "info" 1 , log . get ( org . araqne . logparser . snmptrap . pentasecurity . WapplesLogParser . STATUS_MEM_USED_OID ) ) ; return m ; } else if ( snmpTrapOid . equals ( "1.3.6.1.4.1.9772.1.2.0.4" ) ) { java . util . Map < java . lang . String , java . lang . Object > m = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; m .
org . junit . Assert . assertNull ( m )
checkIfGIDIsWithinRange ( ) { System . out . println ( ( ( cz . metacentrum . perun . core . entry . ModulesUtilsEntryIntegrationTest . CLASS_NAME ) + "checkIfGIDIsWithinRange" ) ) ; cz . metacentrum . perun . core . api . Attribute gidRanges = new cz . metacentrum . perun . core . api . Attribute ( perun . getAttributesManagerBl ( ) . getAttributeDefinition ( sess , ( ( cz . metacentrum . perun . core . api . AttributesManager . NS_ENTITYLESS_ATTR_DEF ) + ":namespace-GIDRanges" ) ) ) ; java . util . Map < java . lang . String , java . lang . String > gidRangesValue = new java . util . LinkedHashMap ( ) ; gidRangesValue . put ( "100000" , "100500" ) ; gidRanges . setValue ( gidRangesValue ) ; perun . getAttributesManagerBl ( ) . setAttribute ( sess , namespace , gidRanges ) ; java . util . List < cz . metacentrum . perun . core . api . Attribute > attributes = setUpGroupNamesAndGIDForGroupAndResource ( ) ; int i = 0 ; for ( cz . metacentrum . perun . core . api . Attribute a : attributes ) { if ( a . getFriendlyName ( ) . startsWith ( "unixGID-namespace" ) ) { if ( i == 0 ) a . setValue ( 2000 ) ; else a . setValue ( 100005 ) ; try { modulesUtilsBl . checkIfGIDIsWithinRange ( ( ( cz . metacentrum . perun . core . impl . PerunSessionImpl ) ( sess ) ) , a ) ; } catch ( cz . metacentrum . perun . core . api . exceptions . WrongAttributeValueException ex ) { i ++ ; } } } "<AssertPlaceHolder>" ; } checkIfGIDIsWithinRange ( cz . metacentrum . perun . core . impl . PerunSessionImpl , cz . metacentrum . perun . core . api . Attribute ) { cz . metacentrum . perun . core . impl . Utils . notNull ( attribute , "attribute" ) ; java . lang . Integer gid = null ; if ( ( attribute . getValue ( ) ) != null ) gid = ( ( java . lang . Integer ) ( attribute . getValue ( ) ) ) ; if ( gid == null ) throw new cz . metacentrum . perun . core . api . exceptions . WrongAttributeValueException ( attribute , "Gid<sp>with<sp>null<sp>value<sp>is<sp>not<sp>allowed." ) ; java . lang . String gidNamespace = attribute . getFriendlyNameParameter ( ) ; cz . metacentrum . perun . core . api . Attribute gidRangesAttribute = sess . getPerunBl ( ) . getAttributesManagerBl ( ) . getAttribute ( sess , gidNamespace , cz . metacentrum . perun . core . blImpl . ModulesUtilsBlImpl . A_E_namespace_GIDRanges ) ; java . util . Map < java . lang . Integer , java . lang . Integer > gidRanges = checkAndConvertGIDRanges ( gidRangesAttribute ) ; if ( ! ( isGIDWithinRanges ( gidRanges , gid ) ) ) { throw new cz . metacentrum . perun . core . api . exceptions . WrongAttributeValueException ( attribute , ( ( ( "GID<sp>number<sp>is<sp>not<sp>in<sp>allowed<sp>ranges<sp>" + gidRanges ) + "<sp>for<sp>namespace<sp>" ) + gidNamespace ) ) ; } }
org . junit . Assert . assertEquals ( 1 , i )
testHiveSitePath ( ) { java . lang . String expectedPath = org . apache . hive . common . util . HiveTestUtils . getFileFromClasspath ( "hive-site.xml" ) ; java . lang . String hiveSiteLocation = org . apache . hadoop . hive . conf . HiveConf . getHiveSiteLocation ( ) . getPath ( ) ; "<AssertPlaceHolder>" ; } getPath ( ) { return null ; }
org . junit . Assert . assertEquals ( expectedPath , hiveSiteLocation )
shouldGetMockCollectionGivenTwoTypesOfCollection ( ) { uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField mockCollection1 = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( java . util . Collections . emptySet ( ) , java . util . Set . class , java . io . InputStream . class ) ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField mockCollection2 = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( mock ( java . util . TreeSet . class ) , java . util . TreeSet . class , java . io . InputStream . class ) ; java . util . Set < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > mockCollections = new java . util . HashSet < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > ( java . util . Arrays . < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > asList ( mockCollection1 , mockCollection2 ) ) ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet set = mock ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet . class ) ; given ( set . iterator ( ) ) . willReturn ( mockCollections . iterator ( ) ) ; java . lang . Class < java . util . Set > typeOfCollection = java . util . Set . class ; java . lang . Class < java . io . InputStream > typeOfElements = java . io . InputStream . class ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField actualMockCollection = strategy . getCollectionOfMocksField ( set , typeOfCollection , typeOfElements ) ; "<AssertPlaceHolder>" ; } getCollectionOfMocksField ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet , java . lang . Class , java . lang . Class ) { if ( collectionOfMocksFieldSet == null ) { throw new java . lang . IllegalArgumentException ( "collectionOfMocksFieldSet<sp>must<sp>not<sp>be<sp>null" ) ; } if ( typeOfCollection == null ) { throw new java . lang . IllegalArgumentException ( "typeOfCollection<sp>must<sp>not<sp>be<sp>null" ) ; } if ( typeOfElements == null ) { throw new java . lang . IllegalArgumentException ( "typeOfElements<sp>must<sp>not<sp>be<sp>null" ) ; } uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < C , E > collectionOfMocksField = null ; for ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < ? , ? > candidate : collectionOfMocksFieldSet ) { if ( ( candidate . getTypeOfCollection ( ) . equals ( typeOfCollection ) ) && ( candidate . getTypeOfElements ( ) . equals ( typeOfElements ) ) ) { if ( collectionOfMocksField != null ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( "There<sp>is<sp>more<sp>than<sp>one<sp>CollectionOfMocksField<sp>of<sp>type<sp>of<sp>collection<sp>" + typeOfCollection ) + "<sp>and<sp>type<sp>of<sp>element<sp>" ) + typeOfElements ) + ".<sp>There<sp>may<sp>be<sp>other<sp>offending<sp>duplicates." ) ) ; } collectionOfMocksField = ( ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < C , E > ) ( candidate ) ) ; } } return collectionOfMocksField ; }
org . junit . Assert . assertSame ( mockCollection1 , actualMockCollection )
checkPluginCreation ( ) { info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap < info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap_item . IBootstrapItem < java . lang . String > > bootstrap = mock ( info . smart_tools . smartactors . feature_loading_system . interfaces . ibootstrap . IBootstrap . class ) ; info . smart_tools . smartactors . feature_loading_system . interfaces . iplugin . IPlugin plugin = new info . smart_tools . smartactors . testing_plugins . test_http_endpoint_and_environment_plugin . RegisterTestHttpEndpointAndEnvironment ( bootstrap ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( plugin )
testRedundantSecond ( ) { _orBuilder . add ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_PREFIX ) ; _orBuilder . add ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_IP ) ; "<AssertPlaceHolder>" ; } build ( ) { return new org . batfish . referencelibrary . ReferenceBook ( _name , firstNonNull ( _addressGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _filterGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _interfaceGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceEndpoints , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceObjectGroups , com . google . common . collect . ImmutableList . of ( ) ) , firstNonNull ( _serviceObjects , com . google . common . collect . ImmutableList . of ( ) ) ) ; }
org . junit . Assert . assertThat ( _orBuilder . build ( ) , org . hamcrest . Matchers . equalTo ( org . batfish . datamodel . acl . explanation . DisjunctsBuilderTest . DST_PREFIX ) )
testGetValueRawJson ( ) { createRawJsonProcessor ( ) ; initInputStream ( ) ; inputBodyByteBuf . writeCharSequence ( "\"1\"" , StandardCharsets . UTF_8 ) ; "<AssertPlaceHolder>" ; } getValue ( java . lang . Object [ ] ) { return ( ( T ) ( args [ paramIndex ] ) ) ; }
org . junit . Assert . assertEquals ( "\"1\"" , processor . getValue ( request ) )
error ( ) { java . lang . String uuid = java . util . UUID . randomUUID ( ) . toString ( ) ; resetOutput ( ) ; org . spincast . plugins . logbackutils . tests . DefaultTest . logger . error ( uuid ) ; java . lang . String output = getOutput ( ) ; "<AssertPlaceHolder>" ; } contains ( java . lang . String ) { java . lang . Object object = getElement ( jsonPath , true , getdefaultElementValidator ( ) , true ) ; if ( object == ( getdefaultElementValidator ( ) ) ) { return false ; } else { return true ; } }
org . junit . Assert . assertTrue ( output . contains ( uuid ) )
testMultipleChannels ( ) { java . util . List < org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal > signals = new java . util . ArrayList ( ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 0 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 0 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 0 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 1 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 1 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 1 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 2 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 2 ) ) ; signals . add ( new org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal ( sender , 2 ) ) ; java . util . Collections . shuffle ( signals ) ; synchronized ( this ) { for ( org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . MySignal sig : signals ) { sender . sendSignal ( sig ) ; } } org . eclipse . tracecompass . tmf . core . tests . signal . TmfSignalThrottlerTest . sleep ( 5000 ) ; for ( int nb : listener . nbReceived ) { "<AssertPlaceHolder>" ; } } sleep ( long ) { try { java . lang . Thread . sleep ( millis ) ; } catch ( java . lang . InterruptedException e ) { e . printStackTrace ( ) ; } }
org . junit . Assert . assertEquals ( 1 , nb )
deserializeCollection ( ) { io . reinert . requestor . serialization . DeserializationContext context = org . mockito . Mockito . mock ( io . reinert . requestor . serialization . DeserializationContext . class ) ; org . mockito . Mockito . when ( context . getInstance ( java . util . List . class ) ) . thenReturn ( new java . util . ArrayList ( ) ) ; java . lang . String input = "[true,false,false,true,false]" ; java . util . Collection < java . lang . Boolean > expected = java . util . Arrays . asList ( true , false , false , true , false ) ; @ io . reinert . requestor . serialization . SuppressWarnings ( "unchecked" ) java . util . Collection < java . lang . Boolean > output = serdes . deserialize ( java . util . List . class , input , context ) ; "<AssertPlaceHolder>" ; } deserialize ( java . lang . Class , java . lang . String , io . reinert . requestor . serialization . DeserializationContext ) { C collection = ctx . getInstance ( collectionType ) ; int nextStart = response . indexOf ( "<my>" ) ; while ( nextStart != ( - 1 ) ) { int nextEnd = response . indexOf ( "</my>" , nextStart ) ; collection . add ( deserialize ( response . substring ( ( nextStart + 4 ) , nextEnd ) , ctx ) ) ; nextStart = response . indexOf ( "<my>" , nextEnd ) ; } return collection ; }
org . junit . Assert . assertEquals ( expected , output )
testDoBackWithWebacAcl ( ) { final org . fcrepo . kernel . api . models . FedoraWebacAcl webacAcl = new org . fcrepo . kernel . modeshape . FedoraWebacAclImpl ( webacAclNode ) ; when ( webacAclNode . getPath ( ) ) . thenReturn ( ( ( path ) + "/fedora:acl" ) ) ; final org . apache . jena . rdf . model . Resource converted = converter . reverse ( ) . convert ( webacAcl ) ; final org . apache . jena . rdf . model . Resource expectedResource = createResource ( ( ( "http://localhost:8080/some/" + ( path ) ) + "/fcr:acl" ) ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String ) { final java . util . regex . Matcher matcher = org . fcrepo . http . commons . domain . Range . rangePattern . matcher ( source ) ; if ( ! ( matcher . matches ( ) ) ) { return new org . fcrepo . http . commons . domain . Range ( ) ; } final java . lang . String from = matcher . group ( 1 ) ; final java . lang . String to = matcher . group ( 2 ) ; final long start ; if ( from . equals ( "" ) ) { start = 0 ; } else { start = java . lang . Long . parseLong ( from ) ; } final long end ; if ( to . equals ( "" ) ) { end = - 1 ; } else { end = java . lang . Long . parseLong ( to ) ; } return new org . fcrepo . http . commons . domain . Range ( start , end ) ; }
org . junit . Assert . assertEquals ( expectedResource , converted )
testSerialization ( ) { org . jfree . chart . block . LineBorder b1 = new org . jfree . chart . block . LineBorder ( new java . awt . GradientPaint ( 1.0F , 2.0F , java . awt . Color . RED , 3.0F , 4.0F , java . awt . Color . yellow ) , new java . awt . BasicStroke ( 1.0F ) , new org . jfree . chart . ui . RectangleInsets ( 1.0 , 1.0 , 1.0 , 1.0 ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( b1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . block . LineBorder b2 = ( ( org . jfree . chart . block . LineBorder ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( b1 , b2 )
test4 ( ) { nopol_examples . nopol_example_3 . NopolExample ex = new nopol_examples . nopol_example_3 . NopolExample ( ) ; "<AssertPlaceHolder>" ; } isOddNumber ( int ) { int tmp = ( a - 1 ) % 2 ; if ( tmp != 0 ) { return true ; } return false ; }
org . junit . Assert . assertTrue ( ( ! ( ex . isOddNumber ( 2 ) ) ) )
testGetContentTypesNone ( ) { ddf . catalog . source . solr . provider . SolrProviderTestUtil . deleteAll ( ddf . catalog . source . solr . provider . SolrProviderContentTypes . provider ) ; "<AssertPlaceHolder>" ; } getContentTypes ( ) { return client . getContentTypes ( ) ; }
org . junit . Assert . assertEquals ( 0 , ddf . catalog . source . solr . provider . SolrProviderContentTypes . provider . getContentTypes ( ) . size ( ) )
test_format_simple ( ) { final java . lang . String pattern = "getNextPrintPackage/{SessionID}/{TransactionID}" ; final java . util . Map < java . lang . String , java . lang . String > args = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; args . put ( "SessionID" , "1" ) ; args . put ( "TransactionID" , "2" ) ; final java . lang . String strExpected = "getNextPrintPackage/1/2" ; final java . lang . String strActual = org . adempiere . util . text . MapFormat . format ( pattern , args ) ; "<AssertPlaceHolder>" ; } format ( java . lang . String , java . util . Map ) { return new org . adempiere . util . text . MapFormat ( ) . setArguments ( arguments ) . format ( pattern ) ; }
org . junit . Assert . assertEquals ( strExpected , strActual )
testCanRead ( ) { java . lang . String testFileName = "testCanRead.txt" ; java . lang . String absPath = org . irods . jargon . core . pub . io . IRODSFileImplTest . scratchFileUtils . createAndReturnAbsoluteScratchPath ( org . irods . jargon . core . pub . io . IRODSFileImplTest . IRODS_TEST_SUBDIR_PATH ) ; org . irods . jargon . testutils . filemanip . FileGenerator . generateFileOfFixedLengthGivenName ( absPath , testFileName , 8 ) ; java . lang . String targetIrodsCollection = org . irods . jargon . core . pub . io . IRODSFileImplTest . testingPropertiesHelper . buildIRODSCollectionAbsolutePathFromTestProperties ( org . irods . jargon . core . pub . io . IRODSFileImplTest . testingProperties , org . irods . jargon . core . pub . io . IRODSFileImplTest . IRODS_TEST_SUBDIR_PATH ) ; java . lang . StringBuilder fileNameAndPath = new java . lang . StringBuilder ( ) ; fileNameAndPath . append ( absPath ) ; fileNameAndPath . append ( testFileName ) ; org . irods . jargon . core . connection . IRODSAccount irodsAccount = org . irods . jargon . core . pub . io . IRODSFileImplTest . testingPropertiesHelper . buildIRODSAccountFromTestProperties ( org . irods . jargon . core . pub . io . IRODSFileImplTest . testingProperties ) ; org . irods . jargon . core . pub . IRODSAccessObjectFactory accessObjectFactory = org . irods . jargon . core . pub . io . IRODSFileImplTest . irodsFileSystem . getIRODSAccessObjectFactory ( ) ; org . irods . jargon . core . pub . DataTransferOperations dto = accessObjectFactory . getDataTransferOperations ( irodsAccount ) ; dto . putOperation ( fileNameAndPath . toString ( ) , targetIrodsCollection , "" , null , null ) ; org . irods . jargon . core . pub . io . IRODSFileFactory irodsFileFactory = accessObjectFactory . getIRODSFileFactory ( irodsAccount ) ; org . irods . jargon . core . pub . io . IRODSFile irodsFile = irodsFileFactory . instanceIRODSFile ( ( ( targetIrodsCollection + '/' ) + testFileName ) ) ; "<AssertPlaceHolder>" ; } canRead ( ) { boolean canRead = false ; try { canRead = irodsFileSystemAO . isFileReadable ( this ) ; } catch ( org . irods . jargon . core . exception . FileNotFoundException e ) { org . irods . jargon . core . pub . io . IRODSFileImpl . log . warn ( "file<sp>not<sp>found<sp>exception,<sp>return<sp>false" , e ) ; } catch ( org . irods . jargon . core . exception . JargonException e ) { org . irods . jargon . core . pub . io . IRODSFileImpl . log . error ( "jargon<sp>exception,<sp>rethrow<sp>as<sp>unchecked" , e ) ; throw new org . irods . jargon . core . exception . JargonRuntimeException ( e ) ; } return canRead ; }
org . junit . Assert . assertTrue ( irodsFile . canRead ( ) )
xsdVersion ( ) { final org . basex . query . func . Function . Function func = _VALIDATE_XSD_VERSION ; "<AssertPlaceHolder>" ; } query ( org . basex . http . rest . Function ) { final org . basex . http . rest . HTTPConnection conn = session . conn ; final java . lang . String query = ( "declare<sp>variable<sp>$d<sp>external;" + "declare<sp>variable<sp>$p<sp>external;" ) + ( f . args ( "<sp>$d" , "<sp>$p" ) ) ; return new org . basex . http . rest . XQuery ( query ) . bind ( "d" , conn . db ( ) ) . bind ( "p" , conn . dbpath ( ) ) ; }
org . junit . Assert . assertFalse ( query ( func . args ( ) ) . isEmpty ( ) )
testMpReach ( ) { final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpReachNlriBuilder mpReach = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpReachNlriBuilder ( ) ; mpReach . setAfi ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . L2vpnAddressFamily . class ) ; mpReach . setSafi ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . EvpnSubsequentAddressFamily . class ) ; this . parser . parseNlri ( io . netty . buffer . Unpooled . wrappedBuffer ( IncMultEthTagRParserTest . RESULT ) , mpReach , null ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpReachNlriBuilder mpReachExpected = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpReachNlriBuilder ( ) ; mpReachExpected . setAfi ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . L2vpnAddressFamily . class ) ; mpReachExpected . setSafi ( org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . EvpnSubsequentAddressFamily . class ) ; final org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . mp . reach . nlri . AdvertizedRoutes wd = new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . mp . reach . nlri . AdvertizedRoutesBuilder ( ) . setDestinationType ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . update . attributes . mp . reach . nlri . advertized . routes . destination . type . DestinationEvpnCaseBuilder ( ) . setDestinationEvpn ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . evpn . rev180329 . update . attributes . mp . reach . nlri . advertized . routes . destination . type . destination . evpn . _case . DestinationEvpnBuilder ( ) . setEvpnDestination ( this . dest ) . build ( ) ) . build ( ) ) . build ( ) ; mpReachExpected . setAdvertizedRoutes ( wd ) ; "<AssertPlaceHolder>" ; } parseNlri ( io . netty . buffer . ByteBuf , org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . MpUnreachNlriBuilder , org . opendaylight . protocol . bgp . parser . spi . PeerSpecificParserConstraint ) { if ( ! ( nlri . isReadable ( ) ) ) { return ; } final boolean mPathSupported = org . opendaylight . protocol . bgp . parser . spi . MultiPathSupportUtil . isTableTypeSupported ( constraint , new org . opendaylight . protocol . bgp . parser . BgpTableTypeImpl ( builder . getAfi ( ) , builder . getSafi ( ) ) ) ; builder . setWithdrawnRoutes ( new org . opendaylight . yang . gen . v1 . urn . opendaylight . params . xml . ns . yang . bgp . multiprotocol . rev180329 . update . attributes . mp . unreach . nlri . WithdrawnRoutesBuilder ( ) . setDestinationType ( org . opendaylight . protocol . bgp . mvpn . impl . nlri . Ipv4NlriHandler . parseIpv4UnreachNlri ( nlri , mPathSupported ) ) . build ( ) ) ; }
org . junit . Assert . assertEquals ( mpReachExpected . build ( ) , mpReach . build ( ) )
testGetValidHumanishName ( ) { java . lang . String humanishName = new org . eclipse . jgit . transport . URIish ( ( ( org . eclipse . jgit . transport . URIishTest . GIT_SCHEME ) + "abc" ) ) . getHumanishName ( ) ; "<AssertPlaceHolder>" ; } getHumanishName ( ) { java . lang . String s = getPath ( ) ; if ( ( "/" . equals ( s ) ) || ( "" . equals ( s ) ) ) s = getHost ( ) ; if ( s == null ) throw new java . lang . IllegalArgumentException ( ) ; java . lang . String [ ] elements ; if ( ( "file" . equals ( scheme ) ) || ( org . eclipse . jgit . transport . URIish . LOCAL_FILE . matcher ( s ) . matches ( ) ) ) elements = s . split ( ( ( "[\\" + ( java . io . File . separatorChar ) ) + "/]" ) ) ; else elements = s . split ( "/+" ) ; if ( ( elements . length ) == 0 ) throw new java . lang . IllegalArgumentException ( ) ; java . lang . String result = elements [ ( ( elements . length ) - 1 ) ] ; if ( Constants . DOT_GIT . equals ( result ) ) result = elements [ ( ( elements . length ) - 2 ) ] ; else if ( result . endsWith ( Constants . DOT_GIT_EXT ) ) result = result . substring ( 0 , ( ( result . length ( ) ) - ( Constants . DOT_GIT_EXT . length ( ) ) ) ) ; return result ; }
org . junit . Assert . assertEquals ( "abc" , humanishName )
testGetEqual ( ) { org . openscience . smsd . helper . BinaryTree instance = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; org . openscience . smsd . helper . BinaryTree equal = new org . openscience . smsd . helper . BinaryTree ( 15 ) ; instance . setEqual ( equal ) ; instance . setNotEqual ( new org . openscience . smsd . helper . BinaryTree ( 10 ) ) ; org . openscience . smsd . helper . BinaryTree expResult = equal ; org . openscience . smsd . helper . BinaryTree result = instance . getEqual ( ) ; "<AssertPlaceHolder>" ; } getEqual ( ) { return equal ; }
org . junit . Assert . assertEquals ( expResult , result )
testEvaluateSingleBindingNestedTarget ( ) { com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription firstDescription = new com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription ( ) ; firstDescription . name = "A" ; firstDescription . logConfig = new com . vmware . admiral . compute . container . LogConfig ( ) ; com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription secondDescription = new com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription ( ) ; secondDescription . name = "B" ; secondDescription . hostname = "hostname" ; java . util . List < com . vmware . admiral . compute . content . Binding > bindings = java . util . Arrays . asList ( com . vmware . admiral . compute . BindingEvaluatorTest . binding ( java . util . Arrays . asList ( "log_config" , "type" ) , "B~hostname" ) ) ; com . vmware . admiral . compute . content . Binding . ComponentBinding componentBinding = new com . vmware . admiral . compute . content . Binding . ComponentBinding ( "A" , bindings ) ; com . vmware . admiral . compute . content . CompositeTemplate compositeTemplate = com . vmware . admiral . compute . BindingEvaluatorTest . createCompositeTemplate ( java . util . Arrays . asList ( firstDescription , secondDescription ) , java . util . Arrays . asList ( componentBinding ) ) ; com . vmware . admiral . compute . BindingEvaluator . evaluateBindings ( compositeTemplate ) ; firstDescription = ( ( com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription ) ( compositeTemplate . components . get ( "A" ) . data ) ) ; secondDescription = ( ( com . vmware . admiral . compute . container . ContainerDescriptionService . ContainerDescription ) ( compositeTemplate . components . get ( "B" ) . data ) ) ; "<AssertPlaceHolder>" ; } evaluateBindings ( com . vmware . admiral . compute . content . CompositeTemplate ) { if ( ( ( compositeTemplate . bindings ) == null ) || ( compositeTemplate . bindings . isEmpty ( ) ) ) { return ; } java . util . Map < java . lang . String , com . vmware . admiral . compute . content . ComponentTemplate < ? > > componentNameToTemplate = com . vmware . admiral . compute . BindingEvaluator . getComponentNameToDescription ( compositeTemplate ) ; java . util . Map < java . lang . String , com . vmware . admiral . compute . content . Binding . ComponentBinding > bindingByComponentName = com . vmware . admiral . compute . BindingEvaluator . getBindingByComponentName ( compositeTemplate . bindings ) ; for ( com . vmware . admiral . compute . content . Binding . ComponentBinding componentBinding : bindingByComponentName . values ( ) ) { @ com . vmware . admiral . compute . SuppressWarnings ( "rawtypes" ) com . vmware . admiral . compute . content . ComponentTemplate componentTemplate = componentNameToTemplate . get ( componentBinding . componentName ) ; for ( com . vmware . admiral . compute . content . Binding binding : componentBinding . bindings ) { if ( binding . isProvisioningTimeBinding ( ) ) { continue ; } try { com . vmware . admiral . compute . BindingEvaluator . evaluateBinding ( binding , componentBinding . componentName , componentTemplate , componentNameToTemplate , bindingByComponentName , new java . util . HashSet ( ) ) ; } catch ( java . lang . ReflectiveOperationException | java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } } }
org . junit . Assert . assertEquals ( firstDescription . logConfig . type , secondDescription . hostname )
marshal_nullValue ( ) { "<AssertPlaceHolder>" ; } marshal ( java . math . BigDecimal ) { return org . oscm . billingservice . business . org . oscm . billingservice . business . BigDecimalJaxbCustomBinder . printBigDecimal ( value ) ; }
org . junit . Assert . assertNull ( adapter . marshal ( null ) )
testComplexECDecodeInputStream ( ) { System . out . println ( ) ; System . out . println ( "Running:<sp>testComplexECDecodeInputStream" ) ; org . ccnx . ccn . apps . examples . ccnb . ExampleComplicated ecToEncode = setupEC ( 2 , false , Enumeration . Enu1 ) ; java . io . ByteArrayOutputStream baos = encodeOutput ( "ExampleComplicated<sp>(Complex)" , ecToEncode ) ; "<AssertPlaceHolder>" ; org . ccnx . ccn . apps . examples . ccnb . ExampleComplicated ecToDecodeTo = new org . ccnx . ccn . apps . examples . ccnb . ExampleComplicated ( ) ; decodeOutput ( "ExampleComplicated<sp>(Complex)" , ecToDecodeTo , baos ) ; } encodeOutput ( java . lang . String , org . ccnx . ccn . impl . encoding . GenericXMLEncodable ) { System . out . println ( ( ( ( "Encoding<sp>" + typeName ) + ":<sp>" ) + toEncode ) ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; try { toEncode . encode ( baos ) ; } catch ( org . ccnx . ccn . io . content . ContentEncodingException e ) { System . out . println ( ( ( ( "Exception<sp>" + ( e . getClass ( ) . getName ( ) ) ) + ",<sp>message:<sp>" ) + ( e . getMessage ( ) ) ) ) ; e . printStackTrace ( ) ; return null ; } System . out . print ( ( ( "Encoded<sp>" + typeName ) + ":<sp>" ) ) ; System . out . println ( org . ccnx . ccn . impl . support . DataUtils . printHexBytes ( baos . toByteArray ( ) ) ) ; return baos ; }
org . junit . Assert . assertNotNull ( baos )
testSetsUserTimingCategory ( ) { com . eclipsesource . tabris . tracking . internal . analytics . model . hit . TimingHit eventHit = new com . eclipsesource . tabris . tracking . internal . analytics . model . hit . TimingHit ( ) . setUserTimingCategory ( "foo" ) ; java . lang . String userTimingCategory = ( ( java . lang . String ) ( eventHit . getParameter ( ) . get ( getRequestKey ( com . eclipsesource . tabris . tracking . internal . analytics . model . hit . USER_TIMING_CATEGORY ) ) ) ) ; "<AssertPlaceHolder>" ; } getRequestKey ( java . lang . String ) { return com . eclipsesource . tabris . tracking . internal . piwik . request . RequestKeyProvider . requestKeys . get ( name ) ; }
org . junit . Assert . assertEquals ( "foo" , userTimingCategory )
test ( ) { com . dw . ccm . wechat . base . WeChat weChat = com . dw . ccm . wechat . base . WeChatHelper . getWeChat ( com . dw . ccm . wechat . base . WeChatHelper . getAccessToken ( "wxd2bff322d0c25d5f" , "5383aade955f01939562613bef7a2c44" ) . getAccessToken ( ) ) ; com . dw . ccm . wechat . base . MenuMessage menuMessage = new com . dw . ccm . wechat . base . MenuMessage ( ) ; com . dw . ccm . wechat . base . ButtonGroup firstGroup = new com . dw . ccm . wechat . base . ButtonGroup ( "" 7 ) ; firstGroup . addButton ( new com . dw . ccm . wechat . base . ClickButton ( "" 3 , "" 9 ) ) ; firstGroup . addButton ( new com . dw . ccm . wechat . base . ViewButton ( "" , "http://www.baidu.com" ) ) ; firstGroup . addButton ( new com . dw . ccm . wechat . base . ScanCodeWaitMsgButton ( "" , "SCAN_CODE_MSG_0001" ) ) ; firstGroup . addButton ( new com . dw . ccm . wechat . base . PicSysPhotoButton ( "" 2 , "" 5 ) ) ; com . dw . ccm . wechat . base . ScanCodePushButton secondButton = new com . dw . ccm . wechat . base . ScanCodePushButton ( "" , "" 1 ) ; com . dw . ccm . wechat . base . ButtonGroup thirdGroup = new com . dw . ccm . wechat . base . ButtonGroup ( "2" ) ; thirdGroup . addButton ( new com . dw . ccm . wechat . base . PicPhotoOrAlbumButton ( "" 8 , "" 4 ) ) ; thirdGroup . addButton ( new com . dw . ccm . wechat . base . PicWeiXinButton ( "" , "" 0 ) ) ; thirdGroup . addButton ( new com . dw . ccm . wechat . base . LocationSelectButton ( "" 6 , "LOCATION_SELECT_00001" ) ) ; menuMessage . addButton ( firstGroup ) . addButton ( secondButton ) . addButton ( thirdGroup ) ; System . out . println ( menuMessage . toJson ( ) ) ; com . dw . ccm . wechat . base . message . response . MenuResponse response = weChat . createMenu ( menuMessage . toJson ( ) ) ; "<AssertPlaceHolder>" ; } getErrCode ( ) { return errCode ; }
org . junit . Assert . assertTrue ( ( ( response . getErrCode ( ) ) == 0 ) )
testBulkLoginWithQuotes ( ) { org . talend . components . salesforce . SalesforceConnectionProperties props = setupProps ( null , org . talend . components . salesforce . integration . ADD_QUOTES ) ; props . bulkConnection . setValue ( true ) ; org . talend . daikon . properties . presentation . Form f = props . getForm ( SalesforceConnectionProperties . FORM_WIZARD ) ; props = ( ( org . talend . components . salesforce . SalesforceConnectionProperties ) ( org . talend . daikon . properties . test . PropertiesTestUtils . checkAndValidate ( getComponentService ( ) , f , "testConnection" , props ) ) ) ; "<AssertPlaceHolder>" ; org . talend . components . salesforce . integration . SalesforceComponentTestIT . LOGGER . debug ( props . getValidationResult ( ) . toString ( ) ) ; } getValidationResult ( ) { if ( ( ( prefix . getValue ( ) ) == null ) || ( prefix . getValue ( ) . isEmpty ( ) ) ) { return new org . talend . daikon . properties . ValidationResult ( org . talend . daikon . properties . ValidationResult . Result . ERROR , org . talend . components . azurestorage . blob . helpers . RemoteBlobsTable . messages . getMessage ( "error.VacantPrefix" ) ) ; } return org . talend . daikon . properties . ValidationResult . OK ; }
org . junit . Assert . assertEquals ( ValidationResult . Result . OK , props . getValidationResult ( ) . getStatus ( ) )
testMoveNotExistingSuperiorReferralAncestorCoreAPIWithManageDsaIt ( ) { org . apache . directory . server . core . api . CoreSession coreSession = getService ( ) . getAdminSession ( ) ; org . apache . directory . api . ldap . model . name . Dn dn = new org . apache . directory . api . ldap . model . name . Dn ( "cn=Emmanuel<sp>Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ) ; org . apache . directory . api . ldap . model . name . Dn newParent = new org . apache . directory . api . ldap . model . name . Dn ( "cn=Emmanuel<sp>Lecharny,o=PNN,c=WW,ou=system" ) ; try { coreSession . move ( dn , newParent , true ) ; org . junit . Assert . fail ( ) ; } catch ( org . apache . directory . api . ldap . model . exception . LdapPartialResultException lpre ) { "<AssertPlaceHolder>" ; } } move ( org . apache . directory . api . ldap . model . name . Dn , org . apache . directory . api . ldap . model . name . Dn , boolean ) { move ( dn , newParent , ignoreReferral , LogChange . TRUE ) ; }
org . junit . Assert . assertTrue ( true )
shouldUpdateBucket ( ) { com . couchbase . client . java . cluster . BucketSettings settings = com . couchbase . client . java . cluster . DefaultBucketSettings . builder ( ) . name ( com . couchbase . client . java . ClusterManagerTest . UPDATE_BUCKET ) . password ( "password" ) . quota ( 128 ) . build ( ) ; com . couchbase . client . java . ClusterManagerTest . clusterManager . insertBucket ( settings ) ; settings = com . couchbase . client . java . cluster . DefaultBucketSettings . builder ( ) . name ( com . couchbase . client . java . ClusterManagerTest . UPDATE_BUCKET ) . password ( "password" ) . quota ( 256 ) . build ( ) ; com . couchbase . client . java . ClusterManagerTest . clusterManager . updateBucket ( settings ) ; int size = com . couchbase . client . java . ClusterManagerTest . clusterManager . getBucket ( com . couchbase . client . java . ClusterManagerTest . UPDATE_BUCKET ) . quota ( ) ; com . couchbase . client . java . ClusterManagerTest . clusterManager . removeBucket ( com . couchbase . client . java . ClusterManagerTest . UPDATE_BUCKET ) ; "<AssertPlaceHolder>" ; } removeBucket ( java . lang . String ) { return removeBucket ( name , timeout , com . couchbase . client . java . cluster . DefaultClusterManager . TIMEOUT_UNIT ) ; }
org . junit . Assert . assertEquals ( 256 , size )
testGroupParam ( ) { final org . apache . hadoop . hdfs . web . resources . GroupParam p = new org . apache . hadoop . hdfs . web . resources . GroupParam ( GroupParam . DEFAULT ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( null , p . getValue ( ) )
analyseSingleBitmap ( ) { org . roaringbitmap . RoaringBitmap rb = new org . roaringbitmap . RoaringBitmap ( ) ; rb . add ( 1 , 3 , 6 , 26 , 110 , 1024 ) ; rb . add ( 70000L , 80000L ) ; for ( int i = 5 << 16 ; i < ( 6 << 16 ) ; i ++ ) { rb . add ( i ) ; } org . roaringbitmap . insights . BitmapStatistics result = org . roaringbitmap . insights . BitmapAnalyser . analyse ( rb ) ; org . roaringbitmap . insights . BitmapStatistics expected = new org . roaringbitmap . insights . BitmapStatistics ( new org . roaringbitmap . insights . BitmapStatistics . ArrayContainersStats ( 1 , 6 ) , 1 , 1 ) ; "<AssertPlaceHolder>" ; } analyse ( org . roaringbitmap . RoaringBitmap ) { int acCount = 0 ; int acCardinalitySum = 0 ; int bcCount = 0 ; int rcCount = 0 ; org . roaringbitmap . ContainerPointer cp = r . getContainerPointer ( ) ; while ( ( cp . getContainer ( ) ) != null ) { if ( cp . isBitmapContainer ( ) ) { bcCount += 1 ; } else if ( cp . isRunContainer ( ) ) { rcCount += 1 ; } else { acCount += 1 ; acCardinalitySum += cp . getCardinality ( ) ; } cp . advance ( ) ; } org . roaringbitmap . insights . BitmapStatistics . ArrayContainersStats acStats = new org . roaringbitmap . insights . BitmapStatistics . ArrayContainersStats ( acCount , acCardinalitySum ) ; return new org . roaringbitmap . insights . BitmapStatistics ( acStats , bcCount , rcCount ) ; }
org . junit . Assert . assertEquals ( expected , result )
testVariableDirectoryStraggler ( ) { final java . lang . String s = "" + ( ( ( ( ( "c<sp>1<sp>Foo\n" + "c<sp>2<sp>Bar\n" ) + "p<sp>cnf<sp>3<sp>2\n" ) + "1<sp>-3<sp>0\n" ) + "c<sp>3<sp>Baz\n" ) + "2<sp>3<sp>-1<sp>0" ) ; final de . ovgu . featureide . fm . core . io . dimacs . DimacsReader r = new de . ovgu . featureide . fm . core . io . dimacs . DimacsReader ( ) ; r . setReadingVariableDirectory ( true ) ; final org . prop4j . Node actual = r . read ( s ) ; final org . prop4j . Node expected = new org . prop4j . And ( new org . prop4j . Or ( "Foo" , new org . prop4j . Literal ( "3" , false ) ) , new org . prop4j . Or ( "Bar" , "3" , new org . prop4j . Literal ( "Foo" , false ) ) ) ; "<AssertPlaceHolder>" ; } read ( java . nio . file . Path ) { return de . ovgu . featureide . fm . core . io . manager . FeatureModelManager . load ( modelFilePath ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testNoDoubleUnderscore ( ) { metricName = "echo__two_underscores" ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { if ( ( null == nameForCrossEntityAggregate ) || ( nameForCrossEntityAggregate . isEmpty ( ) ) ) { return true ; } return com . cloudera . csd . validation . monitoring . MonitoringConventions . isValidMetricNameFormat ( nameForCrossEntityAggregate ) ; }
org . junit . Assert . assertFalse ( validator . isValid ( metricName , context ) )
brokenRecipeTest ( ) { java . lang . String recipe = "rule[is(<http://kres.iks-project.eu/ontology.owl#Person>)<sp>-><sp>is(<http://xmlns.com/foaf/0.1/Person>,<sp>?x)]" ; try { org . apache . stanbol . rules . manager . parse . RuleParserImpl . parse ( "http://kres.iks-project.eu/ontology.owl#" , recipe ) ; } catch ( java . lang . IllegalStateException e ) { "<AssertPlaceHolder>" ; } } parse ( java . lang . String , java . lang . String ) { { org . apache . stanbol . rules . manager . parse . RuleParserImpl . kb = new org . apache . stanbol . rules . manager . KB ( namespace ) ; java . io . Reader reader = new java . io . StringReader ( inString ) ; org . apache . stanbol . rules . manager . parse . RuleParserImpl parser = new org . apache . stanbol . rules . manager . parse . RuleParserImpl ( reader ) ; java . lang . StringBuffer buffer = new java . lang . StringBuffer ( ) ; try { parser . start ( ) ; } catch ( org . apache . stanbol . rules . manager . parse . TokenMgrError e ) { throw new java . lang . IllegalStateException ( e ) ; } catch ( org . apache . stanbol . rules . manager . parse . ParseException e ) { throw new java . lang . IllegalStateException ( e ) ; } return org . apache . stanbol . rules . manager . parse . RuleParserImpl . kb ; } }
org . junit . Assert . assertTrue ( true )
stepEmbeddingTest ( ) { java . util . List < java . lang . Integer > expected = java . util . Arrays . asList ( 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ) ; java . util . List < java . lang . Integer > actualEmbeddingsCount = new java . util . ArrayList ( ) ; for ( com . github . bogdanlivadariu . reporting . cucumber . json . models . Feature f : reports . getFeatures ( ) ) { for ( com . github . bogdanlivadariu . reporting . cucumber . json . models . Element e : f . getElements ( ) ) { for ( com . github . bogdanlivadariu . reporting . cucumber . json . models . Step s : e . getSteps ( ) ) { actualEmbeddingsCount . add ( s . getEmbeddings ( ) . length ) ; } } } "<AssertPlaceHolder>" ; } getEmbeddings ( ) { return embeddings ; }
org . junit . Assert . assertEquals ( expected , actualEmbeddingsCount )
should_throw_exception_when_annotation_with_non_entity_class ( ) { com . ctp . cdi . query . meta . extractor . AnnotationMetadataExtractor extractor = new com . ctp . cdi . query . meta . extractor . AnnotationMetadataExtractor ( ) ; com . ctp . cdi . query . meta . DaoEntity result = extractor . extract ( com . ctp . cdi . query . meta . extractor . AnnotationMetadataExtractorTest . NonEntityDao . class ) ; "<AssertPlaceHolder>" ; } extract ( java . lang . Class ) { for ( java . lang . reflect . Type inf : daoClass . getGenericInterfaces ( ) ) { com . ctp . cdi . query . meta . DaoEntity result = extractFrom ( inf ) ; if ( result != null ) { return result ; } } com . ctp . cdi . query . meta . DaoEntity result = extractFrom ( daoClass . getGenericSuperclass ( ) ) ; if ( result != null ) { return result ; } for ( java . lang . reflect . Type intf : daoClass . getGenericInterfaces ( ) ) { result = extractFrom ( intf ) ; if ( result != null ) { return result ; } } if ( ( daoClass . getSuperclass ( ) ) != null ) { return extract ( daoClass . getSuperclass ( ) ) ; } return null ; }
org . junit . Assert . assertNull ( result )
testStartTimeout ( ) { try { java . util . List < java . lang . String > args = getWriterLoopCommand ( ) ; new org . zeroturnaround . exec . ProcessExecutor ( ) . command ( args ) . start ( ) . getFuture ( ) . get ( 1 , TimeUnit . SECONDS ) ; org . junit . Assert . fail ( "TimeoutException<sp>expected." ) ; } catch ( java . util . concurrent . TimeoutException e ) { "<AssertPlaceHolder>" ; } } getFuture ( ) { return future ; }
org . junit . Assert . assertNull ( e . getMessage ( ) )
phraseScoreTest ( ) { java . lang . String query = "ID<sp>==<sp>'TEST_ID'<sp>&&<sp>content:phrase(-1.5,<sp>termOffsetMap,'boy','car')" ; final java . util . List < datawave . webservice . query . result . event . DefaultEvent > events = getQueryResults ( query , true , true ) ; "<AssertPlaceHolder>" ; final java . util . List < java . lang . String > expected = java . util . Arrays . asList ( "boy" , "car" ) ; datawave . query . jexl . functions . ContentFunctionQueryTest . evaluateEvents ( events , expected ) ; } size ( ) { return this . typeMetadata . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , events . size ( ) )
should_get_project_description ( ) { org . sonar . wsclient . services . Resource resource = new org . sonar . wsclient . services . Resource ( ) ; resource . setLongName ( "description" ) ; when ( sonarClient . findResource ( anyString ( ) ) ) . thenReturn ( resource ) ; fr . norad . visuwall . api . domain . SoftwareProjectId softwareProjectId = new fr . norad . visuwall . api . domain . SoftwareProjectId ( "projectId" ) ; java . lang . String description = sonar . getDescription ( softwareProjectId ) ; "<AssertPlaceHolder>" ; } getDescription ( fr . norad . visuwall . api . domain . SoftwareProjectId ) { checkConnected ( ) ; checkSoftwareProjectId ( softwareProjectId ) ; try { java . lang . String artifactId = softwareProjectId . getProjectId ( ) ; org . sonar . wsclient . services . Resource resource = sonarClient . findResource ( artifactId ) ; return resource . getName ( true ) ; } catch ( fr . norad . visuwall . providers . sonar . exception . SonarResourceNotFoundException e ) { throw new fr . norad . visuwall . api . exception . ProjectNotFoundException ( ( "Can't<sp>get<sp>description<sp>of<sp>software<sp>project<sp>id:<sp>" + softwareProjectId ) , e ) ; } }
org . junit . Assert . assertEquals ( "description" , description )
testBuildWithParametersAndDisabledDefaultsWithOrderBy ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; org . lnu . is . domain . department . Department department = new org . lnu . is . domain . department . Department ( ) ; org . lnu . is . domain . address . type . AddressType addressType = new org . lnu . is . domain . address . type . AddressType ( ) ; org . lnu . is . domain . admin . unit . AdminUnit adminUnit = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . domain . street . type . StreetType streetType = new org . lnu . is . domain . street . type . StreetType ( ) ; java . lang . String zipCode = "zip<sp>code" ; java . lang . String street = "street" ; java . lang . String house = "house" ; java . lang . String apartment = "zipCode" 0 ; org . lnu . is . domain . department . address . DepartmentAddress context = new org . lnu . is . domain . department . address . DepartmentAddress ( ) ; context . setDepartment ( department ) ; context . setAddressType ( addressType ) ; context . setAdminUnit ( adminUnit ) ; context . setStreetType ( streetType ) ; context . setZipCode ( zipCode ) ; context . setStreet ( street ) ; context . setHouse ( house ) ; context . setApartment ( apartment ) ; org . lnu . is . pagination . OrderBy orderBy1 = new org . lnu . is . pagination . OrderBy ( "department" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy2 = new org . lnu . is . pagination . OrderBy ( "addressType" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy3 = new org . lnu . is . pagination . OrderBy ( "adminUnit" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy4 = new org . lnu . is . pagination . OrderBy ( "streetType" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy5 = new org . lnu . is . pagination . OrderBy ( "zipCode" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy6 = new org . lnu . is . pagination . OrderBy ( "street" , org . lnu . is . pagination . OrderByType . DESC ) ; org . lnu . is . pagination . OrderBy orderBy7 = new org . lnu . is . pagination . OrderBy ( "house" , org . lnu . is . pagination . OrderByType . ASC ) ; org . lnu . is . pagination . OrderBy orderBy8 = new org . lnu . is . pagination . OrderBy ( "apartment" , org . lnu . is . pagination . OrderByType . DESC ) ; java . util . List < org . lnu . is . pagination . OrderBy > orders = java . util . Arrays . asList ( orderBy1 , orderBy2 , orderBy3 , orderBy4 , orderBy5 , orderBy6 , orderBy7 , orderBy8 ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>DepartmentAddress<sp>e<sp>WHERE<sp>(<sp>e.department<sp>=<sp>:department<sp>AND<sp>e.addressType<sp>=<sp>:addressType<sp>AND<sp>e.adminUnit<sp>=<sp>:adminUnit<sp>AND<sp>e.streetType<sp>=<sp>:streetType<sp>AND<sp>e.zipCode<sp>LIKE<sp>CONCAT('%',:zipCode,'%')<sp>AND<sp>e.street<sp>LIKE<sp>CONCAT('%',:street,'%')<sp>AND<sp>e.house<sp>LIKE<sp>CONCAT('%',:house,'%')<sp>AND<sp>e.apartment<sp>LIKE<sp>CONCAT('%',:apartment,'%')<sp>)<sp>ORDER<sp>BY<sp>e.department<sp>ASC,<sp>e.addressType<sp>DESC,<sp>e.adminUnit<sp>ASC,<sp>e.streetType<sp>DESC,<sp>e.zipCode<sp>ASC,<sp>e.street<sp>DESC,<sp>e.house<sp>ASC,<sp>e.apartment<sp>DESC" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . department . address . DepartmentAddress > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; pagedSearch . setOrders ( orders ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setOrders ( java . util . List ) { this . orders = orders ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
partialSelectorWithNoTargetField ( ) { final org . marc4j . marc . Record record = newRecord ( null , null ) ; final eu . aliada . rdfizer . pipeline . format . marc . selector . binary . ControlFieldExpression expression = new eu . aliada . rdfizer . pipeline . format . marc . selector . binary . ControlFieldExpression ( ( ( A_CONTROL_FIELD_NAME ) + "[00-05]" ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . xml . sax . InputSource ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertNull ( expression . evaluate ( record ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . asset . list . model . AssetListEntryAssetEntryRel missingAssetListEntryAssetEntryRel = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingAssetListEntryAssetEntryRel )
testSetAuthenticationPolicy ( ) { org . apache . activemq . shiro . authc . AuthenticationPolicy policy = new org . apache . activemq . shiro . authc . AuthenticationPolicy ( ) { @ org . apache . activemq . shiro . subject . Override public void customizeSubject ( org . apache . shiro . subject . Subject . Builder subjectBuilder , org . apache . activemq . shiro . ConnectionReference ref ) { } @ org . apache . activemq . shiro . subject . Override public boolean isAuthenticationRequired ( org . apache . activemq . shiro . subject . SubjectConnectionReference ref ) { return false ; } } ; factory . setAuthenticationPolicy ( policy ) ; "<AssertPlaceHolder>" ; } getAuthenticationPolicy ( ) { return authenticationFilter . getAuthenticationPolicy ( ) ; }
org . junit . Assert . assertSame ( policy , factory . getAuthenticationPolicy ( ) )
testGetExportedObjectsByType_01 ( ) { org . eclipse . emf . ecore . EClass classifier = EcorePackage . Literals . ECLASSIFIER ; java . lang . Iterable < org . eclipse . xtext . resource . IEObjectDescription > iterable = container . getExportedObjectsByType ( classifier ) ; org . eclipse . emf . ecore . EObject eObject = com . google . common . collect . Iterables . getOnlyElement ( iterable ) . getEObjectOrProxy ( ) ; "<AssertPlaceHolder>" ; } getEObjectOrProxy ( ) { org . eclipse . emf . ecore . EObject element = super . getEObjectOrProxy ( ) ; org . eclipse . emf . ecore . InternalEObject result = ( ( org . eclipse . emf . ecore . InternalEObject ) ( EcoreFactory . eINSTANCE . create ( element . eClass ( ) ) ) ) ; result . eSetProxyURI ( org . eclipse . emf . ecore . util . EcoreUtil . getURI ( element ) ) ; return result ; }
org . junit . Assert . assertSame ( eClass , eObject )
returnPendingIfNullIsPassedIntoParseLineMulti ( ) { java . lang . String [ ] nextLine = csvParser . parseLineMulti ( "This,\"is<sp>a<sp>\"goo\\d\"<sp>line\\\\<sp>to<sp>parse\\" ) ; org . junit . Assert . assertEquals ( 1 , nextLine . length ) ; org . junit . Assert . assertEquals ( "This" , nextLine [ 0 ] ) ; org . junit . Assert . assertTrue ( csvParser . isPending ( ) ) ; nextLine = csvParser . parseLineMulti ( null ) ; org . junit . Assert . assertEquals ( 1 , nextLine . length ) ; org . junit . Assert . assertEquals ( "is<sp>a<sp>\"good\"<sp>line\\<sp>to<sp>parse\n" , nextLine [ 0 ] ) ; "<AssertPlaceHolder>" ; } isPending ( ) { return ( pending ) != null ; }
org . junit . Assert . assertFalse ( csvParser . isPending ( ) )
should_return_Set_containing_all_elements_in_array ( ) { java . lang . String [ ] expected = new java . lang . String [ ] { "One" , "Two" } ; java . util . LinkedHashSet < java . lang . String > set = org . fest . util . Sets . newLinkedHashSet ( expected ) ; "<AssertPlaceHolder>" ; } newLinkedHashSet ( T [ ] ) { org . fest . util . Preconditions . checkNotNull ( elements ) ; java . util . LinkedHashSet < T > set = new java . util . LinkedHashSet < T > ( ) ; addAll ( set , elements ) ; return set ; }
org . junit . Assert . assertArrayEquals ( expected , set . toArray ( ) )
removeUnits ( ) { stackUnitIs ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "MB" ) ; setUpStack ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE , org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > properties = map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV , map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "1024m" ) , "core-site" , map ( "fs.trash.interval" , "360" ) ) ; org . apache . ambari . server . topology . Configuration configuration = new org . apache . ambari . server . topology . Configuration ( properties , new java . util . HashMap ( ) ) ; org . apache . ambari . server . controller . internal . UnitUpdater . removeUnits ( configuration , stack ) ; java . util . Map < java . lang . String , java . util . Map < java . lang . String , java . lang . String > > expected = map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . OOZIE_ENV , map ( org . apache . ambari . server . controller . internal . UnitUpdaterTest . HEAPSIZE , "1024" ) , "core-site" , map ( "fs.trash.interval" , "360" ) ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return new java . util . Properties ( properties ) ; }
org . junit . Assert . assertEquals ( expected , configuration . getProperties ( ) )
testExpandedNodeIdFourByte ( ) { org . opcfoundation . ua . builtintypes . ExpandedNodeId data = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( null , 0 , 33000 ) ; org . opcfoundation . ua . encoding . EncoderContext ctx = org . opcfoundation . ua . encoding . EncoderContext . getDefaultInstance ( ) ; java . io . ByteArrayOutputStream buf = new java . io . ByteArrayOutputStream ( ) ; org . opcfoundation . ua . encoding . binary . BinaryEncoder enc = new org . opcfoundation . ua . encoding . binary . BinaryEncoder ( buf ) ; enc . setEncoderContext ( ctx ) ; enc . putExpandedNodeId ( null , data ) ; org . opcfoundation . ua . encoding . binary . BinaryDecoder sut = new org . opcfoundation . ua . encoding . binary . BinaryDecoder ( buf . toByteArray ( ) ) ; sut . setEncoderContext ( ctx ) ; org . opcfoundation . ua . builtintypes . ExpandedNodeId actual = sut . getExpandedNodeId ( null ) ; "<AssertPlaceHolder>" ; } getExpandedNodeId ( java . lang . String ) { org . opcfoundation . ua . builtintypes . ExpandedNodeId value = org . opcfoundation . ua . builtintypes . ExpandedNodeId . NULL ; if ( beginFieldSafe ( fieldName , true ) ) { value = org . opcfoundation . ua . builtintypes . ExpandedNodeId . parseExpandedNodeId ( getString ( "Identifier" ) ) ; endField ( fieldName ) ; } int namespaceIndex = value . getNamespaceIndex ( ) ; int serverIndex = value . getServerIndex ( ) . intValue ( ) ; boolean indexChanged = false ; if ( ( ( namespaceMappings ) != null ) && ( ( namespaceMappings . length ) > ( value . getNamespaceIndex ( ) ) ) ) { namespaceIndex = namespaceMappings [ value . getNamespaceIndex ( ) ] . intValue ( ) ; indexChanged = true ; } if ( ( ( serverMappings ) != null ) && ( ( serverMappings . length ) > ( value . getServerIndex ( ) . intValue ( ) ) ) ) { serverIndex = serverMappings [ value . getServerIndex ( ) . intValue ( ) ] . intValue ( ) ; indexChanged = true ; } if ( indexChanged ) value = new org . opcfoundation . ua . builtintypes . ExpandedNodeId ( org . opcfoundation . ua . builtintypes . UnsignedInteger . valueOf ( serverIndex ) , namespaceIndex , value . getValue ( ) ) ; return value ; }
org . junit . Assert . assertEquals ( data , actual )
test_duplicate_method_for_getAllDeclareMethods ( ) { java . lang . reflect . Method [ ] ms = org . nutz . lang . Mirror . me ( org . nutz . lang . MirrorTest . TDMFGADMII . class ) . getAllDeclaredMethodsWithoutTop ( ) ; java . util . List < java . lang . reflect . Method > tmp = new java . util . ArrayList < java . lang . reflect . Method > ( ) ; for ( java . lang . reflect . Method method : ms ) { if ( method . getName ( ) . equals ( "$jacocoInit" ) ) continue ; tmp . add ( method ) ; } if ( ( ms . length ) != ( tmp . size ( ) ) ) ms = tmp . toArray ( new java . lang . reflect . Method [ tmp . size ( ) ] ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( index ) > 0 ? ( ( width ) * ( ( index ) - 1 ) ) + ( cursor ) : cursor ; }
org . junit . Assert . assertEquals ( 2 , ms . length )
testWithinIndex ( ) { db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>class<sp>Polygon<sp>extends<sp>v" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>property<sp>Polygon.geometry<sp>EMBEDDED<sp>OPolygon" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "insert<sp>into<sp>Polygon<sp>set<sp>geometry<sp>=<sp>ST_GeomFromText('POLYGON((0<sp>0,<sp>10<sp>0,<sp>10<sp>5,<sp>0<sp>5,<sp>0<sp>0))')" ) ) . execute ( ) ; db . command ( new com . orientechnologies . orient . core . sql . OCommandSQL ( "create<sp>index<sp>Polygon.g<sp>on<sp>Polygon<sp>(geometry)<sp>SPATIAL<sp>engine<sp>lucene" ) ) . execute ( ) ; java . util . List < com . orientechnologies . orient . core . record . impl . ODocument > execute = db . query ( new com . orientechnologies . orient . core . sql . query . OSQLSynchQuery < com . orientechnologies . orient . core . record . impl . ODocument > ( "SELECT<sp>from<sp>Polygon<sp>where<sp>ST_DWithin(geometry,<sp>ST_GeomFromText('POLYGON((12<sp>0,<sp>14<sp>0,<sp>14<sp>6,<sp>12<sp>6,<sp>12<sp>0))'),<sp>2.0)<sp>=<sp>true" ) ) ; "<AssertPlaceHolder>" ; com . orientechnologies . orient . core . sql . executor . OResultSet resultSet = db . query ( "SELECT<sp>from<sp>Polygon<sp>where<sp>ST_DWithin(geometry,<sp>ST_GeomFromText('POLYGON((12<sp>0,<sp>14<sp>0,<sp>14<sp>6,<sp>12<sp>6,<sp>12<sp>0))'),<sp>2.0)<sp>=<sp>true" ) ; resultSet . stream ( ) . forEach ( ( r ) -> System . out . println ( ( "r<sp>=<sp>" + r ) ) ) ; resultSet . close ( ) ; } size ( ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>yet" ) ; }
org . junit . Assert . assertEquals ( 1 , execute . size ( ) )
createApi ( ) { wizardAction . openNewLiferayModuleWizard ( ) ; wizardAction . newModule . prepareGradle ( project . getName ( ) , com . liferay . ide . ui . module . tests . API ) ; wizardAction . finish ( ) ; jobAction . waitForNoRunningJobs ( ) ; viewAction . project . refreshGradleProject ( com . liferay . ide . ui . module . tests . NewModuleProjectWizardLiferayWorkspaceGradleTests . liferayWorkspace . getName ( ) ) ; "<AssertPlaceHolder>" ; viewAction . project . closeAndDeleteFromDisk ( com . liferay . ide . ui . module . tests . NewModuleProjectWizardLiferayWorkspaceGradleTests . liferayWorkspace . getModuleFiles ( project . getName ( ) ) ) ; } visibleFileTry ( java . lang . String [ ] ) { try { return _getProjects ( ) . isVisible ( files ) ; } catch ( java . lang . Exception e ) { _getProjects ( ) . setFocus ( ) ; try { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - 1 ) ) ; _getProjects ( ) . expand ( parents ) ; _getProjects ( ) . contextMenu ( com . liferay . ide . ui . liferay . action . REFRESH , parents ) ; ide . sleep ( 2000 ) ; } catch ( java . lang . Exception e1 ) { } for ( int i = ( files . length ) - 1 ; i > 0 ; i -- ) { java . lang . String [ ] parents = java . util . Arrays . copyOfRange ( files , 0 , ( ( files . length ) - i ) ) ; org . eclipse . swtbot . swt . finder . widgets . SWTBotTreeItem parent = _getProjects ( ) . getTreeItem ( parents ) ; _getProjects ( ) . expand ( parents ) ; java . lang . String subnode = files [ ( ( files . length ) - i ) ] ; _jobAction . waitForSubnode ( parent , subnode , com . liferay . ide . ui . liferay . action . REFRESH ) ; } return _getProjects ( ) . isVisible ( files ) ; } }
org . junit . Assert . assertTrue ( viewAction . project . visibleFileTry ( com . liferay . ide . ui . module . tests . NewModuleProjectWizardLiferayWorkspaceGradleTests . liferayWorkspace . getModuleFiles ( project . getName ( ) ) ) )
testQuaternion ( ) { io . netty . buffer . ByteBuf buf = io . netty . buffer . Unpooled . buffer ( ) ; org . spout . api . util . ByteBufUtils . writeQuaternion ( buf , Quaternionf . IDENTITY ) ; "<AssertPlaceHolder>" ; } readQuaternion ( io . netty . buffer . ByteBuf ) { final float x = buffer . readFloat ( ) ; final float y = buffer . readFloat ( ) ; final float z = buffer . readFloat ( ) ; final float w = buffer . readFloat ( ) ; return new org . spout . math . imaginary . Quaternionf ( x , y , z , w ) ; }
org . junit . Assert . assertEquals ( Quaternionf . IDENTITY , org . spout . api . util . ByteBufUtils . readQuaternion ( buf ) )
testReadURL ( ) { java . lang . String urlPom = org . apache . commons . io . FileUtils . readFileToString ( fileIO . resolveURL ( new java . net . URL ( mockServer . getUrl ( ) ) ) ) ; java . lang . String filePom = org . apache . commons . io . FileUtils . readFileToString ( new java . io . File ( new java . io . File ( org . commonjava . maven . ext . io . FileIOTest . class . getResource ( "/" ) . getPath ( ) ) . getParentFile ( ) . getParentFile ( ) , "pom.xml" ) , "UTF-8" ) ; "<AssertPlaceHolder>" ; } getUrl ( ) { return "http://127.0.0.1:" + ( getPort ( ) ) ; }
org . junit . Assert . assertEquals ( urlPom , filePom )
testSoftReferenceHandling ( ) { final int maxSize = 10 ; final int iters = 50 ; final org . thymeleaf . cache . StandardCache < java . lang . String , java . lang . String > cache = new org . thymeleaf . cache . StandardCache < java . lang . String , java . lang . String > ( "testSoftReferences" , true , 2 , maxSize , org . slf4j . helpers . NOPLogger . NOP_LOGGER ) ; int keyCount = 0 ; int cacheSize = 0 ; for ( int i = 0 ; i < iters ; i ++ ) { java . lang . String key = "key" + keyCount ; cache . get ( key ) ; cache . put ( key , ( "value" + keyCount ) ) ; cacheSize = cache . size ( ) ; keyCount = ( keyCount + 1 ) % maxSize ; if ( i == ( maxSize + 1 ) ) { try { java . lang . Object [ ] ignored = new java . lang . Object [ ( ( int ) ( java . lang . Runtime . getRuntime ( ) . maxMemory ( ) ) ) ] ; } catch ( java . lang . Throwable ignored2 ) { } } } "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( maxSize , cacheSize )
testGetTableNotExists ( ) { boolean expected = false ; when ( _server . getTableAttributes ( "table-name" ) ) . thenThrow ( new com . bazaarvoice . emodb . sor . api . UnknownTableException ( ) ) ; boolean actual = blobClient ( ) . getTableExists ( "table-name" ) ; "<AssertPlaceHolder>" ; verify ( _server ) . getTableAttributes ( "table-name" ) ; verifyNoMoreInteractions ( _server ) ; } getTableExists ( java . lang . String ) { return _authBlobStore . getTableExists ( _apiKey , table ) ; }
org . junit . Assert . assertEquals ( actual , expected )