input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
diagnosticsStatusNotificationVerifyResponse ( ) { io . motown . ocpp . v12 . soap . centralsystem . DiagnosticsStatusNotificationRequest request = new io . motown . ocpp . v12 . soap . centralsystem . DiagnosticsStatusNotificationRequest ( ) ; io . motown . ocpp . v12 . soap . centralsystem . DiagnosticsStatusNotificationResponse response = motownCentralSystemService . diagnosticsStatusNotification ( request , io . motown . ocpp . v12 . soap . centralsystem . CHARGING_STATION_ID . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertNotNull ( response )
getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDS . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; "<AssertPlaceHolder>" ; } getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDS . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; org . junit . Assert . assertEquals ( "SampleLdapIDSRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDS . servlet . getRealm ( ) ) ; }
org . junit . Assert . assertEquals ( "SampleLdapIDSRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestIDS . servlet . getRealm ( ) )
keySet_ToArray_withLargeTarget ( ) { org . eclipse . collections . impl . map . sorted . immutable . ImmutableTreeMap < java . lang . Integer , java . lang . String > immutableSortedMap = new org . eclipse . collections . impl . map . sorted . immutable . ImmutableTreeMap ( SortedMaps . mutable . of ( 1 , "1" , 2 , "2" , 3 , "3" , 4 , "4" ) ) ; java . lang . Integer [ ] target = new java . lang . Integer [ 6 ] ; target [ 4 ] = 42 ; target [ 5 ] = 42 ; java . lang . Integer [ ] result = immutableSortedMap . keySet ( ) . toArray ( target ) ; org . eclipse . collections . impl . utility . ArrayIterate . sort ( result , result . length , org . eclipse . collections . impl . block . factory . Comparators . safeNullsHigh ( Integer :: compareTo ) ) ; "<AssertPlaceHolder>" ; } safeNullsHigh ( java . util . Comparator ) { return new org . eclipse . collections . impl . block . factory . Comparators . SafeNullsHighComparator ( notNullSafeComparator ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . Integer [ ] { 1 , 2 , 3 , 4 , 42 , null } , result )
testEulerNumber_singleSquareC8 ( ) { ij . process . ImageProcessor image = new ij . process . ByteProcessor ( 8 , 8 ) ; for ( int i = 2 ; i < 6 ; i ++ ) { for ( int j = 2 ; j < 6 ; j ++ ) { image . set ( i , j , 255 ) ; } } int euler = inra . ijpb . measure . IntrinsicVolumes2D . eulerNumber ( image , 8 ) ; "<AssertPlaceHolder>" ; } eulerNumber ( ij . process . ImageProcessor , int ) { int [ ] lut = inra . ijpb . measure . region2d . IntrinsicVolumesAnalyzer2D . eulerNumberIntLut ( conn ) ; int [ ] histo = new inra . ijpb . measure . region2d . BinaryConfigurationsHistogram2D ( ) . process ( image ) ; return ( inra . ijpb . measure . region2d . BinaryConfigurationsHistogram2D . applyLut ( histo , lut ) ) / 4 ; }
org . junit . Assert . assertEquals ( 1 , euler )
shouldBuildCreateQueryStatement ( ) { java . lang . String expected = "CREATE<sp>TABLE<sp>`myTable`<sp>(\n" + ( ( ( ( ( ( ( ( "`c1`<sp>INT<sp>NOT<sp>NULL,\n" + "`c2`<sp>BIGINT<sp>NOT<sp>NULL,\n" ) + "`c3`<sp>VARCHAR(256)<sp>NOT<sp>NULL,\n" ) + "`c4`<sp>VARCHAR(256)<sp>NULL,\n" ) + "`c5`<sp>DATE<sp>DEFAULT<sp>\'2001-03-15\',\n" ) + "`c6`<sp>TIME(3)<sp>DEFAULT<sp>\'00:00:00.000\',\n" ) + "`c7`<sp>DATETIME(3)<sp>DEFAULT<sp>\'2001-03-15<sp>00:00:00.000\',\n" ) + "`c8`<sp>DECIMAL(65,4)<sp>NULL,\n" ) + "PRIMARY<sp>KEY(`c1`))" ) ; java . lang . String sql = dialect . buildCreateTableStatement ( tableId , sinkRecordFields ) ; "<AssertPlaceHolder>" ; } buildCreateTableStatement ( io . confluent . connect . jdbc . util . TableId , java . util . Collection ) { io . confluent . connect . jdbc . util . ExpressionBuilder builder = expressionBuilder ( ) ; final java . util . List < java . lang . String > pkFieldNames = extractPrimaryKeyFieldNames ( fields ) ; builder . append ( "CREATE<sp>TABLE<sp>" ) ; builder . append ( table ) ; builder . append ( "<sp>(" ) ; writeColumnsSpec ( builder , fields ) ; if ( ! ( pkFieldNames . isEmpty ( ) ) ) { builder . append ( "," ) ; builder . append ( java . lang . System . lineSeparator ( ) ) ; builder . append ( "PRIMARY<sp>KEY(" ) ; builder . appendList ( ) . delimitedBy ( "," ) . transformedBy ( io . confluent . connect . jdbc . util . ExpressionBuilder . quote ( ) ) . of ( pkFieldNames ) ; builder . append ( ")" ) ; } builder . append ( ")" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , sql )
replace_2arg_NullValue ( ) { try { "<AssertPlaceHolder>" ; org . junit . Assert . fail ( "should<sp>have<sp>thrown<sp>an<sp>exception<sp>-<sp>null<sp>value<sp>not<sp>allowed" ) ; } catch ( java . lang . NullPointerException e ) { } }
org . junit . Assert . assertFalse ( cache . replace ( 1L , null ) )
testConstructor ( ) { org . openscience . cdk . qsar . DescriptorEngine engine = new org . openscience . cdk . qsar . DescriptorEngine ( org . openscience . cdk . qsar . IMolecularDescriptor . class , org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; "<AssertPlaceHolder>" ; } getInstance ( ) { org . openscience . cdk . interfaces . IChemObjectBuilder result = org . openscience . cdk . DefaultChemObjectBuilder . instance ; if ( result == null ) { result = org . openscience . cdk . DefaultChemObjectBuilder . instance ; synchronized ( org . openscience . cdk . DefaultChemObjectBuilder . LOCK ) { if ( result == null ) { org . openscience . cdk . DefaultChemObjectBuilder . instance = result = new org . openscience . cdk . DefaultChemObjectBuilder ( ) ; } } } return result ; }
org . junit . Assert . assertNotNull ( engine )
datasetShouldNotBeDeaccessionedWithNoVersions ( ) { java . util . List < edu . harvard . iq . dataverse . DatasetVersion > versionList = new java . util . ArrayList < edu . harvard . iq . dataverse . DatasetVersion > ( ) ; edu . harvard . iq . dataverse . Dataset dataset = new edu . harvard . iq . dataverse . Dataset ( ) ; dataset . setVersions ( versionList ) ; "<AssertPlaceHolder>" ; } isDeaccessioned ( ) { return versionState . equals ( edu . harvard . iq . dataverse . DatasetVersion . VersionState . DEACCESSIONED ) ; }
org . junit . Assert . assertFalse ( dataset . isDeaccessioned ( ) )
testIsValidSecurityZoneForDeleteWithWrongNameReturnFalse ( ) { org . apache . ranger . plugin . model . RangerSecurityZone suppliedSecurityZone = getRangerSecurityZone ( ) ; org . mockito . Mockito . when ( _store . getSecurityZone ( suppliedSecurityZone . getName ( ) ) ) . thenReturn ( null ) ; java . util . List < org . apache . ranger . plugin . model . validation . ValidationFailureDetails > failures = new java . util . ArrayList < org . apache . ranger . plugin . model . validation . ValidationFailureDetails > ( ) ; boolean isValid = rangerSecurityZoneValidator . isValid ( suppliedSecurityZone . getName ( ) , RangerValidator . Action . DELETE , failures ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertFalse ( isValid )
testTimeExpressionWithoutTime ( ) { java . util . Date dt = new java . util . Date ( ) ; java . util . Date dueDate = testExpression ( new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . format ( new java . util . Date ( ) ) ) ; "<AssertPlaceHolder>" ; } format ( java . util . logging . LogRecord ) { java . lang . StringBuilder line = new java . lang . StringBuilder ( ) ; line . append ( org . camunda . bpm . engine . impl . util . LogUtil . dateFormat . format ( new java . util . Date ( ) ) ) ; if ( Level . FINE . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>FIN<sp>" ) ; } else if ( Level . FINEST . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>FST<sp>" ) ; } else if ( Level . INFO . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>INF<sp>" ) ; } else if ( Level . SEVERE . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>SEV<sp>" ) ; } else if ( Level . WARNING . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>WRN<sp>" ) ; } else if ( Level . FINER . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>FNR<sp>" ) ; } else if ( Level . CONFIG . equals ( record . getLevel ( ) ) ) { line . append ( "<sp>CFG<sp>" ) ; } int threadId = record . getThreadID ( ) ; java . lang . String threadIndent = org . camunda . bpm . engine . impl . util . LogUtil . LogFormatter . getThreadIndent ( threadId ) ; line . append ( threadIndent ) ; line . append ( "<sp>|<sp>" ) ; line . append ( record . getMessage ( ) ) ; if ( ( record . getThrown ( ) ) != null ) { line . append ( org . camunda . bpm . engine . impl . util . LogUtil . LINE_SEPARATOR ) ; java . io . StringWriter stringWriter = new java . io . StringWriter ( ) ; java . io . PrintWriter printWriter = new java . io . PrintWriter ( stringWriter ) ; record . getThrown ( ) . printStackTrace ( printWriter ) ; line . append ( stringWriter . toString ( ) ) ; } line . append ( "<sp>[" ) ; line . append ( record . getLoggerName ( ) ) ; line . append ( "]" ) ; line . append ( org . camunda . bpm . engine . impl . util . LogUtil . LINE_SEPARATOR ) ; return line . toString ( ) ; }
org . junit . Assert . assertEquals ( new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . format ( dt ) , new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . format ( dueDate ) )
testGetByModelNone ( ) { uk . ac . bbsrc . tgac . miso . core . data . InstrumentModel platform = dao . getByAlias ( "Coco<sp>Rocha" ) ; "<AssertPlaceHolder>" ; } getByAlias ( java . lang . String ) { org . hibernate . Criteria criteria = currentSession ( ) . createCriteria ( uk . ac . bbsrc . tgac . miso . core . data . ArrayRun . class ) ; criteria . add ( org . hibernate . criterion . Restrictions . eq ( "alias" , alias ) ) ; return ( ( uk . ac . bbsrc . tgac . miso . core . data . ArrayRun ) ( criteria . uniqueResult ( ) ) ) ; }
org . junit . Assert . assertNull ( platform )
findOrCreateFromInnerToOuter ( ) { cruise . umple . compiler . State outsideOn = new cruise . umple . compiler . State ( "OutsideOn" , sm ) ; cruise . umple . compiler . State on = new cruise . umple . compiler . State ( "On" , sm ) ; cruise . umple . compiler . StateMachine innerSm = new cruise . umple . compiler . StateMachine ( "innerSm" ) ; outsideOn . addNestedStateMachine ( innerSm ) ; innerSm . findState ( "Off" ) ; cruise . umple . compiler . State alsoOn = innerSm . findState ( "On" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertSame ( on , alsoOn )
shouldUseInfinitestClassLoaderForProcessClassPath ( ) { org . infinitest . util . LoggingAdapter listener = new org . infinitest . util . LoggingAdapter ( ) ; addLoggingListener ( listener ) ; org . infinitest . environment . RuntimeEnvironment environment = new org . infinitest . environment . RuntimeEnvironment ( org . infinitest . environment . FakeEnvironments . currentJavaHome ( ) , org . infinitest . environment . FakeEnvironments . fakeWorkingDirectory ( ) , org . infinitest . environment . FakeEnvironments . systemClasspath ( ) , org . infinitest . environment . FakeEnvironments . systemClasspath ( ) , org . infinitest . environment . FakeEnvironments . fakeBuildPaths ( ) , org . infinitest . environment . FakeEnvironments . systemClasspath ( ) ) ; java . util . Map < java . lang . String , java . lang . String > env = environment . createProcessEnvironment ( ) ; "<AssertPlaceHolder>" . containsEntry ( "CLASSPATH" , environment . getRunnerBootstrapClassPath ( ) ) ; } createProcessEnvironment ( ) { java . util . Map < java . lang . String , java . lang . String > environment = newHashMap ( ) ; environment . put ( "CLASSPATH" , getRunnerBootstrapClassPath ( ) ) ; return environment ; }
org . junit . Assert . assertThat ( env )
testPercent ( ) { org . apache . abdera . i18n . iri . IRI iri1 = new org . apache . abdera . i18n . iri . IRI ( "http://example.org/%7e%2Fuser?%2f" ) ; org . apache . abdera . i18n . iri . IRI iri2 = new org . apache . abdera . i18n . iri . IRI ( "http://example.org/%7E%2fuser?/" ) ; "<AssertPlaceHolder>" ; } normalize ( ) { return org . apache . abdera . i18n . iri . IRI . normalize ( this ) ; }
org . junit . Assert . assertTrue ( iri1 . normalize ( ) . equals ( iri2 . normalize ( ) ) )
generateWithDefault ( ) { org . sonatype . nexus . internal . wonderland . AuthTicketGenerator generator = new org . sonatype . nexus . internal . wonderland . AuthTicketGenerator ( new org . sonatype . nexus . crypto . internal . RandomBytesGeneratorImpl ( new org . sonatype . nexus . crypto . internal . CryptoHelperImpl ( ) ) , 16 ) ; java . lang . String token = generator . generate ( ) ; log ( token ) ; "<AssertPlaceHolder>" ; } generate ( ) { if ( ( ( value ) == null ) || ( ! ( applicationVersion . getEdition ( ) . equals ( edition ) ) ) ) { edition = applicationVersion . getEdition ( ) ; value = java . lang . String . format ( "Nexus/%s<sp>(%s;<sp>%s;<sp>%s;<sp>%s;<sp>%s)" , applicationVersion . getVersion ( ) , edition , java . lang . System . getProperty ( "os.name" ) , java . lang . System . getProperty ( "os.version" ) , java . lang . System . getProperty ( "os.arch" ) , java . lang . System . getProperty ( "java.version" ) ) ; } return value ; }
org . junit . Assert . assertNotNull ( token )
testRemove ( ) { com . liferay . blogs . model . BlogsEntry newBlogsEntry = addBlogsEntry ( ) ; _persistence . remove ( newBlogsEntry ) ; com . liferay . blogs . model . BlogsEntry existingBlogsEntry = _persistence . fetchByPrimaryKey ( newBlogsEntry . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingBlogsEntry )
testToObjectArrayNull ( ) { java . lang . Object [ ] objnull = org . yes . cart . utils . impl . ObjectUtil . toObjectArray ( null ) ; "<AssertPlaceHolder>" ; } toObjectArray ( java . lang . Object ) { if ( obj == null ) { return new java . lang . Object [ ] { null } ; } if ( ( ( obj . getClass ( ) . isPrimitive ( ) ) || ( obj . getClass ( ) . getName ( ) . startsWith ( "java.lang" ) ) ) || ( obj . getClass ( ) . isArray ( ) ) ) { return org . yes . cart . utils . impl . ObjectUtil . escapeXml ( obj ) ; } final java . lang . reflect . Field [ ] fields = obj . getClass ( ) . getDeclaredFields ( ) ; final java . lang . Object [ ] rez = new java . lang . Object [ fields . length ] ; for ( int i = 0 ; i < ( fields . length ) ; i ++ ) { if ( java . lang . reflect . Modifier . isStatic ( fields [ i ] . getModifiers ( ) ) ) { rez [ i ] = "Static:<sp>" + ( fields [ i ] . getName ( ) ) ; continue ; } if ( ! ( fields [ i ] . isAccessible ( ) ) ) { fields [ i ] . setAccessible ( true ) ; } try { final java . lang . Object value = fields [ i ] . get ( obj ) ; if ( value instanceof org . hibernate . proxy . HibernateProxy ) { rez [ i ] = ( ( ( ( ( org . hibernate . proxy . HibernateProxy ) ( value ) ) . getHibernateLazyInitializer ( ) . getIdentifier ( ) ) + ":<sp>" ) + ( fields [ i ] . getName ( ) ) ) + "<sp>(H)" ; } else if ( value instanceof org . yes . cart . domain . entity . Auditable ) { rez [ i ] = ( ( ( ( org . yes . cart . domain . entity . Auditable ) ( value ) ) . getId ( ) ) + ":<sp>" ) + ( fields [ i ] . getName ( ) ) ; } else if ( value instanceof org . hibernate . collection . spi . PersistentCollection ) { rez [ i ] = ( "Collection:<sp>" + ( fields [ i ] . getName ( ) ) ) + "<sp>(H)" ; } else if ( value instanceof java . util . Collection ) { rez [ i ] = "Collection:<sp>" + ( fields [ i ] . getName ( ) ) ; } else if ( value instanceof java . util . Map ) { rez [ i ] = "Map:<sp>" + ( fields [ i ] . getName ( ) ) ; } else if ( value != null ) { rez [ i ] = org . apache . commons . lang . StringEscapeUtils . escapeXml ( java . lang . String . valueOf ( value ) ) ; } } catch ( java . lang . Exception ex ) { rez [ i ] = ( ( "Error:<sp>" + ( fields [ i ] . getName ( ) ) ) + ",<sp>cause:<sp>" ) + ( ex . getMessage ( ) ) ; } } return rez ; }
org . junit . Assert . assertNull ( objnull [ 0 ] )
test6 ( ) { "<AssertPlaceHolder>" ; } nextPrime ( int ) { if ( n < 0 ) throw new java . lang . IllegalArgumentException ( ( "Negative<sp>input:<sp>" + n ) ) ; if ( n == 2 ) return 2 ; n = n | 1 ; if ( n == 1 ) { return 2 ; } if ( cc . redberry . rings . primes . SmallPrimes . isPrime ( n ) ) { return n ; } final int rem = n % 3 ; if ( 0 == rem ) { n += 2 ; } else if ( 1 == rem ) { n += 4 ; } while ( true ) { if ( cc . redberry . rings . primes . SmallPrimes . isPrime ( n ) ) { return n ; } n += 2 ; if ( cc . redberry . rings . primes . SmallPrimes . isPrime ( n ) ) { return n ; } n += 4 ; } }
org . junit . Assert . assertEquals ( Integer . MAX_VALUE , cc . redberry . rings . primes . SmallPrimes . SmallPrimes . nextPrime ( Integer . MAX_VALUE ) )
scheduleAtFixedRateConcurrentTest ( ) { java . util . concurrent . ScheduledExecutorService scheduler = makeScheduler ( 2 ) ; try { final int periodInMillis = DELAY_TIME ; final int runnableSleepTime = ( DELAY_TIME ) * 2 ; org . threadly . test . concurrent . TestRunnable tr = new org . threadly . test . concurrent . TestRunnable ( runnableSleepTime ) ; scheduler . scheduleAtFixedRate ( tr , 0 , periodInMillis , TimeUnit . MILLISECONDS ) ; tr . blockTillFinished ( ( 1000 * 10 ) , org . threadly . concurrent . wrapper . compatibility . CYCLE_COUNT ) ; tr . setRunDelayInMillis ( 0 ) ; org . threadly . test . concurrent . TestUtils . sleep ( ( periodInMillis * 2 ) ) ; "<AssertPlaceHolder>" ; } finally { scheduler . shutdownNow ( ) ; } } ranConcurrently ( ) { return ranConcurrent ; }
org . junit . Assert . assertFalse ( tr . ranConcurrently ( ) )
testGetCallableRequest ( ) { System . out . println ( "getCallableRequest" ) ; gov . hhs . fha . nhinc . gateway . executorservice . ResponseWrapper instance = new gov . hhs . fha . nhinc . gateway . executorservice . ResponseWrapper ( ) ; java . lang . Object expResult = null ; java . lang . Object result = instance . getCallableRequest ( ) ; "<AssertPlaceHolder>" ; } getCallableRequest ( ) { return request ; }
org . junit . Assert . assertEquals ( expResult , result )
collectWithIndex ( ) { org . eclipse . collections . api . stack . StackIterable < java . lang . String > stack = this . newStackFromTopToBottom ( "4" , "3" , "2" , "1" ) ; org . eclipse . collections . api . stack . StackIterable < org . eclipse . collections . api . tuple . primitive . ObjectIntPair < java . lang . String > > expected = this . newStackFromTopToBottom ( org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( "4" , 0 ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( "3" , 1 ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( "2" , 2 ) , org . eclipse . collections . impl . tuple . primitive . PrimitiveTuples . pair ( "1" , 3 ) ) ; "<AssertPlaceHolder>" ; } collectWithIndex ( org . eclipse . collections . api . block . function . primitive . ObjectIntToObjectFunction ) { return this . mutableStack . collectWithIndex ( function ) ; }
org . junit . Assert . assertEquals ( expected , stack . collectWithIndex ( PrimitiveTuples :: pair ) )
shouldFindDependenciesInSamePackage ( ) { org . infinitest . parser . JavaClass javaClass = builder . getClass ( org . infinitest . parser . FakeTree . class . getName ( ) ) ; "<AssertPlaceHolder>" . contains ( org . infinitest . parser . FakeDependency . class . getName ( ) ) ; } getImports ( ) { return org . infinitest . parser . UnparsableClass . NO_IMPORT ; }
org . junit . Assert . assertThat ( javaClass . getImports ( ) )
testValidate_3 ( ) { java . lang . String line = "append<sp>into<sp>/this" ; net . roboconf . core . commands . AppendCommandInstruction instr = new net . roboconf . core . commands . AppendCommandInstruction ( this . context , line , 1 ) ; java . util . List < net . roboconf . core . model . ParsingError > errors = instr . validate ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . map . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , errors . size ( ) )
getRequestsStatistic ( ) { java . util . ArrayList < com . rhcloud . analytics4github . domain . RequestToAPI > requestToAPIs = new java . util . ArrayList ( ) ; requestToAPIs . add ( new com . rhcloud . analytics4github . domain . RequestToAPI ( "testRepository" , "/commits" ) ) ; when ( repository . findAll ( ) ) . thenReturn ( requestToAPIs ) ; java . util . List < com . rhcloud . analytics4github . domain . RequestToAPI > requestsStatistic = statisticsService . getRequestsStatistic ( ) ; "<AssertPlaceHolder>" ; verify ( repository , atLeastOnce ( ) ) ; } getRequestsStatistic ( ) { return repository . findAll ( ) ; }
org . junit . Assert . assertEquals ( requestsStatistic , requestToAPIs )
testWrite ( ) { com . lrn . nettymysqlprotocol . protocol . impl . ComQueryPacket comQueryPacket = new com . lrn . nettymysqlprotocol . protocol . impl . ComQueryPacket ( ) ; comQueryPacket . setQuery ( "select<sp>@@version_comment<sp>limit<sp>1" ) ; io . netty . buffer . ByteBuf buffer = io . netty . buffer . Unpooled . buffer ( ) ; transcoder . encode ( comQueryPacket , buffer ) ; java . lang . String expected = "210000000373656c65637420404076657273696f6e5f636f6d6d656e74206c696d69742031" ; java . lang . String hexBuf = io . netty . buffer . ByteBufUtil . hexDump ( buffer ) ; "<AssertPlaceHolder>" ; } setQuery ( java . lang . String ) { this . query = query ; }
org . junit . Assert . assertEquals ( expected . toLowerCase ( ) , hexBuf . toLowerCase ( ) )
testSimple ( ) { java . nio . ByteBuffer bb = java . nio . ByteBuffer . allocate ( 4 ) ; org . mp4parser . boxes . iso14496 . part1 . objectdescriptors . BitWriterBuffer bitWriterBuffer = new org . mp4parser . boxes . iso14496 . part1 . objectdescriptors . BitWriterBuffer ( bb ) ; bitWriterBuffer . writeBits ( 15 , 4 ) ; bb . rewind ( ) ; int test = org . mp4parser . tools . IsoTypeReader . readUInt8 ( bb ) ; "<AssertPlaceHolder>" ; } readUInt8 ( java . nio . ByteBuffer ) { return org . mp4parser . tools . IsoTypeReader . byte2int ( bb . get ( ) ) ; }
org . junit . Assert . assertEquals ( ( 15 << 4 ) , test )
testGetY ( ) { classUnderTest . setY ( 10 ) ; "<AssertPlaceHolder>" ; } getY ( ) { return y ; }
org . junit . Assert . assertEquals ( 10 , classUnderTest . getY ( ) )
testTwentySwitchTopologySpiazzo ( ) { org . opennms . netmgt . enlinkd . TwentyNodeTopology topology = new org . opennms . netmgt . enlinkd . TwentyNodeTopology ( ) ; org . opennms . netmgt . enlinkd . service . api . BroadcastDomain domain = new org . opennms . netmgt . enlinkd . service . api . BroadcastDomain ( ) ; org . opennms . netmgt . enlinkd . service . api . Bridge . create ( domain , topology . spiazzofasw01Id ) ; org . opennms . netmgt . enlinkd . service . api . Bridge . create ( domain , topology . comunespiazzowl1Id ) ; org . opennms . netmgt . enlinkd . service . api . Bridge . create ( domain , topology . spiazzomepe01Id ) ; setBridgeElements ( domain , topology . elemlist ) ; org . opennms . netmgt . enlinkd . service . api . DiscoveryBridgeTopology ndbtB = new org . opennms . netmgt . enlinkd . service . api . DiscoveryBridgeTopology ( domain ) ; ndbtB . addUpdatedBFT ( topology . spiazzofasw01Id , topology . bftspiazzofasw01 ) ; ndbtB . addUpdatedBFT ( topology . spiazzomepe01Id , topology . bftspiazzomepe01 ) ; ndbtB . addUpdatedBFT ( topology . comunespiazzowl1Id , topology . bftcomunespiazzowl1 ) ; ndbtB . calculate ( ) ; "<AssertPlaceHolder>" ; } getFailed ( ) { return m_failed ; }
org . junit . Assert . assertEquals ( 0 , ndbtB . getFailed ( ) . size ( ) )
shouldReturnTrueGivenAnEmptyArray ( ) { boolean isEmpty = org . flips . utils . Utils . isEmpty ( new java . lang . Object [ ] { } ) ; "<AssertPlaceHolder>" ; } isEmpty ( java . lang . Object [ ] ) { return org . springframework . util . ObjectUtils . isEmpty ( array ) ; }
org . junit . Assert . assertEquals ( true , isEmpty )
testMixingOrAndNot ( ) { com . picocontainer . gems . constraints . Constraint c = new com . picocontainer . gems . constraints . Or ( c1 , new com . picocontainer . gems . constraints . Not ( c2 ) , c3 ) ; final org . jmock . Sequence sequence = mockery . sequence ( "contraints" ) ; mockery . checking ( new org . jmock . Expectations ( ) { { one ( c1 ) . evaluate ( with ( same ( adapter ) ) ) ; will ( returnValue ( false ) ) ; inSequence ( sequence ) ; one ( c2 ) . evaluate ( with ( same ( adapter ) ) ) ; will ( returnValue ( false ) ) ; inSequence ( sequence ) ; never ( c3 ) . evaluate ( with ( same ( adapter ) ) ) ; } } ) ; "<AssertPlaceHolder>" ; } evaluate ( com . picocontainer . ComponentAdapter ) { return ! ( "Tom" . equals ( adapter . getComponentKey ( ) ) ) ; }
org . junit . Assert . assertTrue ( c . evaluate ( adapter ) )
shouldBindCookieMatchingParameterName ( ) { com . threewks . thundr . introspection . ParameterDescription varParam = new com . threewks . thundr . introspection . ParameterDescription ( "var" , java . lang . String . class ) ; bindings . put ( varParam , null ) ; req . withCookie ( "var" , "expected" ) ; binder . bindAll ( bindings , req , resp ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return delegate . get ( java . util . Collections . singletonList ( arg0 ) ) ; }
org . junit . Assert . assertThat ( bindings . get ( varParam ) , is ( ( ( java . lang . Object ) ( "expected" ) ) ) )
testDeleteWebhookConfiguration ( ) { nl . topicus . bitbucket . persistence . WebHookConfiguration [ ] configurations = activeObjects . find ( nl . topicus . bitbucket . persistence . WebHookConfiguration . class ) ; org . junit . Assume . assumeTrue ( ( ( configurations != null ) && ( ( configurations . length ) > 0 ) ) ) ; nl . topicus . bitbucket . persistence . WebHookConfiguration configuration = configurations [ 0 ] ; dao . deleteWebhookConfiguration ( configuration ) ; "<AssertPlaceHolder>" ; } getID ( ) { return 0 ; }
org . junit . Assert . assertNull ( activeObjects . get ( nl . topicus . bitbucket . persistence . WebHookConfiguration . class , configuration . getID ( ) ) )
testParse ( ) { java . util . Calendar time = java . util . Calendar . getInstance ( ) ; time . setTime ( new java . util . Date ( 114 , 5 , 17 ) ) ; org . openl . rules . convertor . String2CalendarConvertor converter = new org . openl . rules . convertor . String2CalendarConvertor ( ) ; java . util . Calendar result = converter . parse ( "06/17/2014" , null ) ; "<AssertPlaceHolder>" ; } parse ( org . openl . rules . table . ILogicalTable , org . openl . rules . structure . ITableObject ) { if ( ( ( selector ) != null ) && ( ! ( selector . select ( unparsedTable ) ) ) ) { return unparsedTable ; } return parseInternal ( unparsedTable , tobj ) ; }
org . junit . Assert . assertEquals ( time , result )
testABoxAssertionsRemovedWhenPropertyRemoved ( ) { org . apache . jena . ontology . OntModel preModel = org . apache . jena . rdf . model . ModelFactory . createOntologyModel ( OntModelSpec . OWL_MEM ) ; org . apache . jena . ontology . OntModel postModel = org . apache . jena . rdf . model . ModelFactory . createOntologyModel ( OntModelSpec . OWL_MEM ) ; edu . cornell . mannlib . vitro . webapp . dao . jena . WebappDaoFactoryJena preWadf = new edu . cornell . mannlib . vitro . webapp . dao . jena . WebappDaoFactoryJena ( preModel ) ; edu . cornell . mannlib . vitro . webapp . beans . ObjectProperty objPropNotForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . ObjectProperty ( ) ; objPropNotForDeletion . setURI ( "http://dont.delete.me/objProp" ) ; preWadf . getObjectPropertyDao ( ) . insertObjectProperty ( objPropNotForDeletion ) ; edu . cornell . mannlib . vitro . webapp . beans . DataProperty dataPropNotForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . DataProperty ( ) ; dataPropNotForDeletion . setURI ( "http://dont.delete.me/dataProp" ) ; preWadf . getDataPropertyDao ( ) . insertDataProperty ( dataPropNotForDeletion ) ; edu . cornell . mannlib . vitro . webapp . beans . ObjectPropertyStatement objPropStmtNotForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . ObjectPropertyStatementImpl ( ) ; objPropStmtNotForDeletion . setSubjectURI ( "http://individual.example.org/a/" ) ; objPropStmtNotForDeletion . setProperty ( objPropNotForDeletion ) ; objPropStmtNotForDeletion . setObjectURI ( "http://individual.example.org/b/" ) ; preWadf . getObjectPropertyStatementDao ( ) . insertNewObjectPropertyStatement ( objPropStmtNotForDeletion ) ; edu . cornell . mannlib . vitro . webapp . beans . DataPropertyStatement dataPropStmtNotForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . DataPropertyStatementImpl ( ) ; dataPropStmtNotForDeletion . setIndividualURI ( "http://individual.example.org/a/" ) ; dataPropStmtNotForDeletion . setDatapropURI ( dataPropNotForDeletion . getURI ( ) ) ; dataPropStmtNotForDeletion . setData ( "I<sp>will<sp>be<sp>deleted!" 1 ) ; postModel . add ( preModel ) ; edu . cornell . mannlib . vitro . webapp . beans . ObjectProperty objProp = new edu . cornell . mannlib . vitro . webapp . beans . ObjectProperty ( ) ; objProp . setURI ( "http://example.org/objProp" ) ; preWadf . getObjectPropertyDao ( ) . insertObjectProperty ( objProp ) ; edu . cornell . mannlib . vitro . webapp . beans . DataProperty dataProp = new edu . cornell . mannlib . vitro . webapp . beans . DataProperty ( ) ; dataProp . setURI ( "http://example.org/dataProp" ) ; preWadf . getDataPropertyDao ( ) . insertDataProperty ( dataProp ) ; edu . cornell . mannlib . vitro . webapp . beans . ObjectPropertyStatement objPropStmtForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . ObjectPropertyStatementImpl ( ) ; objPropStmtForDeletion . setSubjectURI ( "http://example.org/sdfadsf/" ) ; objPropStmtForDeletion . setProperty ( objProp ) ; objPropStmtForDeletion . setObjectURI ( "http://example.org/asdfasdfasfa/" ) ; preWadf . getObjectPropertyStatementDao ( ) . insertNewObjectPropertyStatement ( objPropStmtForDeletion ) ; edu . cornell . mannlib . vitro . webapp . beans . DataPropertyStatement dataPropStmtForDeletion = new edu . cornell . mannlib . vitro . webapp . beans . DataPropertyStatementImpl ( ) ; dataPropStmtForDeletion . setIndividualURI ( "http://example.org/asdf123/" ) ; dataPropStmtForDeletion . setDatapropURI ( dataProp . getURI ( ) ) ; dataPropStmtForDeletion . setData ( "I<sp>will<sp>be<sp>deleted!" ) ; preWadf . getDataPropertyStatementDao ( ) . insertNewDataPropertyStatement ( dataPropStmtForDeletion ) ; preWadf . getObjectPropertyDao ( ) . deleteObjectProperty ( objProp ) ; preWadf . getDataPropertyDao ( ) . deleteDataProperty ( dataProp ) ; "<AssertPlaceHolder>" ; } size ( ) { return m . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( preModel . size ( ) ) == ( postModel . size ( ) ) ) )
testBasic ( ) { org . apache . accumulo . core . client . summary . SummarizerConfiguration sc = org . apache . accumulo . core . client . summary . SummarizerConfiguration . builder ( org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizer . class ) . build ( ) ; org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizer authSummarizer = new org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizer ( ) ; org . apache . accumulo . core . client . summary . Summarizer . Collector collector = authSummarizer . collector ( sc ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "" ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "A" ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "B" ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "A&B" ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "B" 0 ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "B" 0 ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; collector . accept ( new org . apache . accumulo . core . data . Key ( "r" , "B" 1 , "q" , "B" 2 ) , org . apache . accumulo . core . client . summary . summarizers . AuthorizationSummarizerTest . EV ) ; java . util . HashMap < java . lang . String , java . lang . Long > actual = new java . util . HashMap ( ) ; collector . summarize ( actual :: put ) ; java . lang . String p = org . apache . accumulo . core . client . summary . CountingSummarizer . COUNTER_STAT_PREFIX ; java . util . HashMap < java . lang . String , java . lang . Long > expected = new java . util . HashMap ( ) ; expected . put ( ( p + "A" ) , 4L ) ; expected . put ( ( p + "B" ) , 4L ) ; expected . put ( ( p + "C" ) , 3L ) ; expected . put ( ( p + "D" ) , 3L ) ; expected . put ( ( p + "E" ) , 1L ) ; expected . put ( ( p + "F" ) , 1L ) ; expected . put ( org . apache . accumulo . core . client . summary . CountingSummarizer . TOO_LONG_STAT , 0L ) ; expected . put ( org . apache . accumulo . core . client . summary . CountingSummarizer . TOO_MANY_STAT , 0L ) ; expected . put ( org . apache . accumulo . core . client . summary . CountingSummarizer . SEEN_STAT , 7L ) ; expected . put ( org . apache . accumulo . core . client . summary . CountingSummarizer . EMITTED_STAT , 16L ) ; expected . put ( org . apache . accumulo . core . client . summary . CountingSummarizer . DELETES_IGNORED_STAT , 0L ) ; "<AssertPlaceHolder>" ; } put ( java . lang . Long , org . apache . accumulo . server . tabletserver . LargestFirstMemoryManager$TabletInfo ) { if ( ( map . size ( ) ) == ( max ) ) { if ( ( key . compareTo ( map . firstKey ( ) ) ) < 0 ) return false ; try { add ( key , value ) ; return true ; } finally { map . remove ( map . firstKey ( ) ) ; } } else { add ( key , value ) ; return true ; } }
org . junit . Assert . assertEquals ( expected , actual )
c_wmsGetFeatureInfoTest ( ) { org . geosdi . geoplatform . services . request . GPWMSGetFeatureInfoRequest wmsGetFeatureInfoRequest = new org . geosdi . geoplatform . services . request . GPWMSGetFeatureInfoRequest ( ) ; wmsGetFeatureInfoRequest . setCrs ( "EPSG:4326" ) ; wmsGetFeatureInfoRequest . setWidth ( "550" ) ; wmsGetFeatureInfoRequest . setHeight ( "250" ) ; org . geosdi . geoplatform . services . request . WMSGetFeatureInfoBoundingBox boundingBox = new org . geosdi . geoplatform . services . request . WMSGetFeatureInfoBoundingBox ( ) ; boundingBox . setMinx ( ( - 130.0 ) ) ; boundingBox . setMiny ( 24.0 ) ; boundingBox . setMaxx ( ( - 66.0 ) ) ; boundingBox . setMaxy ( 50.0 ) ; wmsGetFeatureInfoRequest . setBoundingBox ( boundingBox ) ; org . geosdi . geoplatform . services . request . WMSGetFeatureInfoPoint point = new org . geosdi . geoplatform . services . request . WMSGetFeatureInfoPoint ( ) ; point . setX ( 170 ) ; point . setY ( 160 ) ; wmsGetFeatureInfoRequest . setPoint ( point ) ; org . geosdi . geoplatform . services . request . GPWMSGetFeatureInfoElement wmsGetFeatureInfoElement = new org . geosdi . geoplatform . services . request . GPWMSGetFeatureInfoElement ( ) ; wmsGetFeatureInfoElement . setWmsServerURL ( "http://150.145.141.180/geoserver/wms" ) ; wmsGetFeatureInfoElement . setLayers ( java . util . Arrays . asList ( "topp:states" , "topp:states" ) ) ; wmsGetFeatureInfoRequest . setWmsFeatureInfoElements ( java . util . Arrays . asList ( wmsGetFeatureInfoElement ) ) ; javax . ws . rs . core . Response response = gpWMSClient . wmsGetFeatureInfo ( wmsGetFeatureInfoRequest ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return this . status ; }
org . junit . Assert . assertTrue ( ( ( response . getStatus ( ) ) == 200 ) )
testGetPidByProcessName_WithImproperData_ReturnsNothing ( ) { java . io . InputStream stubInputStream = org . apache . commons . io . IOUtils . toInputStream ( ( ( "<sp>PID<sp>TTY<sp>STAT<sp>TIME<sp>COMMAND\n<sp>9990<sp>?<sp>Ss<sp>0:07<sp>/test/java\n<sp>" + ( this . oldProcessId ) ) + "<sp>?<sp>Ss<sp>0:07<sp>/osc/java" ) , java . nio . charset . Charset . defaultCharset ( ) ) ; org . powermock . api . mockito . PowerMockito . when ( this . processMock . getInputStream ( ) ) . thenReturn ( stubInputStream ) ; org . powermock . api . mockito . PowerMockito . when ( this . runtimeMock . exec ( this . linuxProcessExec ) ) . thenReturn ( this . processMock ) ; org . mockito . Mockito . when ( java . lang . Runtime . getRuntime ( ) ) . thenReturn ( this . runtimeMock ) ; java . lang . String foundPid = org . osc . core . broker . util . ServerUtil . getPidByProcessName ( "/osc/test" ) ; "<AssertPlaceHolder>" ; } getPidByProcessName ( java . lang . String ) { try { java . lang . String psArg = "" ; if ( org . osc . core . broker . util . ServerUtil . isWindows ( ) ) { psArg += "-W" ; } java . lang . Process p = org . osc . core . broker . util . java . lang . Runtime . getRuntime ( ) . exec ( ( "ps<sp>" + psArg ) ) ; int exitVal = p . waitFor ( ) ; org . osc . core . broker . util . ServerUtil . log . info ( ( "ps<sp>process<sp>terminated<sp>with<sp>exit<sp>code<sp>" + exitVal ) ) ; try ( java . io . InputStream inputStream = p . getInputStream ( ) ; java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( inputStream ) ) ) { java . lang . String s ; while ( ( s = reader . readLine ( ) ) != null ) { s = s . trim ( ) ; org . osc . core . broker . util . ServerUtil . log . debug ( s ) ; if ( s . endsWith ( processName ) ) { java . lang . String pid = s . split ( "<sp>+" , ( - 3 ) ) [ 0 ] ; org . osc . core . broker . util . ServerUtil . log . info ( ( ( ( "Found<sp>PID<sp>for<sp>" + processName ) + ":<sp>" ) + pid ) ) ; return pid ; } } } } catch ( java . lang . Exception e ) { org . osc . core . broker . util . ServerUtil . log . error ( ( ( "Fail<sp>to<sp>find<sp>process<sp>PID<sp>for<sp>'" + processName ) + "'" ) , e ) ; } return null ; }
org . junit . Assert . assertNull ( foundPid )
testIntervalActionWithZeroTotal ( ) { final com . liferay . portal . kernel . interval . IntervalActionProcessor < java . lang . Void > intervalActionProcessor = new com . liferay . portal . kernel . interval . IntervalActionProcessor ( 0 ) ; intervalActionProcessor . setPerformIntervalActionMethod ( new com . liferay . portal . kernel . interval . IntervalActionProcessor . PerformIntervalActionMethod < java . lang . Void > ( ) { @ java . lang . Override public java . lang . Void performIntervalAction ( int start , int end ) { for ( int i = start ; i < end ; i ++ ) { _count . incrementAndGet ( ) ; } intervalActionProcessor . incrementStart ( ( end - start ) ) ; return null ; } } ) ; intervalActionProcessor . performIntervalActions ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return _byteBuffer . get ( ) ; }
org . junit . Assert . assertEquals ( 0 , _count . get ( ) )
CollisionWithMergeInlineAbove1 ( ) { org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue hash98304_obj1 = new org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue ( 1 , 98304 ) ; org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue hash98304_obj2 = new org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue ( 2 , 98304 ) ; org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue hash268435456_obj3 = new org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue ( 3 , 268435456 ) ; org . eclipse . imp . pdb . facts . util . ImmutableSet < org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue > xs = org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . of ( hash98304_obj1 , hash98304_obj2 , hash268435456_obj3 ) . __remove ( hash268435456_obj3 ) ; org . eclipse . imp . pdb . facts . util . ImmutableSet < org . eclipse . imp . pdb . test . persistent . TrieSetTests . DummyValue > ys = org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . of ( hash98304_obj1 , hash98304_obj2 ) ; "<AssertPlaceHolder>" ; } __remove ( K ) { final int keyHash = key . hashCode ( ) ; final org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . SetResult < K > details = org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . SetResult . unchanged ( ) ; final org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . CompactSetNode < K > newRootNode = rootNode . removed ( null , key , org . eclipse . imp . pdb . facts . util . TrieSet_5Bits . transformHashCode ( keyHash ) , 0 , details ) ; if ( details . isModified ( ) ) { return new org . eclipse . imp . pdb . facts . util . TrieSet_5Bits < K > ( newRootNode , ( ( hashCode ) - keyHash ) , ( ( cachedSize ) - 1 ) ) ; } return this ; }
org . junit . Assert . assertEquals ( xs , ys )
equals ( ) { org . apache . jackrabbit . oak . plugins . document . Path path = org . apache . jackrabbit . oak . plugins . document . Path . fromString ( "/this/is/a/test/path" ) ; org . apache . jackrabbit . oak . plugins . document . RevisionVector rv = new org . apache . jackrabbit . oak . plugins . document . RevisionVector ( org . apache . jackrabbit . oak . plugins . document . Revision . newRevision ( 1 ) , org . apache . jackrabbit . oak . plugins . document . Revision . newRevision ( 2 ) ) ; org . apache . jackrabbit . oak . plugins . document . PathRev expected = new org . apache . jackrabbit . oak . plugins . document . PathRev ( path , rv ) ; "<AssertPlaceHolder>" ; } newRevision ( int ) { long timestamp = org . apache . jackrabbit . oak . plugins . document . Revision . getCurrentTimestamp ( ) ; int c ; synchronized ( org . apache . jackrabbit . oak . plugins . document . Revision . class ) { if ( timestamp < ( org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionTimestamp ) ) { timestamp = org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionTimestamp ; } if ( timestamp == ( org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionTimestamp ) ) { c = ++ ( org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionCount ) ; } else { org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionTimestamp = timestamp ; org . apache . jackrabbit . oak . plugins . document . Revision . lastRevisionCount = c = 0 ; } } return new org . apache . jackrabbit . oak . plugins . document . Revision ( timestamp , c , clusterId ) ; }
org . junit . Assert . assertEquals ( expected , new org . apache . jackrabbit . oak . plugins . document . PathRev ( path , rv ) )
testRemovesActionListener ( ) { com . eclipsesource . tabris . internal . ui . UIDescriptor uiDescriptor = new com . eclipsesource . tabris . internal . ui . UIDescriptor ( ) ; com . eclipsesource . tabris . ui . ActionListener listener = mock ( com . eclipsesource . tabris . ui . ActionListener . class ) ; uiDescriptor . addActionListener ( listener ) ; uiDescriptor . removeActionListener ( listener ) ; java . util . List < com . eclipsesource . tabris . ui . ActionListener > actionListeners = uiDescriptor . getActionListeners ( ) ; "<AssertPlaceHolder>" ; } getActionListeners ( ) { return actionListeners ; }
org . junit . Assert . assertFalse ( actionListeners . contains ( listener ) )
testEmptyExtendedClass ( ) { org . apache . servicecomb . serviceregistry . api . registry . Microservice microservice = org . apache . servicecomb . serviceregistry . config . TestPropertiesLoader . microserviceFactory . create ( "default" , "emptyExtendedClass" ) ; "<AssertPlaceHolder>" ; } getProperties ( ) { return properties ; }
org . junit . Assert . assertEquals ( 0 , microservice . getProperties ( ) . size ( ) )
postAnInvalidComment ( ) { com . silverpeas . comment . web . CommentEntity aComment = new com . silverpeas . comment . web . CommentEntity ( ) ; com . sun . jersey . api . client . ClientResponse response = post ( aComment , at ( aResourceURI ( ) ) ) ; int recievedStatus = response . getStatus ( ) ; int badRequest = Status . BAD_REQUEST . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
org . junit . Assert . assertThat ( recievedStatus , is ( badRequest ) )
testBuildMultipleLongwhereValues ( ) { java . lang . String expectedAwql = "SELECT<sp>CampaignId,<sp>CampaignName<sp>FROM<sp>AD_PERFORMANCE_REPORT<sp>WHERE<sp>" + "CampaignId<sp>IN<sp>[1234,<sp>5678]" ; com . google . api . ads . adwords . lib . utils . ReportQueryInterface reportQuery = new com . google . api . ads . adwords . lib . utils . v201809 . ReportQuery . Builder ( ) . fields ( "CampaignId" , "CampaignName" ) . from ( ReportDefinitionReportType . AD_PERFORMANCE_REPORT ) . where ( "CampaignId" ) . in ( 1234L , 5678L ) . build ( ) ; "<AssertPlaceHolder>" ; checkUtilitiesState ( ) ; } toString ( ) { return com . google . common . base . MoreObjects . toStringHelper ( this . getClass ( ) ) . omitNullValues ( ) . add ( "currencyCode" , getCurrencyCode ( ) ) . add ( "id" , getId ( ) ) . add ( "name" , getName ( ) ) . add ( "primaryBillingId" , getPrimaryBillingId ( ) ) . add ( "secondaryBillingId" , getSecondaryBillingId ( ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expectedAwql , reportQuery . toString ( ) )
convertPolygon_NoRedundantSpaces_ShouldConvert ( ) { java . lang . String wkt = "POLYGON<sp>((30<sp>10,<sp>40<sp>40,<sp>20<sp>40,<sp>10<sp>20,<sp>30<sp>10))" ; java . lang . String geoJson = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . toGeoJson ( wkt ) ; java . lang . String expectedGeoJson = "{\"type\":\"Polygon\",<sp>\"coordinates\":<sp>[[[30,10],[40,40],[20,40],[10,20],[30,10]]]}" ; "<AssertPlaceHolder>" ; } toGeoJson ( java . lang . String ) { wkt = wkt . toLowerCase ( ) ; int startOfCoordinates = wkt . indexOf ( "multilinestring" 2 ) ; if ( startOfCoordinates == ( - 1 ) ) throw new java . lang . IllegalArgumentException ( "multilinestring" 4 ) ; java . lang . String wktType = wkt . substring ( 0 , startOfCoordinates ) . trim ( ) ; wkt = wkt . substring ( startOfCoordinates ) ; java . lang . String type = "" ; java . lang . String coordinates = "" ; switch ( wktType ) { case "point" : type = "multilinestring" 3 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . pointCoordinatesFromWkt ( wkt ) ; break ; case "polygon" : type = "multilinestring" 1 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . polygonCoordinatesFromWkt ( wkt ) ; break ; case "linestring" : type = "LineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . lineStringCoordinatesFromWkt ( wkt ) ; break ; case "multipolygon" : type = "MultiPolygon" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPolygonCoordinatesFromWkt ( wkt ) ; break ; case "multipoint" : type = "multilinestring" 0 ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiPointCoordinatesFromWkt ( wkt ) ; break ; case "multilinestring" : type = "MultiLineString" ; coordinates = org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . multiLineStringCoordinatesFromWkt ( wkt ) ; break ; default : throw new java . lang . IllegalArgumentException ( "multilinestring" 5 ) ; } return org . nlpcn . es4sql . spatial . WktToGeoJsonConverter . buildGeoJson ( type , coordinates ) ; }
org . junit . Assert . assertEquals ( expectedGeoJson , geoJson )
testWithErrorAndLoggingErrorHandler ( ) { java . util . concurrent . Callable < java . lang . String > callback = new java . util . concurrent . Callable < java . lang . String > ( ) { public java . lang . String call ( ) throws org . springframework . batch . poller . scheduling . Exception { java . util . Set < java . lang . String > executions = new java . util . HashSet < java . lang . String > ( repository ) ; if ( executions . isEmpty ( ) ) { return null ; } throw new java . lang . RuntimeException ( "Expected" ) ; } } ; org . springframework . batch . poller . scheduling . TaskSchedulerPoller < java . lang . String > poller = new org . springframework . batch . poller . scheduling . TaskSchedulerPoller < java . lang . String > ( ) ; org . springframework . scheduling . concurrent . ConcurrentTaskScheduler taskScheduler = new org . springframework . scheduling . concurrent . ConcurrentTaskScheduler ( ) ; taskScheduler . setErrorHandler ( TaskUtils . LOG_AND_SUPPRESS_ERROR_HANDLER ) ; poller . setTaskScheduler ( taskScheduler ) ; sleepAndCreateStringInBackground ( 500L ) ; expected . expect ( java . util . concurrent . ExecutionException . class ) ; expected . expect ( org . springframework . batch . poller . scheduling . TaskSchedulerPollerTests . Cause . expectMessage ( "Expected" ) ) ; java . lang . String value = poller . poll ( callback ) . get ( 1000L , TimeUnit . MILLISECONDS ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String , java . lang . Class ) { return parser . parseExpression ( expression ) . getValue ( context , target , type ) ; }
org . junit . Assert . assertEquals ( null , value )
getProviders_shouldNotFindAnyProvidersIfNoneHaveGivenAttributeValues ( ) { java . util . Map < org . openmrs . ProviderAttributeType , java . lang . Object > attributes = new java . util . HashMap ( ) ; attributes . put ( service . getProviderAttributeType ( 1 ) , new java . text . SimpleDateFormat ( "yyyy-MM-dd" ) . parse ( "1411-04-25" ) ) ; java . util . List < org . openmrs . Provider > providers = service . getProviders ( "RobertClive" , 0 , null , attributes ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , providers . size ( ) )
testDetectMultipleKnees ( ) { double [ ] x = new double [ ] { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 } ; double [ ] y = new double [ ] { 0.2 , 0.2 , 0.4 , 0.4 , 0.4 , 0.5 , 0.5 , 0.5 , 0.8 , 0.8 } ; won . matcher . solr . utils . Kneedle kneedle = new won . matcher . solr . utils . Kneedle ( 1 ) ; int [ ] knees = kneedle . detectKneePoints ( x , y ) ; "<AssertPlaceHolder>" ; } detectKneePoints ( double [ ] , double [ ] ) { return detectKneeOrElbowPoints ( x , y , false ) ; }
org . junit . Assert . assertArrayEquals ( new int [ ] { 2 , 5 , 8 } , knees )
builderBuildsWithGivenIoThreadCount ( ) { io . searchbox . client . config . HttpClientConfig givenConfig = new io . searchbox . client . config . HttpClientConfig . Builder ( "http://localhost:9200" ) . build ( ) ; org . appenders . log4j2 . elasticsearch . jest . WrappedHttpClientConfig . Builder builder = new org . appenders . log4j2 . elasticsearch . jest . WrappedHttpClientConfig . Builder ( givenConfig ) ; int ioThreadCount = ( new java . util . Random ( ) . nextInt ( 1000 ) ) + 10 ; builder . ioThreadCount ( ioThreadCount ) ; org . appenders . log4j2 . elasticsearch . jest . WrappedHttpClientConfig config = builder . build ( ) ; "<AssertPlaceHolder>" ; } getIoThreadCount ( ) { return ioThreadCount ; }
org . junit . Assert . assertEquals ( ioThreadCount , config . getIoThreadCount ( ) )
testCorrectContentType ( ) { final byte [ ] is = getBytesForCapabilities ( "DES3" ) ; final org . jscep . transport . response . Capabilities caps = fixture . getResponse ( is , "text/plain" ) ; "<AssertPlaceHolder>" ; } getStrongestCipher ( ) { final java . lang . String cipher ; if ( ( cipherExists ( "AES" ) ) && ( caps . contains ( Capability . AES ) ) ) { cipher = "AES" ; } else if ( ( cipherExists ( "DESede" ) ) && ( caps . contains ( Capability . TRIPLE_DES ) ) ) { cipher = "DESede" ; } else { cipher = "DES" ; } return cipher ; }
org . junit . Assert . assertEquals ( "DESede" , caps . getStrongestCipher ( ) )
hasIgnorePlaceholder_Equal_NoWhitespaceInPlaceholder_CDATA_TEST ( ) { java . lang . String control = "<elem1><elem11>${xmlunit.ignore}</elem11></elem1>" ; java . lang . String test = "<elem1><elem11><![CDATA[abc]]></elem11></elem1>" ; org . xmlunit . placeholder . Diff diff = org . xmlunit . builder . DiffBuilder . compare ( control ) . withTest ( test ) . withDifferenceEvaluator ( org . xmlunit . placeholder . DifferenceEvaluators . chain ( DifferenceEvaluators . Default , new org . xmlunit . placeholder . PlaceholderDifferenceEvaluator ( ) ) ) . build ( ) ; "<AssertPlaceHolder>" ; } hasDifferences ( ) { return differences . iterator ( ) . hasNext ( ) ; }
org . junit . Assert . assertFalse ( diff . hasDifferences ( ) )
testStoresName ( ) { com . eclipsesource . tabris . tracking . internal . piwik . model . ecommerce . EcommerceItem ecommerceItem = new com . eclipsesource . tabris . tracking . internal . piwik . model . ecommerce . EcommerceItem ( "foo" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return name ; }
org . junit . Assert . assertEquals ( "foo" , ecommerceItem . getName ( ) )
testConfigureStoreWithTLS ( ) { doReturn ( objectMock ) . when ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".ssl.enable" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_FALSE ) ; doReturn ( objectMock ) . when ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".starttls.enable" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_TRUE ) ; doReturn ( objectMock ) . when ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".starttls.required" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_TRUE ) ; org . powermock . api . mockito . PowerMockito . whenNew ( javax . mail . URLName . class ) . withArguments ( anyString ( ) , anyString ( ) , anyInt ( ) , anyString ( ) , anyString ( ) , anyString ( ) ) . thenReturn ( urlNameMock ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( javax . mail . Session . class ) ; org . powermock . api . mockito . PowerMockito . doReturn ( sessionMock ) . when ( javax . mail . Session . class , "getInstance" , org . mockito . Matchers . < java . util . Properties > any ( ) , org . mockito . Matchers . < javax . mail . Authenticator > any ( ) ) ; doReturn ( storeMock ) . when ( sessionMock ) . getStore ( any ( java . lang . String . class ) ) ; addRequiredInputs ( ) ; getMailMessageSpy . processInputs ( inputs ) ; javax . mail . Store store = getMailMessageSpy . configureStoreWithTLS ( propertiesMock , authenticatorMock ) ; "<AssertPlaceHolder>" ; verify ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".ssl.enable" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_FALSE ) ; verify ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".starttls.enable" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_TRUE ) ; verify ( propertiesMock ) . setProperty ( ( ( "mail." + ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) ) + ".starttls.required" ) , io . cloudslang . content . mail . services . GetMailMessageTest . STR_TRUE ) ; org . powermock . api . mockito . PowerMockito . verifyStatic ( ) ; javax . mail . Session . getInstance ( org . mockito . Matchers . < java . util . Properties > any ( ) , org . mockito . Matchers . < javax . mail . Authenticator > any ( ) ) ; verify ( sessionMock ) . getStore ( ( ( io . cloudslang . content . mail . services . GetMailMessageTest . POP3_PROTOCOL ) + ( io . cloudslang . content . mail . services . GetMailMessageTest . SECURE_SUFFIX_FOR_POP3_AND_IMAP ) ) ) ; } configureStoreWithTLS ( io . cloudslang . content . mail . services . Properties , io . cloudslang . content . mail . services . Authenticator ) { props . setProperty ( ( ( "mail." + ( protocol ) ) + ".ssl.enable" ) , io . cloudslang . content . mail . services . GetMailMessage . STR_FALSE ) ; props . setProperty ( ( ( "mail." + ( protocol ) ) + ".starttls.enable" ) , io . cloudslang . content . mail . services . GetMailMessage . STR_TRUE ) ; props . setProperty ( ( ( "mail." + ( protocol ) ) + ".starttls.required" ) , io . cloudslang . content . mail . services . GetMailMessage . STR_TRUE ) ; io . cloudslang . content . mail . services . Session session = io . cloudslang . content . mail . services . Session . getInstance ( props , auth ) ; return session . getStore ( ( ( protocol ) + ( io . cloudslang . content . mail . services . GetMailMessage . SECURE_SUFFIX_FOR_POP3_AND_IMAP ) ) ) ; }
org . junit . Assert . assertEquals ( storeMock , store )
getStreetTypesShouldReturnStreetTypeEnumValues ( ) { com . gisgraphy . webapp . action . StreetSearchAction streetSearchAction = new com . gisgraphy . webapp . action . StreetSearchAction ( ) ; "<AssertPlaceHolder>" ; } getStreetTypes ( ) { return com . gisgraphy . street . StreetType . values ( ) ; }
org . junit . Assert . assertArrayEquals ( com . gisgraphy . street . StreetType . values ( ) , streetSearchAction . getStreetTypes ( ) )
test_notify_exception ( ) { try { com . webpagebytes . cms . cmsdata . WPBParameter parameterMock = org . powermock . api . easymock . PowerMock . createMock ( com . webpagebytes . cms . cmsdata . WPBParameter . class ) ; parameterCacheMock . Refresh ( ) ; org . easymock . EasyMock . expectLastCall ( ) . andThrow ( new com . webpagebytes . cms . exception . WPBIOException ( "" ) ) ; org . easymock . EasyMock . replay ( httpServletToolboxMock , requestMock , responseMock , parameterCacheMock , parameterMock , jsonObjectConverterMock , validatorMock , adminStorageMock , objectForControllerMock ) ; controllerForTest . notify ( parameterMock , WPBAdminDataStorageListener . AdminDataStorageOperation . CREATE_RECORD , com . webpagebytes . cms . cmsdata . WPBParameter . class ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } notify ( T , com . webpagebytes . cms . controllers . AdminDataStorageOperation , java . lang . Class ) { try { if ( type . equals ( com . webpagebytes . cms . cmsdata . WPBProject . class ) ) { projectCache . Refresh ( ) ; } } catch ( com . webpagebytes . cms . exception . WPBIOException e ) { } }
org . junit . Assert . assertTrue ( false )
testDiscovery ( ) { org . apache . karaf . cellar . dns . DnsDiscoveryService discovery = new org . apache . karaf . cellar . dns . DnsDiscoveryService ( ) ; discovery . setDnsService ( "_xmpp-server._tcp.gmail.com" ) ; "<AssertPlaceHolder>" ; } discoverMembers ( ) { org . apache . karaf . cellar . dns . DnsDiscoveryService . LOGGER . debug ( "CELLAR<sp>DNS:<sp>query<sp>services<sp>with<sp>name<sp>[{}]" , dnsService ) ; org . apache . karaf . cellar . dns . Set < java . lang . String > members = new org . apache . karaf . cellar . dns . HashSet < java . lang . String > ( ) ; try { javax . naming . directory . DirContext ctx = new javax . naming . directory . InitialDirContext ( this . dnsEnv ) ; javax . naming . directory . Attributes attrs = ctx . getAttributes ( this . dnsService , new java . lang . String [ ] { "SRV" } ) ; javax . naming . NamingEnumeration < ? > servers = attrs . get ( "srv" ) . getAll ( ) ; while ( servers . hasMore ( ) ) { java . lang . String dns = ( ( java . lang . String ) ( servers . next ( ) ) ) ; java . lang . String [ ] split = dns . split ( "<sp>" ) ; members . add ( ( ( ( split [ 3 ] ) + ":" ) + ( split [ 2 ] ) ) ) ; } } catch ( java . lang . Exception e ) { org . apache . karaf . cellar . dns . DnsDiscoveryService . LOGGER . error ( "CELLAR<sp>DNS:<sp>can't<sp>get<sp>service" , e ) ; } return members ; }
org . junit . Assert . assertFalse ( discovery . discoverMembers ( ) . isEmpty ( ) )
toAmazonS3URISchemeIsS3aUppercase ( ) { com . amazonaws . services . s3 . AmazonS3URI result = com . hotels . bdp . circustrain . s3s3copier . aws . AmazonS3URIs . toAmazonS3URI ( new java . net . URI ( "S3A://a/b" ) ) ; com . amazonaws . services . s3 . AmazonS3URI expected = new com . amazonaws . services . s3 . AmazonS3URI ( "s3://a/b" ) ; "<AssertPlaceHolder>" ; } toAmazonS3URI ( java . net . URI ) { if ( com . hotels . bdp . circustrain . s3s3copier . aws . FS_PROTOCOL_S3 . equalsIgnoreCase ( uri . getScheme ( ) ) ) { return new com . amazonaws . services . s3 . AmazonS3URI ( uri ) ; } else if ( com . hotels . bdp . circustrain . aws . S3Schemes . isS3Scheme ( uri . getScheme ( ) ) ) { try { return new com . amazonaws . services . s3 . AmazonS3URI ( new java . net . URI ( FS_PROTOCOL_S3 , uri . getUserInfo ( ) , uri . getHost ( ) , uri . getPort ( ) , uri . getPath ( ) , uri . getQuery ( ) , uri . getFragment ( ) ) ) ; } catch ( java . net . URISyntaxException e ) { } } return new com . amazonaws . services . s3 . AmazonS3URI ( uri ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( expected ) )
deveEnviarUltimoNSU ( ) { final com . fincatto . documentofiscal . nfe . classes . distribuicao . NFDistribuicaoNSU distribuicaoNSU = new com . fincatto . documentofiscal . nfe . classes . distribuicao . NFDistribuicaoNSU ( ) ; distribuicaoNSU . setUltimoNSU ( "000000000000012" ) ; "<AssertPlaceHolder>" ; } getUltimoNSU ( ) { return this . ultimoNSU ; }
org . junit . Assert . assertEquals ( "000000000000012" , distribuicaoNSU . getUltimoNSU ( ) )
readExistingSignatureAndValidate ( ) { byte [ ] xadesSignature = org . apache . commons . io . FileUtils . readFileToByteArray ( new java . io . File ( "src/test/resources/testFiles/xades/test-signature-with-timestamp.xml" ) ) ; byte [ ] digest = java . security . MessageDigest . getInstance ( "SHA-256" ) . digest ( "hello" . getBytes ( ) ) ; org . digidoc4j . DigestDataFile digestDataFile = new org . digidoc4j . DigestDataFile ( "hello.txt" , DigestAlgorithm . SHA256 , digest ) ; org . digidoc4j . Signature signature = org . digidoc4j . DetachedXadesSignatureBuilder . withConfiguration ( new org . digidoc4j . Configuration ( ) ) . withDataFile ( digestDataFile ) . openAdESSignature ( xadesSignature ) ; "<AssertPlaceHolder>" ; } validateSignature ( ) { org . digidoc4j . impl . asic . AsicSignature . logger . debug ( "Validating<sp>signature" ) ; if ( ( validationResult ) == null ) { validationResult = this . validator . extractResult ( ) ; org . digidoc4j . impl . asic . AsicSignature . logger . info ( ( ( ( ( "Signature<sp>has<sp>" + ( validationResult . getErrors ( ) . size ( ) ) ) + "<sp>validation<sp>errors<sp>and<sp>" ) + ( validationResult . getWarnings ( ) . size ( ) ) ) + "<sp>warnings" ) ) ; } else { org . digidoc4j . impl . asic . AsicSignature . logger . debug ( ( ( ( ( "Using<sp>existing<sp>validation<sp>errors<sp>with<sp>" + ( validationResult . getErrors ( ) . size ( ) ) ) + "<sp>validation<sp>errors<sp>and<sp>" ) + ( validationResult . getWarnings ( ) . size ( ) ) ) + "<sp>warnings" ) ) ; } return validationResult ; }
org . junit . Assert . assertTrue ( signature . validateSignature ( ) . isValid ( ) )
unidirectionalManyToOne ( ) { javax . persistence . EntityManager em = factory . createEntityManager ( ) ; org . meri . jpa . relationships . entities . manytoone . UnidirectionalManyToOneOwner owner = em . find ( org . meri . jpa . relationships . entities . manytoone . UnidirectionalManyToOneOwner . class , 1 ) ; em . close ( ) ; org . meri . jpa . relationships . entities . manytoone . UnidirectionalManyToOneInverse inverse = owner . getInverse ( ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( 5 , inverse . getId ( ) )
testAangeverOuderMetBetrokkenheidKind ( ) { final nl . bzk . brp . bijhouding . bericht . model . RegistratieAdresActieElement actie = createRegistratieAdresValideerActie ( false , false , nl . bzk . brp . bijhouding . bericht . model . RegistratieAdresActieElementTest . LEEFTIJD_OUDER_18 , nl . bzk . brp . bijhouding . bericht . model . RegistratieAdresActieElementTest . OUDER ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . Relatie relatieMock = mock ( nl . bzk . algemeenbrp . dal . domein . brp . entity . Relatie . class ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . BetrokkenheidOuderHistorie betrokkenheidOuderHistorieMock = mock ( nl . bzk . algemeenbrp . dal . domein . brp . entity . BetrokkenheidOuderHistorie . class ) ; when ( betrokkenheidOuderHistorieMock . getDatumEindeGeldigheid ( ) ) . thenReturn ( null ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ouderBetrokkenheid = new nl . bzk . algemeenbrp . dal . domein . brp . entity . Betrokkenheid ( nl . bzk . algemeenbrp . dal . domein . brp . enums . SoortBetrokkenheid . OUDER , relatieMock ) ; ouderBetrokkenheid . getBetrokkenheidOuderHistorieSet ( ) . add ( betrokkenheidOuderHistorieMock ) ; when ( bijhoudingPersoonMock . getActueleOuders ( ) ) . thenReturn ( new java . util . HashSet ( java . util . Collections . singletonList ( ouderBetrokkenheid ) ) ) ; final java . util . List < nl . bzk . brp . bijhouding . bericht . model . MeldingElement > meldingen = actie . valideerSpecifiekeInhoud ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
addIndexFront2RemovedTest ( ) { org . threadly . concurrent . collections . ConcurrentArrayList . DataSet < java . lang . Integer > result = org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . removed2FromFront . add ( 5 , 100 ) . add ( 0 , 200 ) ; java . lang . Integer [ ] expectedResult = new java . lang . Integer [ ] { 200 , 2 , 3 , 4 , 5 , 6 , 100 , 7 , 8 , 9 } ; "<AssertPlaceHolder>" ; } makeDataSet ( java . lang . Object [ ] , int , int ) { return new org . threadly . concurrent . collections . ConcurrentArrayList . DataSet ( dataArray , startPosition , endPosition , 0 , 0 ) ; }
org . junit . Assert . assertTrue ( result . equals ( org . threadly . concurrent . collections . ConcurrentArrayListDataSetTest . makeDataSet ( expectedResult , 0 , expectedResult . length ) ) )
testFunction14 ( ) { net . objecthunter . exp4j . function . Function custom1 = new net . objecthunter . exp4j . function . Function ( "multiply" , 2 ) { @ net . objecthunter . exp4j . Override public double apply ( double ... values ) { return ( values [ 0 ] ) * ( values [ 1 ] ) ; } } ; double varX = 1 ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( "multiply(sin(x),x+1)" ) . variables ( "x" ) . function ( custom1 ) . build ( ) . setVariable ( "x" , varX ) ; double expected = ( java . lang . Math . Math . sin ( varX ) ) * ( varX + 1 ) ; double actual = e . evaluate ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net . objecthunter . exp4j . ArrayStack ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { net . objecthunter . exp4j . tokenizer . Token t = tokens [ i ] ; else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_VARIABLE ) ) { final java . lang . String name = ( ( net . objecthunter . exp4j . tokenizer . VariableToken ) ( t ) ) . getName ( ) ; final java . lang . Double value = this . variables . get ( name ) ; if ( value == null ) { throw new java . lang . IllegalArgumentException ( ( ( "No<sp>value<sp>has<sp>been<sp>set<sp>for<sp>the<sp>setVariable<sp>'" + name ) + "'." ) ) ; } output . push ( value ) ; } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_OPERATOR ) ) { net . objecthunter . exp4j . tokenizer . OperatorToken op = ( ( net . objecthunter . exp4j . tokenizer . OperatorToken ) ( t ) ) ; if ( ( output . size ( ) ) < ( op . getOperator ( ) . getNumOperands ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>operands<sp>available<sp>for<sp>'" + ( op . getOperator ( ) . getSymbol ( ) ) ) + "'<sp>operator" ) ) ; } if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 2 ) { double rightArg = output . pop ( ) ; double leftArg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( leftArg , rightArg ) ) ; } else if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 1 ) { double arg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( arg ) ) ; } } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_FUNCTION ) ) { net . objecthunter . exp4j . tokenizer . FunctionToken func = ( ( net . objecthunter . exp4j . tokenizer . FunctionToken ) ( t ) ) ; final int numArguments = func . getFunction ( ) . getNumArguments ( ) ; if ( ( output . size ( ) ) < numArguments ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>arguments<sp>available<sp>for<sp>'" + ( func . getFunction ( ) . getName ( ) ) ) + "'<sp>function" ) ) ; } double [ ] args = new double [ numArguments ] ; for ( int j = numArguments - 1 ; j >= 0 ; j -- ) { args [ j ] = output . pop ( ) ; } output . push ( func . getFunction ( ) . apply ( args ) ) ; } } if ( ( output . size ( ) ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Invalid<sp>number<sp>of<sp>items<sp>on<sp>the<sp>output<sp>queue.<sp>Might<sp>be<sp>caused<sp>by<sp>an<sp>invalid<sp>number<sp>of<sp>arguments<sp>for<sp>a<sp>function." ) ; } return output . pop ( ) ; }
org . junit . Assert . assertTrue ( ( expected == actual ) )
testJSONFormatNonStringValue ( ) { final org . apache . logging . log4j . message . ObjectMapMessage msg = new org . apache . logging . log4j . message . ObjectMapMessage ( ) . with ( "key" , 1L ) ; final java . lang . String result = msg . getFormattedMessage ( new java . lang . String [ ] { "JSON" } ) ; final java . lang . String expected = "{\"key\":\"1\"}" ; "<AssertPlaceHolder>" ; } getFormattedMessage ( java . lang . String [ ] ) { if ( ( message ) != null ) { return message ; } return super . getFormattedMessage ( formats ) ; }
org . junit . Assert . assertEquals ( expected , result )
testSinhAsinh ( ) { double [ ] epsilon = new double [ ] { 3.0E-16 , 3.0E-16 , 4.0E-16 , 7.0E-16 , 3.0E-15 , 8.0E-15 } ; for ( int maxOrder = 0 ; maxOrder < 6 ; ++ maxOrder ) { for ( double x = 0.1 ; x < 1.2 ; x += 0.001 ) { org . apache . commons . math4 . analysis . differentiation . DerivativeStructure dsX = new org . apache . commons . math4 . analysis . differentiation . DerivativeStructure ( 1 , maxOrder , 0 , x ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure rebuiltX = dsX . sinh ( ) . asinh ( ) ; org . apache . commons . math4 . analysis . differentiation . DerivativeStructure zero = rebuiltX . subtract ( dsX ) ; for ( int n = 0 ; n <= maxOrder ; ++ n ) { "<AssertPlaceHolder>" ; } } } } getPartialDerivative ( int [ ] ) { return data [ compiler . getPartialDerivativeIndex ( orders ) ] ; }
org . junit . Assert . assertEquals ( 0.0 , zero . getPartialDerivative ( n ) , epsilon [ n ] )
deleteService ( ) { final net . violet . platform . datamodel . User myUser = getActionTestUser ( ) ; final net . violet . platform . datamodel . VObject myObject = Factories . VOBJECT . findByOwner ( myUser ) . get ( 0 ) ; myForm = loadTaichi ( myUser , myObject ) ; "<AssertPlaceHolder>" ; } getIsReg ( ) { return this . isReg ; }
org . junit . Assert . assertEquals ( 0 , myForm . getIsReg ( ) )
testCreate_wornd_size ( ) { com . github . mygreen . supercsv . builder . FieldAccessor field = getFieldAccessor ( com . github . mygreen . supercsv . cellprocessor . conversion . LeftPadFactoryTest . ErrorCsv . class , "col_wrong_size" , comparator ) ; com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder builder = ( ( com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder ) ( builderResolver . resolve ( java . lang . String . class ) ) ) ; com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < java . lang . String > formatter = builder . getFormatter ( field , config ) ; com . github . mygreen . supercsv . annotation . conversion . CsvLeftPad anno = field . getAnnotationsByGroup ( com . github . mygreen . supercsv . annotation . conversion . CsvLeftPad . class , groupEmpty ) . get ( 0 ) ; try { factory . create ( anno , java . util . Optional . empty ( ) , field , formatter , config ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" . isInstanceOf ( com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException . class ) . hasMessage ( "'%s'<sp><sp>@CsvLeftPad<sp><sp>'size'<sp>01" , field . getNameWithClass ( ) ) ; } } create ( com . github . mygreen . supercsv . annotation . constraint . CsvNumberMax , java . util . Optional , com . github . mygreen . supercsv . builder . FieldAccessor , com . github . mygreen . supercsv . cellprocessor . format . TextFormatter , com . github . mygreen . supercsv . builder . Configuration ) { @ com . github . mygreen . supercsv . cellprocessor . constraint . SuppressWarnings ( "unchecked" ) final com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > typeFormatter = ( ( com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > ) ( formatter ) ) ; final N max ; try { max = typeFormatter . parse ( anno . value ( ) ) ; } catch ( com . github . mygreen . supercsv . cellprocessor . format . TextParseException e ) { throw new com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException ( anno , com . github . mygreen . supercsv . localization . MessageBuilder . create ( "anno.attr.invalidType" ) . var ( "property" , field . getNameWithClass ( ) ) . varWithAnno ( "anno" , anno . annotationType ( ) ) . var ( "attrName" , "value" ) . var ( "attrValue" , anno . value ( ) ) . varWithClass ( "type" , field . getType ( ) ) . var ( "pattern" , typeFormatter . getPattern ( ) . orElseGet ( null ) ) . format ( true ) , e ) ; } final com . github . mygreen . supercsv . cellprocessor . constraint . NumberMax < N > processor = next . map ( ( n ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter , n ) ) . orElseGet ( ( ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter ) ) ; processor . setValidationMessage ( anno . message ( ) ) ; return java . util . Optional . of ( processor ) ; }
org . junit . Assert . assertThat ( e )
givenWorkerConfigurationWithDefaultConstructorThenSetJettyConfig ( ) { final fr . gouv . vitam . worker . server . rest . WorkerConfiguration workerConfiguration = new fr . gouv . vitam . worker . server . rest . WorkerConfiguration ( ) ; workerConfiguration . setJettyConfig ( "jettyFakeConfig" ) ; "<AssertPlaceHolder>" ; } getJettyConfig ( ) { return jettyConfig ; }
org . junit . Assert . assertEquals ( "jettyFakeConfig" , workerConfiguration . getJettyConfig ( ) )
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . document . library . opener . model . DLOpenerFileEntryReference missingDLOpenerFileEntryReference = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
org . junit . Assert . assertNull ( missingDLOpenerFileEntryReference )
getAllObjects_shouldReturnAllSavedObjectsWithTheGivenTypeAndPartialName ( ) { java . util . List < org . openmrs . Program > l = dao . getAllObjectsByName ( org . openmrs . Program . class , "TestProgram" , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return allergies . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , l . size ( ) )
createException ( ) { doThrow ( alluxio . client . file . BaseFileSystemTest . EXCEPTION ) . when ( mFileSystemMasterClient ) . createFile ( any ( alluxio . AlluxioURI . class ) , any ( alluxio . grpc . CreateFilePOptions . class ) ) ; try { mFileSystem . createFile ( new alluxio . AlluxioURI ( "/" ) , alluxio . grpc . CreateFilePOptions . getDefaultInstance ( ) ) ; org . junit . Assert . fail ( alluxio . client . file . BaseFileSystemTest . SHOULD_HAVE_PROPAGATED_MESSAGE ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } verifyFilesystemContextAcquiredAndReleased ( ) ; } getDefaultInstance ( ) { return alluxio . grpc . CreateFilePOptions . DEFAULT_INSTANCE ; }
org . junit . Assert . assertSame ( alluxio . client . file . BaseFileSystemTest . EXCEPTION , e )
testScoredSortedSetValueRange ( ) { org . redisson . api . RScoredSortedSetRx < java . lang . String > set = redisson . < java . lang . String > getScoredSortedSet ( "simple" ) ; sync ( set . add ( 0 , "a" ) ) ; sync ( set . add ( 1 , "b" ) ) ; sync ( set . add ( 2 , "c" ) ) ; sync ( set . add ( 3 , "d" ) ) ; sync ( set . add ( 4 , "e" ) ) ; java . util . Collection < java . lang . String > r = sync ( set . valueRange ( 1 , true , 4 , false , 1 , 2 ) ) ; java . lang . String [ ] a = r . toArray ( new java . lang . String [ 0 ] ) ; "<AssertPlaceHolder>" ; } toArray ( T [ ] ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "c" , "d" } , a )
saltTest ( ) { byte [ ] salt = new org . apache . cloudstack . server . auth . PBKDF2UserAuthenticator ( ) . makeSalt ( ) ; "<AssertPlaceHolder>" ; } makeSalt ( ) { java . security . SecureRandom sr = java . security . SecureRandom . getInstance ( "SHA1PRNG" ) ; byte [ ] salt = new byte [ org . apache . cloudstack . server . auth . PBKDF2UserAuthenticator . s_saltlen ] ; sr . nextBytes ( salt ) ; return salt ; }
org . junit . Assert . assertTrue ( ( ( salt . length ) > 16 ) )
endOfStreamCallbackShouldWaitForMessageDelivery ( ) { fakeClock . forwardTime ( 10 , TimeUnit . MILLISECONDS ) ; deframer . deframe ( io . grpc . internal . MessageDeframerTest . buffer ( new byte [ ] { 0 , 0 , 0 , 0 , 1 , 3 } ) ) ; deframer . closeWhenComplete ( ) ; verifyNoMoreInteractions ( listener ) ; deframer . request ( 1 ) ; verify ( listener ) . messagesAvailable ( producer . capture ( ) ) ; "<AssertPlaceHolder>" ; verify ( listener ) . deframerClosed ( false ) ; verify ( listener , atLeastOnce ( ) ) . bytesRead ( anyInt ( ) ) ; verifyNoMoreInteractions ( listener ) ; io . grpc . internal . MessageDeframerTest . checkStats ( tracer , transportTracer . getStats ( ) , fakeClock , 1 , 1 ) ; } bytes ( java . io . InputStream ) { try { return com . google . common . primitives . Bytes . asList ( com . google . common . io . ByteStreams . toByteArray ( in ) ) ; } catch ( java . io . IOException ex ) { throw new java . lang . AssertionError ( ex ) ; } }
org . junit . Assert . assertEquals ( com . google . common . primitives . Bytes . asList ( new byte [ ] { 3 } ) , io . grpc . internal . MessageDeframerTest . bytes ( producer . getValue ( ) . next ( ) ) )
testIsConditionValidWhenHeaderIsNotUnique ( ) { final org . drools . workbench . models . guided . dtable . shared . model . ConditionCol52 conditionCol1 = fakeConditionCol52 ( "header" ) ; final org . drools . workbench . models . guided . dtable . shared . model . ConditionCol52 conditionCol2 = fakeConditionCol52 ( "header" ) ; final org . drools . workbench . screens . guided . dtable . client . widget . Validator validator = new org . drools . workbench . screens . guided . dtable . client . widget . Validator ( fakeCompositeColumn ( conditionCol1 , conditionCol2 ) ) ; "<AssertPlaceHolder>" ; } isConditionValid ( org . drools . workbench . models . guided . dtable . shared . model . ConditionCol52 ) { return ( ( ( isConditionHeaderNotBlank ( c ) ) && ( isConditionHeaderUnique ( c ) ) ) && ( isConditionOperatorValid ( c ) ) ) && ( isConditionLimitedEntryValueValid ( c ) ) ; }
org . junit . Assert . assertFalse ( validator . isConditionValid ( conditionCol2 ) )
testRangeCoveredForBigDecimal ( ) { final java . math . BigDecimal min = new java . math . BigDecimal ( 100.0 ) ; final java . math . BigDecimal superMin = new java . math . BigDecimal ( 50.0 ) ; final java . math . BigDecimal max = new java . math . BigDecimal ( 200.0 ) ; final java . math . BigDecimal superMax = new java . math . BigDecimal ( 300.0 ) ; "<AssertPlaceHolder>" ; } isRangeCovered ( java . lang . Number , java . lang . Number , java . lang . Number , java . lang . Number ) { return ( ( org . opendaylight . yangtools . yang . model . util . type . NumberUtil . NUMBER_COMPARATOR . compare ( min , superMin ) ) >= 0 ) && ( ( org . opendaylight . yangtools . yang . model . util . type . NumberUtil . NUMBER_COMPARATOR . compare ( max , superMax ) ) <= 0 ) ; }
org . junit . Assert . assertTrue ( org . opendaylight . yangtools . yang . model . util . type . NumberUtil . isRangeCovered ( min , max , superMin , superMax ) )
testPostfixParanthesis ( ) { java . lang . String expr ; double expected ; expr = "(3<sp>+<sp>3<sp>*<sp>14)<sp>*<sp>(2<sp>*<sp>(24-17)<sp>-<sp>14)/((34)<sp>-2)" ; expected = ( ( 3 + ( 3 * 14 ) ) * ( ( 2 * ( 24 - 17 ) ) - 14 ) ) / ( 34 - 2 ) ; net . objecthunter . exp4j . Expression e = new net . objecthunter . exp4j . ExpressionBuilder ( expr ) . build ( ) ; "<AssertPlaceHolder>" ; } evaluate ( ) { final net . objecthunter . exp4j . ArrayStack output = new net . objecthunter . exp4j . ArrayStack ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { net . objecthunter . exp4j . tokenizer . Token t = tokens [ i ] ; else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_VARIABLE ) ) { final java . lang . String name = ( ( net . objecthunter . exp4j . tokenizer . VariableToken ) ( t ) ) . getName ( ) ; final java . lang . Double value = this . variables . get ( name ) ; if ( value == null ) { throw new java . lang . IllegalArgumentException ( ( ( "No<sp>value<sp>has<sp>been<sp>set<sp>for<sp>the<sp>setVariable<sp>'" + name ) + "'." ) ) ; } output . push ( value ) ; } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_OPERATOR ) ) { net . objecthunter . exp4j . tokenizer . OperatorToken op = ( ( net . objecthunter . exp4j . tokenizer . OperatorToken ) ( t ) ) ; if ( ( output . size ( ) ) < ( op . getOperator ( ) . getNumOperands ( ) ) ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>operands<sp>available<sp>for<sp>'" + ( op . getOperator ( ) . getSymbol ( ) ) ) + "'<sp>operator" ) ) ; } if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 2 ) { double rightArg = output . pop ( ) ; double leftArg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( leftArg , rightArg ) ) ; } else if ( ( op . getOperator ( ) . getNumOperands ( ) ) == 1 ) { double arg = output . pop ( ) ; output . push ( op . getOperator ( ) . apply ( arg ) ) ; } } else if ( ( t . getType ( ) ) == ( net . objecthunter . exp4j . tokenizer . Token . TOKEN_FUNCTION ) ) { net . objecthunter . exp4j . tokenizer . FunctionToken func = ( ( net . objecthunter . exp4j . tokenizer . FunctionToken ) ( t ) ) ; final int numArguments = func . getFunction ( ) . getNumArguments ( ) ; if ( ( output . size ( ) ) < numArguments ) { throw new java . lang . IllegalArgumentException ( ( ( "Invalid<sp>number<sp>of<sp>arguments<sp>available<sp>for<sp>'" + ( func . getFunction ( ) . getName ( ) ) ) + "'<sp>function" ) ) ; } double [ ] args = new double [ numArguments ] ; for ( int j = numArguments - 1 ; j >= 0 ; j -- ) { args [ j ] = output . pop ( ) ; } output . push ( func . getFunction ( ) . apply ( args ) ) ; } } if ( ( output . size ( ) ) > 1 ) { throw new java . lang . IllegalArgumentException ( "Invalid<sp>number<sp>of<sp>items<sp>on<sp>the<sp>output<sp>queue.<sp>Might<sp>be<sp>caused<sp>by<sp>an<sp>invalid<sp>number<sp>of<sp>arguments<sp>for<sp>a<sp>function." ) ; } return output . pop ( ) ; }
org . junit . Assert . assertTrue ( ( expected == ( e . evaluate ( ) ) ) )
testStandardDecodePushbackSequenceNullSecondElementReturnsNull ( ) { org . owasp . esapi . codecs . PushbackSequence < java . lang . Character > mockPushback = org . mockito . Mockito . mock ( org . owasp . esapi . codecs . PushbackSequence . class ) ; org . mockito . Mockito . when ( mockPushback . next ( ) ) . thenReturn ( '\\' ) . thenReturn ( null ) ; java . lang . Character decChar = uitMySqlStandard . decodeCharacter ( mockPushback ) ; "<AssertPlaceHolder>" ; org . mockito . Mockito . verify ( mockPushback , org . mockito . Mockito . times ( 1 ) ) . mark ( ) ; org . mockito . Mockito . verify ( mockPushback , org . mockito . Mockito . times ( 2 ) ) . next ( ) ; org . mockito . Mockito . verify ( mockPushback , org . mockito . Mockito . times ( 1 ) ) . reset ( ) ; } decodeCharacter ( org . owasp . esapi . codecs . PushbackString ) { input . mark ( ) ; java . lang . Character first = input . next ( ) ; if ( first == null ) { input . reset ( ) ; return null ; } if ( first != '&' ) { input . reset ( ) ; return null ; } java . lang . Character second = input . next ( ) ; if ( second == null ) { input . reset ( ) ; return null ; } if ( second == '#' ) { java . lang . Character c = getNumericEntity ( input ) ; if ( c != null ) return c ; } else if ( java . lang . Character . isLetter ( second . charValue ( ) ) ) { input . pushback ( second ) ; java . lang . Character c = getNamedEntity ( input ) ; if ( c != null ) return c ; } input . reset ( ) ; return null ; }
org . junit . Assert . assertNull ( decChar )
testMissingEmbeddedTemplate ( ) { org . stringtemplate . v4 . test . ErrorBuffer errors = new org . stringtemplate . v4 . test . ErrorBuffer ( ) ; java . lang . String templates = "t()<sp>::=<sp>\"<foo()>\"" + ( Misc . newline ) ; writeFile ( tmpdir , "t.stg" , templates ) ; org . stringtemplate . v4 . test . STGroup group = new org . stringtemplate . v4 . test . STGroupFile ( ( ( ( tmpdir ) + "/" ) + "t.stg" ) ) ; group . setListener ( errors ) ; org . stringtemplate . v4 . test . ST st = group . getInstanceOf ( "t" ) ; st . render ( ) ; java . lang . String expected = "context<sp>[/t]<sp>1:1<sp>no<sp>such<sp>template:<sp>/foo" + ( newline ) ; java . lang . String result = errors . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( getClass ( ) . getSimpleName ( ) ) + "{" ) + "self=" ) + ( scope . st ) ) + ",<sp>start=" ) + ( outputStartChar ) ) + ",<sp>stop=" ) + ( outputStopChar ) ) + '}' ; }
org . junit . Assert . assertEquals ( expected , result )
validDecodedStringShouldReturnQuery ( ) { java . lang . String queryString = "-Tperson<sp>DW-RIPE" ; net . ripe . db . whois . query . query . Query expectedQuery = net . ripe . db . whois . query . query . Query . parse ( queryString ) ; when ( channelMock . getRemoteAddress ( ) ) . thenReturn ( new java . net . InetSocketAddress ( com . google . common . net . InetAddresses . forString ( "10.0.0.1" ) , 80 ) ) ; net . ripe . db . whois . query . query . Query actualQuery = ( ( net . ripe . db . whois . query . query . Query ) ( subject . decode ( channelHandlerContextMock , channelMock , queryString ) ) ) ; "<AssertPlaceHolder>" ; } decode ( org . jboss . netty . channel . ChannelHandlerContext , org . jboss . netty . channel . Channel , java . lang . Object ) { final net . ripe . db . whois . query . query . Query query = net . ripe . db . whois . query . query . Query . parse ( ( ( java . lang . String ) ( msg ) ) , Query . Origin . LEGACY , isTrusted ( channel ) ) ; for ( final net . ripe . db . whois . common . Message warning : query . getWarnings ( ) ) { channel . write ( warning ) ; } return query ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
testInsertByJT ( ) { int updatedRows = jdbcTemplate . update ( "insert<sp>into<sp>t_user(username,password)<sp>values(?,?)" , new java . lang . Object [ ] { "aa" , "aaa" } ) ; "<AssertPlaceHolder>" ; } update ( int , java . lang . String , int ) { java . sql . Connection conn = java . sql . DriverManager . getConnection ( url , user , password ) ; java . lang . String sql = "UPDATE<sp>users<sp>SET<sp>user_id<sp>=<sp>?,<sp>name<sp>=<sp>?<sp>WHERE<sp>user_id<sp>=<sp>?" ; java . sql . PreparedStatement stmt = conn . prepareStatement ( sql ) ; stmt . setInt ( 1 , flag ) ; stmt . setString ( 2 , value2 ) ; stmt . setInt ( 3 , id ) ; stmt . executeUpdate ( ) ; stmt . close ( ) ; conn . close ( ) ; }
org . junit . Assert . assertTrue ( ( updatedRows > 0 ) )
getAutoriteitAfgifteReisdocTestOK ( ) { final java . lang . String aarCode = "PK" ; final java . lang . String resultAar = lo3StamtabelService . getAutoriteitVanAfgifteReisdocument ( aarCode ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( aarCode , resultAar )
isExpandedReturnsFalseForNullSetting ( ) { org . phenotips . configuration . RecordSection s = new org . phenotips . configuration . spi . UIXRecordSection ( this . uiExtension , this . uixManager , this . orderFilter ) ; "<AssertPlaceHolder>" ; } isExpandedByDefault ( ) { return this . expanded ; }
org . junit . Assert . assertFalse ( s . isExpandedByDefault ( ) )
testTxAssociationChangeConcurrently ( ) { final int TEST_RUNS = 5 ; final int EXPECTED_MINIMUM_DESTROY_CNT = TEST_RUNS + ( com . hp . mwtests . ts . jta . cdi . transactionScoped . TestCDITransactionScopeBean . getPreDestroyCnt ( ) ) ; com . hp . mwtests . ts . jta . cdi . transactionScoped . ExecutorService executor = com . hp . mwtests . ts . jta . cdi . transactionScoped . Executors . newFixedThreadPool ( TEST_RUNS ) ; java . util . Collection < com . hp . mwtests . ts . jta . cdi . transactionScoped . Future < java . lang . Boolean > > tasks = new java . util . ArrayList < com . hp . mwtests . ts . jta . cdi . transactionScoped . Future < java . lang . Boolean > > ( ) ; com . hp . mwtests . ts . jta . cdi . transactionScoped . TransactionScopedTest . timestamps . clear ( ) ; for ( int i = 0 ; i < TEST_RUNS ; i ++ ) { tasks . add ( executor . submit ( new com . hp . mwtests . ts . jta . cdi . transactionScoped . Callable < java . lang . Boolean > ( ) { public com . hp . mwtests . ts . jta . cdi . transactionScoped . Boolean call ( ) throws com . hp . mwtests . ts . jta . cdi . transactionScoped . Exception { testTxAssociationChange ( ) ; return true ; } } ) ) ; } for ( com . hp . mwtests . ts . jta . cdi . transactionScoped . Future < java . lang . Boolean > task : tasks ) { try { if ( ! ( task . get ( ) ) ) throw new java . lang . Exception ( "Concurrent<sp>testTxAssociationChange<sp>failed" ) ; } catch ( java . lang . Exception e ) { throw new java . lang . Exception ( "Concurrent<sp>testTxAssociationChange<sp>failed<sp>with<sp>exception" , e ) ; } } "<AssertPlaceHolder>" ; for ( java . lang . String s : com . hp . mwtests . ts . jta . cdi . transactionScoped . TransactionScopedTest . timestamps ) System . out . print ( s ) ; } getPreDestroyCnt ( ) { return com . hp . mwtests . ts . jta . cdi . transactionScoped . TestCDITransactionScopeBean . preDestroyCnt . get ( ) ; }
org . junit . Assert . assertTrue ( ( EXPECTED_MINIMUM_DESTROY_CNT <= ( com . hp . mwtests . ts . jta . cdi . transactionScoped . TestCDITransactionScopeBean . getPreDestroyCnt ( ) ) ) )
getAllConceptProposals_shouldReturnAllConceptProposalsIncludingRetiredOnesWhenGivenTrue ( ) { int matchedConceptProposals = 2 ; java . util . List < org . openmrs . ConceptProposal > conceptProposals = conceptService . getAllConceptProposals ( true ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( matchedConceptProposals , conceptProposals . size ( ) )
testListChildrenMaterialCategories ( ) { org . libreplan . business . materials . entities . MaterialCategory category = createValidMaterialCategory ( ) ; org . libreplan . business . materials . entities . MaterialCategory subcategory = createValidMaterialCategory ( ) ; int previous = category . getSubcategories ( ) . size ( ) ; category . addSubcategory ( subcategory ) ; materialCategoryDAO . save ( category ) ; java . util . Set < org . libreplan . business . materials . entities . MaterialCategory > childrenList = category . getSubcategories ( ) ; "<AssertPlaceHolder>" ; } getSubcategories ( ) { return java . util . Collections . unmodifiableSet ( subcategories ) ; }
org . junit . Assert . assertEquals ( ( previous + 1 ) , childrenList . size ( ) )
testGetMatchingRecordFields_POST ( ) { try ( com . salesforce . dva . argus . sdk . ArgusService argusService = new com . salesforce . dva . argus . sdk . ArgusService ( getMockedClient ( "/DiscoveryServiceTest.json" ) ) ) { com . salesforce . dva . argus . sdk . DiscoveryService discoveryService = argusService . getDiscoveryService ( ) ; com . salesforce . dva . argus . sdk . entity . MetricDiscoveryQuery query = new com . salesforce . dva . argus . sdk . entity . MetricDiscoveryQuery ( null , "scpReg" , "*" , null , null , 10 , "namespace" , null ) ; com . salesforce . dva . argus . sdk . entity . MetricDiscoveryResult result = discoveryService . getMatchingRecords ( query ) ; com . salesforce . dva . argus . sdk . entity . MetricDiscoveryResult expected = new com . salesforce . dva . argus . sdk . entity . MetricDiscoveryResult ( java . util . Arrays . asList ( new java . lang . String [ ] { "namespace1" , "namespace2" } ) , null ) ; "<AssertPlaceHolder>" ; } } getMatchingRecords ( com . salesforce . dva . argus . sdk . entity . MetricDiscoveryQuery ) { java . lang . String requestUrl = com . salesforce . dva . argus . sdk . DiscoveryService . RESOURCE ; com . salesforce . dva . argus . sdk . ArgusHttpClient . ArgusResponse response = getClient ( ) . executeHttpRequest ( ArgusHttpClient . RequestType . POST , requestUrl , query ) ; assertValidResponse ( response , requestUrl ) ; return MAPPER . readValue ( response . getResult ( ) , com . salesforce . dva . argus . sdk . entity . MetricDiscoveryResult . class ) ; }
org . junit . Assert . assertEquals ( expected , result )
testSortBulkMapper ( ) { K key1 = keyFactory . instance ( ) ; V value1 = valueFactory . instance ( ) ; org . junit . Assume . assumeTrue ( ( value1 instanceof java . lang . Number ) ) ; redisTemplate . opsForList ( ) . rightPush ( key1 , value1 ) ; org . springframework . data . redis . core . List < java . lang . String > results = redisTemplate . sort ( org . springframework . data . redis . core . query . SortQueryBuilder . sort ( key1 ) . get ( "#" ) . build ( ) , ( tuple ) -> "FOO" ) ; "<AssertPlaceHolder>" ; } build ( ) { org . springframework . util . Assert . notNull ( keyTuple , "Key<sp>SerializationPair<sp>must<sp>not<sp>be<sp>null!" ) ; org . springframework . util . Assert . notNull ( valueTuple , "Value<sp>SerializationPair<sp>must<sp>not<sp>be<sp>null!" ) ; org . springframework . util . Assert . notNull ( hashKeyTuple , "HashKey<sp>SerializationPair<sp>must<sp>not<sp>be<sp>null!" ) ; org . springframework . util . Assert . notNull ( hashValueTuple , "ValueKey<sp>SerializationPair<sp>must<sp>not<sp>be<sp>null!" ) ; return new org . springframework . data . redis . serializer . DefaultRedisSerializationContext ( keyTuple , valueTuple , hashKeyTuple , hashValueTuple , stringTuple ) ; }
org . junit . Assert . assertEquals ( org . springframework . data . redis . core . Collections . singletonList ( "FOO" ) , results )
testAnnotationOrderDoesNotMatter ( ) { org . jboss . arquillian . drone . spi . DronePoint < org . jboss . arquillian . drone . impl . mockdrone . MockDrone > dronePoint = new org . jboss . arquillian . drone . impl . DronePointImpl < org . jboss . arquillian . drone . impl . mockdrone . MockDrone > ( org . jboss . arquillian . drone . impl . mockdrone . MockDrone . class , null , org . jboss . arquillian . drone . impl . AnnotationMocks . drone ( ) , org . jboss . arquillian . drone . impl . AnnotationMocks . defaultQualifier ( ) , org . jboss . arquillian . drone . impl . AnnotationMocks . differentQualifier ( ) ) ; org . jboss . arquillian . drone . spi . DronePoint < org . jboss . arquillian . drone . impl . mockdrone . MockDrone > dronePoint1 = new org . jboss . arquillian . drone . impl . DronePointImpl < org . jboss . arquillian . drone . impl . mockdrone . MockDrone > ( org . jboss . arquillian . drone . impl . mockdrone . MockDrone . class , null , org . jboss . arquillian . drone . impl . AnnotationMocks . differentQualifier ( ) , org . jboss . arquillian . drone . impl . AnnotationMocks . drone ( ) , org . jboss . arquillian . drone . impl . AnnotationMocks . defaultQualifier ( ) ) ; "<AssertPlaceHolder>" ; } defaultQualifier ( ) { return org . jboss . arquillian . drone . impl . AnnotationMocks . getFieldAnnotation ( org . jboss . arquillian . drone . api . annotation . Default . class , "aDefault" ) ; }
org . junit . Assert . assertThat ( dronePoint , org . hamcrest . CoreMatchers . is ( dronePoint1 ) )
checkAbilityToStartServiceWithLogFileUsingFlag ( ) { testLogFile = new java . io . File ( "Log2.txt" ) ; service = new io . appium . java_client . service . local . AppiumServiceBuilder ( ) . withArgument ( ( ) -> "--log" , testLogFile . getAbsolutePath ( ) ) . build ( ) ; service . start ( ) ; "<AssertPlaceHolder>" ; } start ( ) { lock . lock ( ) ; try { if ( isRunning ( ) ) { return ; } try { process = new org . openqa . selenium . os . CommandLine ( this . nodeJSExec . getCanonicalPath ( ) , nodeJSArgs . toArray ( new java . lang . String [ ] { } ) ) ; process . setEnvironmentVariables ( nodeJSEnvironment ) ; process . copyOutputTo ( stream ) ; process . executeAsync ( ) ; ping ( startupTimeout , timeUnit ) ; } catch ( java . lang . Throwable e ) { destroyProcess ( ) ; java . lang . String msgTxt = ( ( ( ( ( "The<sp>local<sp>appium<sp>server<sp>has<sp>not<sp>been<sp>started.<sp>" + "The<sp>given<sp>Node.js<sp>executable:<sp>" ) + ( this . nodeJSExec . getAbsolutePath ( ) ) ) + "<sp>Arguments:<sp>" ) + ( nodeJSArgs . toString ( ) ) ) + "<sp>" ) + "\n" ; if ( ( process ) != null ) { java . lang . String processStream = process . getStdOut ( ) ; if ( ! ( org . apache . commons . lang3 . StringUtils . isBlank ( processStream ) ) ) { msgTxt = ( ( msgTxt + "Process<sp>output:<sp>" ) + processStream ) + "\n" ; } } throw new io . appium . java_client . service . local . AppiumServerHasNotBeenStartedLocallyException ( msgTxt , e ) ; } } finally { lock . unlock ( ) ; } }
org . junit . Assert . assertTrue ( testLogFile . exists ( ) )
delegateSetOnConstruction ( ) { "<AssertPlaceHolder>" ; } getDelegate ( ) { if ( ( dsDelegate ) == null ) { dsDelegate = new gov . hhs . fha . nhinc . corex12 . ds . realtime . entity . OutboundX12RealTimeDelegate ( ) ; } return dsDelegate ; }
org . junit . Assert . assertNotNull ( builder . getDelegate ( ) )
serializePublicationWithJoynrRuntimeException ( ) { io . joynr . exceptions . JoynrRuntimeException error = new io . joynr . exceptions . JoynrRuntimeException ( "detail<sp>message:<sp>JoynrRuntimeException" ) ; java . lang . String subscriptionId = "12345" ; joynr . SubscriptionPublication publication = new joynr . SubscriptionPublication ( error , subscriptionId ) ; java . lang . String writeValueAsString = objectMapper . writeValueAsString ( publication ) ; joynr . SubscriptionPublication receivedPublication = objectMapper . readValue ( writeValueAsString , joynr . SubscriptionPublication . class ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( publication , receivedPublication )
testExonOverlapStopLostOma1 ( ) { final java . lang . String outPath = runJannovarOnVCFLine ( "/sv_header.vcf" , "1\t58946591\t.\tN\t<DEL:ME>\t.\t.\tSVTYPE=DEL;END=58946671" ) ; final java . lang . String expected = "1\t58946591\t.\tN\t<DEL:ME>\t.\t.\tEND=58946671;" + ( "SVANN=stop_lost&mobile_element_deletion&coding_transcript_variant|HIGH|OMA1|115209|transcript|NM_145243.3|Coding|;" + "SVTYPE=DEL" ) ; final java . lang . String actual = loadVcfBody ( outPath ) ; "<AssertPlaceHolder>" ; } loadVcfBody ( java . lang . String ) { return java . util . Arrays . asList ( com . google . common . io . Files . asCharSource ( new de . charite . compbio . jannovar . cmd . annotate_vcf . File ( outPath ) , Charsets . UTF_8 ) . read ( ) . split ( "\r?\n" ) ) . stream ( ) . filter ( ( line ) -> ! ( line . startsWith ( "#" ) ) ) . collect ( java . util . stream . Collectors . joining ( ) ) ; }
org . junit . Assert . assertEquals ( expected , actual )
validFilename_String ( ) { java . lang . String f = ( net . coobird . thumbnailator . tasks . io . FileImageSinkTest . TMPDIR ) + "/test.png" ; net . coobird . thumbnailator . tasks . io . FileImageSink sink = new net . coobird . thumbnailator . tasks . io . FileImageSink ( f ) ; "<AssertPlaceHolder>" ; } getSink ( ) { if ( ! ( written ) ) { throw new java . lang . IllegalStateException ( "BufferedImageSink<sp>has<sp>not<sp>been<sp>written<sp>to<sp>yet." ) ; } return img ; }
org . junit . Assert . assertEquals ( new java . io . File ( f ) , sink . getSink ( ) )
compareGeneratedRequests ( ) { org . opennms . netmgt . provision . service . vmware . VmwareRequisitionUrlConnection vmwareUrlConnection = new org . opennms . netmgt . provision . service . vmware . VmwareRequisitionUrlConnection ( new java . net . URL ( vmwareUrl ) ) ; org . opennms . netmgt . provision . service . vmware . VmwareImportRequest vmwareUrlImportRequest = vmwareUrlConnection . getImportRequest ( ) ; java . util . Map < java . lang . String , java . lang . String > requisitionUrlParms = org . opennms . netmgt . provision . service . requisition . RequisitionUrlConnection . getParameters ( new java . net . URL ( requisitionUrl ) ) ; org . opennms . netmgt . provision . service . vmware . VmwareImportRequest requisitionUrlImportRequest = new org . opennms . netmgt . provision . service . vmware . VmwareImportRequest ( requisitionUrlParms ) ; "<AssertPlaceHolder>" ; } getParameters ( java . net . URL ) { final java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap ( ) ; params . put ( "type" , url . getHost ( ) ) ; params . put ( "path" , url . getPath ( ) ) ; final java . lang . String userInfo = url . getUserInfo ( ) ; if ( ( userInfo != null ) && ( ! ( userInfo . isEmpty ( ) ) ) ) { if ( userInfo . contains ( ":" ) ) { final java . lang . String [ ] tokens = userInfo . split ( ":" ) ; params . put ( "username" , tokens [ 0 ] ) ; params . put ( "password" , tokens [ 1 ] ) ; } else { params . put ( "username" , userInfo ) ; } } params . putAll ( org . opennms . core . utils . url . GenericURLConnection . getQueryStringParameters ( url . getQuery ( ) ) ) ; return java . util . Collections . unmodifiableMap ( params ) ; }
org . junit . Assert . assertEquals ( vmwareUrlImportRequest , requisitionUrlImportRequest )
isValid ( ) { javax . validation . Validator validator = javax . validation . Validation . buildDefaultValidatorFactory ( ) . getValidator ( ) ; org . greenbuttonalliance . espi . common . domain . ReadingQuality readingQuality = new org . greenbuttonalliance . espi . common . domain . ReadingQuality ( ) ; java . util . Set < javax . validation . ConstraintViolation < org . greenbuttonalliance . espi . common . domain . ReadingQuality > > violations = validator . validate ( readingQuality ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return new org . greenbuttonalliance . espi . common . test . IsEmpty ( ) ; }
org . junit . Assert . assertTrue ( violations . isEmpty ( ) )
testGetNamespaces_FromCursor_Limit ( ) { long millis = java . lang . System . currentTimeMillis ( ) ; java . util . List < com . jmethods . catatumbo . entities . StringField > entities = new java . util . ArrayList ( ) ; for ( int i = 0 ; i < 5 ; i ++ ) { java . lang . String namespace = java . lang . String . valueOf ( ( millis + i ) ) ; com . jmethods . catatumbo . entities . StringField entity = new com . jmethods . catatumbo . entities . StringField ( ) ; entity . setName ( ( "I'm<sp>in<sp>namespace<sp>" + namespace ) ) ; entity = createEntity ( entity , namespace ) ; entities . add ( entity ) ; createdNamespaces . add ( namespace ) ; } com . jmethods . catatumbo . DatastoreMetadata dmd = com . jmethods . catatumbo . DatastoreMetadataTest . em . getDatastoreMetadata ( ) ; com . jmethods . catatumbo . QueryResponse < java . lang . String > response = dmd . getNamespaces ( 2 ) ; com . jmethods . catatumbo . DatastoreCursor nextPageCursor = response . getEndCursor ( ) ; java . util . List < java . lang . String > namespaces = dmd . getNamespaces ( nextPageCursor , 2 ) . getResults ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , namespaces . size ( ) )
map_payload ( ) { final java . lang . String rulebase = "rules/reloaded/msg011.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaMessagingTest . kAgent , test . ws . prova . test2 . ProvaMessagingTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 1000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
org . junit . Assert . assertEquals ( 1 , count . get ( ) )
onCreateShouldRegisterKeyListenerThatSendsMessageAndClearsInputOnEnter ( ) { activityController . create ( ) ; final android . widget . EditText privateChatInput = ( ( android . widget . EditText ) ( controller . findViewById ( R . id . privateChatInput ) ) ) ; privateChatInput . setText ( "Hello" ) ; privateChatInput . dispatchKeyEvent ( new android . view . KeyEvent ( android . view . KeyEvent . ACTION_UP , android . view . KeyEvent . KEYCODE_ENTER ) ) ; verify ( ui ) . sendPrivateMessage ( "Hello" , vivi ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( "Line{" + "lineNumber=" ) + ( lineNumber ) ) + ",<sp>lineText=" ) + ( lineText ) ) + '}' ; }
org . junit . Assert . assertEquals ( "" , privateChatInput . getText ( ) . toString ( ) )
testClassPathResourceWithClass ( ) { leap . lang . resource . Resource resource = new leap . lang . resource . ClassPathResource ( "Resource.class" , getClass ( ) ) ; doTestResource ( resource ) ; "<AssertPlaceHolder>" ; } doTestResource ( leap . lang . resource . Resource ) { org . junit . Assert . assertEquals ( "Resource.class" , resource . getFilename ( ) ) ; org . junit . Assert . assertTrue ( resource . getURL ( ) . getFile ( ) . endsWith ( "Resource.class" ) ) ; leap . lang . resource . Resource relative1 = resource . createRelative ( "ClassPathResource.class" ) ; org . junit . Assert . assertEquals ( "ClassPathResource.class" , relative1 . getFilename ( ) ) ; org . junit . Assert . assertTrue ( relative1 . getURL ( ) . getFile ( ) . endsWith ( "ClassPathResource.class" ) ) ; org . junit . Assert . assertTrue ( relative1 . exists ( ) ) ; leap . lang . resource . Resource relative2 = resource . createRelative ( "./ResourceScanner.class" ) ; org . junit . Assert . assertEquals ( "ResourceScanner.class" , relative2 . getFilename ( ) ) ; org . junit . Assert . assertTrue ( relative2 . getURL ( ) . getFile ( ) . endsWith ( "ResourceScanner.class" ) ) ; org . junit . Assert . assertTrue ( relative2 . exists ( ) ) ; }
org . junit . Assert . assertEquals ( resource , new leap . lang . resource . ClassPathResource ( "Resource.class" , getClass ( ) ) )