input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
getContextTest ( ) { when ( myApp . getApplicationContextLocal ( ) ) . thenReturn ( activity ) ; myApp . onCreate ( ) ; "<AssertPlaceHolder>" ; } getContext ( ) { return org . mewx . wenku8 . MyApp . context ; }
org . junit . Assert . assertEquals ( activity , org . mewx . wenku8 . MyApp . getContext ( ) )
testJpqlQueryGetSingleResultCount ( ) { java . lang . String queryString = "select<sp>count(o)<sp>from<sp>Dictionary<sp>o<sp>where<sp>o.category<sp>=<sp>:category<sp>and<sp>o.code<sp>=<sp>:code" ; org . dayatang . persistence . jpa . JpqlQuery query = new org . dayatang . persistence . jpa . JpqlQuery ( repository , queryString ) . addParameter ( "category" , gender ) . addParameter ( "code" , "01" ) ; "<AssertPlaceHolder>" ; } getSingleResult ( org . dayatang . persistence . jpa . SqlQuery ) { try { return ( ( T ) ( getQuery ( sqlQuery ) . getSingleResult ( ) ) ) ; } catch ( javax . persistence . NoResultException e ) { return null ; } }
org . junit . Assert . assertEquals ( 1L , repository . getSingleResult ( query ) )
plusEmptyInterval ( ) { net . time4j . range . DateInterval i1 = net . time4j . range . DateInterval . between ( net . time4j . PlainDate . of ( 2014 , 2 , 28 ) , net . time4j . PlainDate . of ( 2014 , 5 , 31 ) ) ; net . time4j . range . DateInterval i2 = net . time4j . range . DateInterval . between ( net . time4j . PlainDate . of ( 2014 , 4 , 30 ) , net . time4j . PlainDate . of ( 2014 , 6 , 1 ) ) ; net . time4j . range . DateInterval empty = net . time4j . range . DateInterval . atomic ( net . time4j . PlainDate . of ( 2012 , 5 , 10 ) ) . withOpenEnd ( ) ; net . time4j . range . IntervalCollection < net . time4j . PlainDate > icoll = net . time4j . range . IntervalCollection . onDateAxis ( ) . plus ( java . util . Arrays . asList ( i1 , i2 , empty ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return this . size ; }
org . junit . Assert . assertThat ( icoll . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
shouldGetMockCollectionGivenTwoTypesOfElement ( ) { uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField mockCollection1 = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( java . util . Collections . emptyList ( ) , java . util . List . class , java . io . FileOutputStream . class ) ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField mockCollection2 = new uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField ( java . util . Collections . emptyList ( ) , java . util . List . class , java . io . OutputStream . class ) ; java . util . Set < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > mockCollections = new java . util . HashSet < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > ( java . util . Arrays . < uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < java . util . Collection < java . lang . Object > , java . lang . Object > > asList ( mockCollection1 , mockCollection2 ) ) ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet set = mock ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet . class ) ; given ( set . iterator ( ) ) . willReturn ( mockCollections . iterator ( ) ) ; java . lang . Class < java . util . List > typeOfCollection = java . util . List . class ; java . lang . Class < java . io . OutputStream > typeOfElements = java . io . OutputStream . class ; uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField actualMockCollection = strategy . getCollectionOfMocksField ( set , typeOfCollection , typeOfElements ) ; "<AssertPlaceHolder>" ; } getCollectionOfMocksField ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksFieldSet , java . lang . Class , java . lang . Class ) { if ( collectionOfMocksFieldSet == null ) { throw new java . lang . IllegalArgumentException ( "collectionOfMocksFieldSet<sp>must<sp>not<sp>be<sp>null" ) ; } if ( typeOfCollection == null ) { throw new java . lang . IllegalArgumentException ( "typeOfCollection<sp>must<sp>not<sp>be<sp>null" ) ; } if ( typeOfElements == null ) { throw new java . lang . IllegalArgumentException ( "typeOfElements<sp>must<sp>not<sp>be<sp>null" ) ; } uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < C , E > collectionOfMocksField = null ; for ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < ? , ? > candidate : collectionOfMocksFieldSet ) { if ( ( candidate . getTypeOfCollection ( ) . equals ( typeOfCollection ) ) && ( candidate . getTypeOfElements ( ) . equals ( typeOfElements ) ) ) { if ( collectionOfMocksField != null ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( "There<sp>is<sp>more<sp>than<sp>one<sp>CollectionOfMocksField<sp>of<sp>type<sp>of<sp>collection<sp>" + typeOfCollection ) + "<sp>and<sp>type<sp>of<sp>element<sp>" ) + typeOfElements ) + ".<sp>There<sp>may<sp>be<sp>other<sp>offending<sp>duplicates." ) ) ; } collectionOfMocksField = ( ( uk . co . webamoeba . mockito . collections . inject . CollectionOfMocksField < C , E > ) ( candidate ) ) ; } } return collectionOfMocksField ; }
org . junit . Assert . assertSame ( mockCollection2 , actualMockCollection )
testDiagPart ( ) { org . nd4j . linalg . api . ndarray . INDArray i = org . nd4j . linalg . factory . Nd4j . create ( 5 , 5 ) ; org . nd4j . autodiff . samediff . SameDiff sd = org . nd4j . autodiff . samediff . SameDiff . create ( ) ; org . nd4j . autodiff . samediff . SDVariable var = sd . var ( "in" , i ) ; org . nd4j . autodiff . samediff . SDVariable diag = sd . math ( ) . diagPart ( var ) ; org . nd4j . linalg . api . ndarray . INDArray out = sd . execAndEndResult ( ) ; "<AssertPlaceHolder>" ; } rank ( ) { return jvmShapeInfo . rank ; }
org . junit . Assert . assertEquals ( 1 , out . rank ( ) )
testGetEntryPointNameWheeunEditingPatternIsNotPresent ( ) { final org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . PatternWrapper patternWrapper = new org . drools . workbench . screens . guided . dtable . client . wizard . column . plugins . commons . PatternWrapper ( ) ; doReturn ( patternWrapper ) . when ( plugin ) . patternWrapper ( ) ; final java . lang . String entryPointName = plugin . getEntryPointName ( ) ; "<AssertPlaceHolder>" ; } getEntryPointName ( ) { return entryPointName ; }
org . junit . Assert . assertEquals ( "" , entryPointName )
whenFindByName_thenAvailableOnRetrieval ( ) { com . baeldung . spring . data . solr . model . Product phone = new com . baeldung . spring . data . solr . model . Product ( ) ; phone . setId ( "P0001" ) ; phone . setName ( "Phone" ) ; productRepository . save ( phone ) ; java . util . List < com . baeldung . spring . data . solr . model . Product > retrievedProducts = productRepository . findByName ( "Phone" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertEquals ( phone . getId ( ) , retrievedProducts . get ( 0 ) . getId ( ) )
trimAll_A$String_StringIsEmpty ( ) { org . junithelper . core . filter . impl . TrimInsideOfStringFilter target = new org . junithelper . core . filter . impl . TrimInsideOfStringFilter ( ) ; java . lang . String src = "" ; java . lang . String actual = target . trimAll ( src ) ; java . lang . String expected = "" ; "<AssertPlaceHolder>" ; } trimAll ( java . lang . String ) { if ( src == null ) { return null ; } return src . replaceFirst ( "@interface" , "interface" ) . replaceAll ( "@[^\\s\r\n\\(]+(\\([^\\)]*\\))*" , "<sp>" ) . replaceAll ( "@[^\\s\r\n]+" , "" ) ; }
org . junit . Assert . assertThat ( actual , is ( equalTo ( expected ) ) )
testBuildMultipleStringWhereValues ( ) { java . lang . String expectedAwql = "SELECT<sp>Id,<sp>Name<sp>WHERE<sp>Name<sp>CONTAINS_ALL<sp>[\"white\",<sp>\"black\"]<sp>LIMIT<sp>0,50" ; com . google . api . ads . adwords . axis . utils . v201809 . ServiceQuery serviceQuery = new com . google . api . ads . adwords . axis . utils . v201809 . ServiceQuery . Builder ( ) . fields ( "Id" , "Name" ) . where ( "Name" ) . containsAll ( "white" , "black" ) . limit ( 0 , 50 ) . 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 , serviceQuery . toString ( ) )
testIndexOfColumns ( ) { org . eclipse . swt . widgets . TreeColumn col = new org . eclipse . swt . widgets . TreeColumn ( tree , org . eclipse . swt . SWT . NONE ) ; "<AssertPlaceHolder>" ; col . dispose ( ) ; try { tree . indexOf ( col ) ; org . junit . Assert . fail ( "Must<sp>not<sp>allow<sp>to<sp>call<sp>indexOf<sp>for<sp>disposed<sp>item" ) ; } catch ( java . lang . IllegalArgumentException e ) { } try { tree . indexOf ( ( ( org . eclipse . swt . widgets . TreeColumn ) ( null ) ) ) ; org . junit . Assert . fail ( "Must<sp>not<sp>allow<sp>to<sp>call<sp>indexOf<sp>for<sp>null" ) ; } catch ( java . lang . IllegalArgumentException iae ) { } } indexOf ( org . eclipse . nebula . widgets . grid . GridItem ) { checkWidget ( ) ; if ( item == null ) { org . eclipse . swt . SWT . error ( SWT . ERROR_NULL_ARGUMENT ) ; } if ( item . isDisposed ( ) ) { org . eclipse . swt . SWT . error ( SWT . ERROR_INVALID_ARGUMENT ) ; } if ( ! ( hasChildren ) ) { throw new java . lang . IllegalArgumentException ( "GridItem<sp>has<sp>no<sp>children!" ) ; } return ( item . getParentItem ( ) ) == ( this ) ? item . index : - 1 ; }
org . junit . Assert . assertEquals ( 0 , tree . indexOf ( col ) )
testConstructor ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( configuration )
getReaderForItemMissingFromCacheWillRetryAndCanSucceed ( ) { when ( cache . getReader ( "url" ) ) . thenThrow ( new org . alfresco . repo . content . caching . CacheMissException ( "url" ) ) . thenReturn ( cachedContent ) ; when ( backingStore . getReader ( "url" ) ) . thenReturn ( sourceContent ) ; when ( cache . put ( "url" , sourceContent ) ) . thenReturn ( true ) ; org . alfresco . service . cmr . repository . ContentReader returnedReader = cachingStore . getReader ( "url" ) ; "<AssertPlaceHolder>" ; } getReader ( java . lang . String ) { org . springframework . extensions . webscripts . connector . Response res = getDocumentResponse ( templatePath ) ; if ( ( encoding == null ) || ( encoding . equals ( res . getEncoding ( ) ) ) ) { return new java . io . StringReader ( res . getResponse ( ) ) ; } else { return new java . io . InputStreamReader ( res . getResponseStream ( ) , encoding ) ; } }
org . junit . Assert . assertSame ( returnedReader , cachedContent )
shouldNotUpdateResourcesForChildCertificateWithInheritedResources ( ) { net . ripe . rpki . commons . validation . objectvalidators . CertificateRepositoryObjectValidationContext childContext = subject . createChildContext ( net . ripe . rpki . commons . validation . CertificateRepositoryObjectValidationContextTest . childLocation , certificateWithInheritedResources ) ; "<AssertPlaceHolder>" ; } getResources ( ) { return getEffectiveResources ( resources ) ; }
org . junit . Assert . assertEquals ( subject . getResources ( ) , childContext . getResources ( ) )
testCombineOrOverride_secondIsNonAdditive_secondIsReturned ( ) { org . subtlelib . poi . api . style . Style result = org . subtlelib . poi . impl . style . StylesInternal . combineOrOverride ( additive , nonAdditive ) ; "<AssertPlaceHolder>" ; } combineOrOverride ( org . subtlelib . poi . api . style . Style , org . subtlelib . poi . api . style . Style ) { checkNotNull ( style1 , "first<sp>style<sp>to<sp>combine<sp>cannot<sp>be<sp>null" ) ; checkNotNull ( style2 , "second<sp>style<sp>to<sp>combine<sp>cannot<sp>be<sp>null" ) ; if ( ( ! ( style1 instanceof org . subtlelib . poi . api . style . AdditiveStyle ) ) || ( ! ( style2 instanceof org . subtlelib . poi . api . style . AdditiveStyle ) ) ) { return style2 ; } return org . subtlelib . poi . api . style . Styles . combine ( com . google . common . collect . ImmutableList . of ( ( ( org . subtlelib . poi . api . style . AdditiveStyle ) ( style1 ) ) , ( ( org . subtlelib . poi . api . style . AdditiveStyle ) ( style2 ) ) ) ) ; }
org . junit . Assert . assertEquals ( nonAdditive , result )
testAmpersandWithoutWrap ( ) { final java . lang . String corrected = org . esa . s3tbx . dataio . modis . ModisDaacUtils . correctAmpersandWrap ( ( "<sp>dkjhaf<sp>&<sp>da\n" + "<sp>lsmf\n" ) ) ; "<AssertPlaceHolder>" ; } correctAmpersandWrap ( java . lang . String ) { final java . io . StringReader reader = new java . io . StringReader ( input ) ; final java . io . StringWriter result = new java . io . StringWriter ( ) ; boolean ampersandMode = false ; boolean maybeAmpersandMode = false ; try { for ( int current = reader . read ( ) ; current > ( - 1 ) ; current = reader . read ( ) ) { if ( maybeAmpersandMode ) { if ( ( current == '\n' ) || ( current == '\r' ) ) { ampersandMode = true ; maybeAmpersandMode = false ; } else { result . write ( '&' ) ; maybeAmpersandMode = false ; } } if ( ampersandMode ) { if ( ( ( current == '\n' ) || ( current == '\r' ) ) || ( current == '<sp>' ) ) { } else { result . write ( current ) ; ampersandMode = false ; } } else { if ( current == '&' ) { maybeAmpersandMode = true ; } else { result . write ( current ) ; } } } } catch ( java . io . IOException e ) { } return result . toString ( ) ; }
org . junit . Assert . assertEquals ( ( "<sp>dkjhaf<sp>&<sp>da\n" + "<sp>lsmf\n" ) , corrected )
addHeader ( ) { org . apache . shindig . gadgets . http . HttpResponseBuilder builder = new org . apache . shindig . gadgets . http . HttpResponseBuilder ( ) . addHeader ( "Foo-bar" , "baz" ) ; "<AssertPlaceHolder>" ; } getHeaders ( ) { return headers ; }
org . junit . Assert . assertEquals ( "baz" , builder . getHeaders ( ) . get ( "Foo-bar" ) . iterator ( ) . next ( ) )
testEvaluateNullDasharray ( ) { org . geotools . filter . function . FilterFunction_listMultiply func = ( ( org . geotools . filter . function . FilterFunction_listMultiply ) ( ff . function ( "listMultiply" , ff . literal ( 2.5 ) , null ) ) ) ; java . lang . Object evaluate = func . evaluate ( null ) ; "<AssertPlaceHolder>" ; } evaluate ( java . lang . Object ) { return evaluate ( object , org . locationtech . jts . geom . Point . class ) ; }
org . junit . Assert . assertNull ( evaluate )
testTransportManagerInitFail ( org . apache . servicecomb . core . Transport ) { new mockit . Expectations ( ) { { transport . getName ( ) ; result = "test" ; transport . init ( ) ; result = false ; transport . canInit ( ) ; result = true ; } } ; java . util . List < org . apache . servicecomb . core . Transport > transports = java . util . Arrays . asList ( transport ) ; org . apache . servicecomb . core . transport . TransportManager manager = new org . apache . servicecomb . core . transport . TransportManager ( ) ; manager . setTransports ( transports ) ; manager . init ( ) ; "<AssertPlaceHolder>" ; } findTransport ( java . lang . String ) { return restTransport ; }
org . junit . Assert . assertEquals ( manager . findTransport ( "test" ) , transport )
testGetInstance_with_multiple_paths_failed ( ) { com . dp . nebula . wormhole . engine . utils . JarLoader jl = com . dp . nebula . wormhole . engine . utils . JarLoader . getInstance ( new java . lang . String [ ] { getPath ( new java . lang . String [ ] { "jar" , "path01" } ) , "httq://aaaa" } ) ; "<AssertPlaceHolder>" ; } getInstance ( com . dp . nebula . wormhole . engine . storage . StorageManager , com . dp . nebula . wormhole . engine . monitor . MonitorManager , int ) { if ( ( com . dp . nebula . wormhole . engine . core . WriterManager . wmInstance ) == null ) { com . dp . nebula . wormhole . engine . core . WriterManager . wmInstance = new com . dp . nebula . wormhole . engine . core . WriterManager ( storageManager , monitorManager , writerNum ) ; } return com . dp . nebula . wormhole . engine . core . WriterManager . wmInstance ; }
org . junit . Assert . assertNull ( jl )
testLookupMapping ( ) { io . atlasmap . v2 . AtlasMapping atlasMapping = generateReferenceAtlasMapping ( ) ; atlasMapping . getLookupTables ( ) . getLookupTable ( ) . add ( generateLookupTable ( ) ) ; mapper . writerWithDefaultPrettyPrinter ( ) . writeValue ( new java . io . File ( ( ( ( ( ( ( "target" + ( java . io . File . separator ) ) + "junit" ) + ( java . io . File . separator ) ) + ( testName . getMethodName ( ) ) ) + ( java . io . File . separator ) ) + "atlasmapping.json" ) ) , atlasMapping ) ; io . atlasmap . v2 . AtlasMapping uMapping = mapper . readValue ( new java . io . File ( ( ( ( ( ( ( "target" + ( java . io . File . separator ) ) + "junit" ) + ( java . io . File . separator ) ) + ( testName . getMethodName ( ) ) ) + ( java . io . File . separator ) ) + "atlasmapping.json" ) ) , io . atlasmap . v2 . AtlasMapping . class ) ; "<AssertPlaceHolder>" ; validateReferenceAtlasMapping ( uMapping ) ; } getMethodName ( ) { return methodName ; }
org . junit . Assert . assertNotNull ( uMapping )
fetchVersionFromPrimordial ( ) { final long vh = 10 ; final byte [ ] source = new byte [ ] { 10 , 11 , 12 } ; final byte [ ] target = new byte [ ] { } ; "<AssertPlaceHolder>" ; } fetchVersion ( byte [ ] , int , long , byte [ ] ) { int offset = 0 ; int length = com . persistit . MVV . VERSION_NOT_FOUND ; if ( ( version == 0 ) && ( ( sourceLength == 0 ) || ( ( source [ 0 ] ) != ( com . persistit . MVV . TYPE_MVV_BYTE ) ) ) ) { length = sourceLength ; } else if ( ( sourceLength > 0 ) && ( ( source [ 0 ] ) == ( com . persistit . MVV . TYPE_MVV_BYTE ) ) ) { offset = 1 ; while ( offset < sourceLength ) { final long curVersion = com . persistit . util . Util . getLong ( source , offset ) ; final int curLength = com . persistit . util . Util . getShort ( source , ( offset + ( com . persistit . MVV . LENGTH_VERSION ) ) ) ; offset += com . persistit . MVV . LENGTH_PER_VERSION ; if ( curVersion == version ) { length = curLength ; break ; } offset += curLength ; } } if ( length > 0 ) { com . persistit . MVV . assertCapacity ( target . length , length ) ; java . lang . System . arraycopy ( source , offset , target , 0 , length ) ; } return length ; }
org . junit . Assert . assertEquals ( MVV . VERSION_NOT_FOUND , com . persistit . MVV . fetchVersion ( source , source . length , vh , target ) )
name_emptyElement ( ) { final org . xmldb . api . base . ResourceSet result = org . exist . xquery . XQueryFunctionsTest . existEmbeddedServer . executeQuery ( "<a>b</a>/fn:name(c)" ) ; final java . lang . String r = ( ( java . lang . String ) ( result . getResource ( 0 ) . getContent ( ) ) ) ; "<AssertPlaceHolder>" ; } getContent ( ) { if ( ( content ) != null ) { return new org . exist . xquery . value . StringValue ( content ) . getStringValue ( true ) ; } final java . lang . Object res = super . getContent ( ) ; if ( res != null ) { if ( res instanceof byte [ ] ) { return new java . lang . String ( ( ( byte [ ] ) ( res ) ) , UTF_8 ) ; } else { return res ; } } return null ; }
org . junit . Assert . assertEquals ( "" , r )
testWithoutMkdir ( ) { final org . apache . oozie . fluentjob . api . action . FSActionBuilder builder = getBuilderInstance ( ) ; for ( final org . apache . oozie . fluentjob . api . action . Mkdir mkdir : org . apache . oozie . fluentjob . api . action . TestFSActionBuilder . MKDIRS ) { builder . withMkdir ( mkdir ) ; } builder . withoutMkdir ( org . apache . oozie . fluentjob . api . action . TestFSActionBuilder . MKDIRS [ 0 ] ) ; final org . apache . oozie . fluentjob . api . action . FSAction fsAction = builder . build ( ) ; final java . util . List < org . apache . oozie . fluentjob . api . action . Mkdir > expectedMkdirs = java . util . Arrays . asList ( org . apache . oozie . fluentjob . api . action . TestFSActionBuilder . MKDIRS ) . subList ( 1 , org . apache . oozie . fluentjob . api . action . TestFSActionBuilder . MKDIRS . length ) ; "<AssertPlaceHolder>" ; } getMkdirs ( ) { return attributes . getMkdirs ( ) ; }
org . junit . Assert . assertEquals ( expectedMkdirs , fsAction . getMkdirs ( ) )
canSerializeEnums ( ) { for ( com . linkedin . haivvreo . TestAvroSerializer . enum1 e : com . linkedin . haivvreo . TestAvroSerializer . enum1 . values ( ) ) { java . lang . String field = "{<sp>\"name\":\"enum1\",<sp>\"type\":{\"type\":\"enum\",<sp>\"name\":\"enum1_values\",<sp>\"symbols\":[\"BLUE\",\"RED\",<sp>\"GREEN\"]}<sp>}" ; org . apache . avro . generic . GenericRecord r = serializeAndDeserialize ( field , "enum1" , e ) ; "<AssertPlaceHolder>" ; } } toString ( ) { return ( ( ( "Avro<sp>could<sp>not<sp>validate<sp>record<sp>against<sp>schema<sp>(record<sp>=<sp>" + ( record ) ) + ")<sp>(schema<sp>=<sp>" ) + ( schema . toString ( false ) ) ) + ")" ; }
org . junit . Assert . assertEquals ( e , com . linkedin . haivvreo . TestAvroSerializer . enum1 . valueOf ( r . get ( "enum1" ) . toString ( ) ) )
testFailure ( ) { com . twitter . nodes . Node < java . lang . Boolean > node = com . twitter . nodes . IfSuccessfulNode . create ( new com . twitter . nodes . Node < java . lang . String > ( ) { @ com . twitter . nodes . Override protected com . twitter . util . Future < java . lang . String > evaluate ( ) throws com . twitter . nodes . Exception { throw new java . lang . Exception ( "bad!" ) ; } } ) ; "<AssertPlaceHolder>" ; } resultFromNode ( com . twitter . nodes . Node ) { return com . twitter . nodes . NodeTestBase . resultFromFuture ( node . apply ( ) ) ; }
org . junit . Assert . assertFalse ( resultFromNode ( node ) )
addition_isCorrect ( ) { "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 4 , ( 2 + 2 ) )
testDerivedColumnToSQL ( ) { org . sagebionetworks . table . query . model . DerivedColumn element = org . sagebionetworks . table . query . util . SqlElementUntils . createDerivedColumn ( "james" ) ; "<AssertPlaceHolder>" ; } toString ( ) { double percent = ( ( ( double ) ( currentIndex ) ) / ( ( double ) ( totalCount ) ) ) * 100.0 ; return java . lang . String . format ( "%1$-30s<sp>%2$10d/%3$-10d<sp>%4$8.2f<sp>%%" , message , currentIndex , totalCount , percent ) ; }
org . junit . Assert . assertEquals ( "james" , element . toString ( ) )
ExtractHL7PatientFromPRPAIN201302MessageWhenSubject1Null ( ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors extractor = new gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors ( ) ; org . hl7 . v3 . PRPAIN201302UV02 message = createPRPAIN201302UV02MessageWhereSubject1Null ( ) ; org . hl7 . v3 . PRPAMT201302UV02Patient patient = extractor . ExtractHL7PatientFromMessage ( message ) ; "<AssertPlaceHolder>" ; } ExtractHL7PatientFromMessage ( org . hl7 . v3 . PRPAIN201310UV02 ) { org . hl7 . v3 . PRPAMT201304UV02Patient patient ; gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "in<sp>ExtractPatient" ) ; org . hl7 . v3 . PRPAIN201310UV02MFMIMT700711UV01Subject1 subject = gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . ExtractSubjectFromMessage ( message ) ; if ( subject == null ) { return null ; } org . hl7 . v3 . PRPAIN201310UV02MFMIMT700711UV01RegistrationEvent registrationevent = subject . getRegistrationEvent ( ) ; if ( registrationevent == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "registrationevent<sp>is<sp>null<sp>-<sp>no<sp>patient" ) ; return null ; } org . hl7 . v3 . PRPAIN201310UV02MFMIMT700711UV01Subject2 subject1 = registrationevent . getSubject1 ( ) ; if ( subject1 == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "subject1<sp>is<sp>null<sp>-<sp>no<sp>patient" ) ; return null ; } patient = subject1 . getPatient ( ) ; if ( patient == null ) { gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "patient<sp>is<sp>null<sp>-<sp>no<sp>patient" ) ; return null ; } gov . hhs . fha . nhinc . transform . subdisc . HL7Extractors . LOG . info ( "done<sp>with<sp>ExtractPatient" ) ; return patient ; }
org . junit . Assert . assertNull ( patient )
testDeployedQueue ( ) { final javax . jms . Queue queue = ( ( javax . jms . Queue ) ( initialContext . lookup ( "java:/queue1" ) ) ) ; "<AssertPlaceHolder>" ; } lookup ( java . lang . String ) { final org . jboss . as . naming . deployment . ContextNames . BindInfo bindInfo = org . jboss . as . naming . deployment . ContextNames . bindInfoFor ( name ) ; org . jboss . msc . service . ServiceController < ? > bindingService = container . getService ( bindInfo . getBinderServiceName ( ) ) ; if ( bindingService == null ) { return null ; } org . jboss . as . naming . ManagedReferenceFactory managedReferenceFactory = org . jboss . as . naming . ManagedReferenceFactory . class . cast ( bindingService . getValue ( ) ) ; return managedReferenceFactory . getReference ( ) . getInstance ( ) ; }
org . junit . Assert . assertNotNull ( queue )
CalcularIcmsComQuantidadeDois ( ) { tributos . setValorProduto ( java . math . BigDecimal . valueOf ( 2000 ) ) ; tributos . setQuantidadeProduto ( java . math . BigDecimal . valueOf ( 2 ) ) ; tributos . setPercentualIcms ( java . math . BigDecimal . valueOf ( 17 ) ) ; com . chronos . calc . resultados . IResultadoCalculoIcms result = calcular . calcularIcms ( ) ; java . math . BigDecimal valor = result . getValor ( ) ; java . math . BigDecimal valorTest = java . math . BigDecimal . valueOf ( 680 ) . setScale ( 2 ) ; "<AssertPlaceHolder>" ; } getValor ( ) { return valor ; }
org . junit . Assert . assertEquals ( valorTest , valor )
testNegativeX ( ) { org . apache . commons . math4 . linear . ArrayRealVector c = new org . apache . commons . math4 . linear . ArrayRealVector ( new double [ ] { - 1.232323232323 , 1.43 , 1.63 } ) ; java . lang . String expected = ( ( ( ( ( "{-1" + ( getDecimalCharacter ( ) ) ) + "2323232323;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "43;<sp>1" ) + ( getDecimalCharacter ( ) ) ) + "63}" ; java . lang . String actual = realVectorFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( org . apache . commons . math4 . geometry . Vector ) { return format ( vector , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testCreate ( ) { org . hivedb . meta . persistence . SecondaryIndexDao d = new org . hivedb . meta . persistence . SecondaryIndexDao ( getDataSource ( getConnectString ( getHiveDatabaseName ( ) ) ) ) ; int initialSize = d . loadAll ( ) . size ( ) ; d . create ( createSecondaryIndex ( ) ) ; "<AssertPlaceHolder>" ; } loadAll ( ) { org . springframework . jdbc . core . JdbcTemplate t = getJdbcTemplate ( ) ; java . util . ArrayList < org . hivedb . meta . SecondaryIndex > results = new java . util . ArrayList < org . hivedb . meta . SecondaryIndex > ( ) ; for ( java . lang . Object si : t . query ( "SELECT<sp>*<sp>FROM<sp>secondary_index_metadata" , new org . hivedb . meta . persistence . SecondaryIndexDao . SecondaryIndexRowMapper ( ) ) ) { results . add ( ( ( org . hivedb . meta . SecondaryIndex ) ( si ) ) ) ; } return results ; }
org . junit . Assert . assertEquals ( ( initialSize + 1 ) , d . loadAll ( ) . size ( ) )
convertCreditCardApplicationFromYAWLToPNML ( ) { org . apromore . service . model . CanonisedProcess oFCanonised = canoniseYAWLModel ( "YAWL_models/CreditApplicationProcess.yawl" , null ) ; org . apromore . service . model . DecanonisedProcess decanonisedPNML = cSrv . deCanonise ( "PNML<sp>1.3.2" , oFCanonised . getCpt ( ) , null , new java . util . HashSet < org . apromore . plugin . property . RequestParameterType < ? > > ( ) ) ; "<AssertPlaceHolder>" ; if ( org . apromore . service . impl . CanoniserServiceImplIntgTest . LOGGER . isDebugEnabled ( ) ) { saveDecanonisedProcess ( decanonisedPNML , "CreditCardApplication.pnml" ) ; } } getCpt ( ) { return cpt ; }
org . junit . Assert . assertNotNull ( decanonisedPNML )
testCacheTokenWithSameKey ( ) { org . scribe . model . Token newToken = new org . scribe . model . Token ( "access" , "someOtherSecret" ) ; oAuthTokenCacheService . cacheToken ( newToken ) ; "<AssertPlaceHolder>" ; } retrieveToken ( java . lang . String ) { if ( oauthToken == null ) { return null ; } return tokenCache . getIfPresent ( oauthToken ) ; }
org . junit . Assert . assertEquals ( newToken , oAuthTokenCacheService . retrieveToken ( "access" ) )
testJmsProducerIdFromJmsSessionId ( ) { org . apache . qpid . jms . meta . JmsProducerId id1 = new org . apache . qpid . jms . meta . JmsProducerId ( firstId , 1 ) ; org . apache . qpid . jms . meta . JmsProducerId id2 = new org . apache . qpid . jms . meta . JmsProducerId ( id1 ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertSame ( id1 . getValue ( ) , id2 . getValue ( ) )
createProperties_nullParams ( ) { java . util . Properties prop = opService . createProperties ( org . oscm . app . v2_0 . service . OperationServiceBeanTest . USER_ID , org . oscm . app . v2_0 . service . OperationServiceBeanTest . OP_ID , null ) ; "<AssertPlaceHolder>" ; verifyMandatoryProperties ( prop ) ; } size ( ) { return categoriesForMarketplace . size ( ) ; }
org . junit . Assert . assertEquals ( 2 , prop . size ( ) )
testTimeExpressionComplete ( ) { java . util . Date dt = new java . util . Date ( ) ; java . util . Date dueDate = testExpression ( new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss" ) . format ( dt ) ) ; "<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'T'HH:mm:ss" ) . format ( dt ) , new java . text . SimpleDateFormat ( "yyyy-MM-dd'T'HH:mm:ss" ) . format ( dueDate ) )
testSimplePropertyDocumentBuild ( ) { org . wikidata . wdtk . datamodel . interfaces . MonolingualTextValue mtv = org . wikidata . wdtk . datamodel . helpers . Datamodel . makeMonolingualTextValue ( "Test" , "de" ) ; org . wikidata . wdtk . datamodel . interfaces . PropertyDocument pd1 = org . wikidata . wdtk . datamodel . helpers . Datamodel . makePropertyDocument ( PropertyIdValue . NULL , java . util . Collections . singletonList ( mtv ) , java . util . Collections . emptyList ( ) , java . util . Collections . emptyList ( ) , java . util . Collections . emptyList ( ) , org . wikidata . wdtk . datamodel . helpers . Datamodel . makeDatatypeIdValue ( DatatypeIdValue . DT_ITEM ) ) ; org . wikidata . wdtk . datamodel . interfaces . PropertyDocument pd2 = org . wikidata . wdtk . datamodel . helpers . PropertyDocumentBuilder . forPropertyIdAndDatatype ( PropertyIdValue . NULL , DatatypeIdValue . DT_ITEM ) . withLabel ( mtv ) . build ( ) ; "<AssertPlaceHolder>" ; } build ( ) { prepareBuild ( ) ; return factory . getPropertyDocument ( ( ( org . wikidata . wdtk . datamodel . interfaces . PropertyIdValue ) ( this . entityIdValue ) ) , this . labels , this . descriptions , this . aliases , getStatementGroups ( ) , this . datatype , this . revisionId ) ; }
org . junit . Assert . assertEquals ( pd1 , pd2 )
should_return_false_on_validateArchetypeCatalog_for_invalid_xml_file ( ) { boolean valid = de . dm . intellij . maven . model . ArchetypeCatalogFactoryUtil . validateArchetypeCatalog ( de . dm . intellij . maven . model . AnArchetypeCatalogFactoryUtil . ARBITRARY_XML ) ; "<AssertPlaceHolder>" ; } validateArchetypeCatalog ( java . net . URL ) { if ( url != null ) { java . io . InputStream inputStream = de . dm . intellij . maven . model . ArchetypeCatalogFactoryUtil . getInputStream ( url ) ; if ( inputStream != null ) { return de . dm . intellij . maven . model . ArchetypeCatalogFactoryUtil . validateArchetypeCatalog ( inputStream ) ; } } return false ; }
org . junit . Assert . assertThat ( valid , org . hamcrest . CoreMatchers . equalTo ( false ) )
shouldScheduleToNow ( ) { testRule . deploy ( PROCESS ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( END_DATE ) ; for ( int i = 0 ; i < 5 ; i ++ ) { runtimeService . startProcessInstanceByKey ( PROCESS_KEY ) ; java . lang . String taskId = taskService . createTaskQuery ( ) . singleResult ( ) . getId ( ) ; taskService . complete ( taskId ) ; } engineConfiguration . setHistoryCleanupBatchSize ( 5 ) ; engineConfiguration . initHistoryCleanup ( ) ; java . util . Date removalTime = org . apache . commons . lang3 . time . DateUtils . addDays ( END_DATE , 5 ) ; org . camunda . bpm . engine . impl . util . ClockUtil . setCurrentTime ( removalTime ) ; runHistoryCleanup ( ) ; org . camunda . bpm . engine . runtime . Job job = historyService . findHistoryCleanupJobs ( ) . get ( 0 ) ; "<AssertPlaceHolder>" ; } getDuedate ( ) { return duedate ; }
org . junit . Assert . assertThat ( job . getDuedate ( ) , org . hamcrest . core . Is . is ( removalTime ) )
shouldTransformAPIFromSwaggerV3_yaml ( ) { io . gravitee . management . model . PageEntity pageEntity = getPage ( "io/gravitee/management/service/openapi.yaml" , MediaType . TEXT_PLAIN ) ; swaggerService . transform ( pageEntity ) ; "<AssertPlaceHolder>" ; validateV3 ( io . swagger . v3 . core . util . Yaml . mapper ( ) . readTree ( pageEntity . getContent ( ) ) ) ; } getContent ( ) { return content ; }
org . junit . Assert . assertNotNull ( pageEntity . getContent ( ) )
testIncreasedMoreMembersGroup ( ) { java . util . Set < java . lang . String > members1 = new java . util . HashSet < java . lang . String > ( ) ; java . util . Set < java . lang . String > members2 = new java . util . HashSet < java . lang . String > ( ) ; java . lang . String situation = "@work" ; members2 . add ( "user1" ) ; members2 . add ( "user2" ) ; members1 . add ( "user1" ) ; members1 . add ( "user2" ) ; members1 . add ( "user3" ) ; members1 . add ( "user4" ) ; members1 . add ( "user5" ) ; members1 . add ( "user6" ) ; members1 . add ( "user7" ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup oldGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members2 , situation ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup newGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members1 , situation ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( o instanceof eu . dime . ps . controllers . placeprocessor . PlaceKey ) { eu . dime . ps . controllers . placeprocessor . PlaceKey p = ( ( eu . dime . ps . controllers . placeprocessor . PlaceKey ) ( o ) ) ; return ( p . guid . equalsIgnoreCase ( this . guid ) ) && ( ( p . tenant . doubleValue ( ) ) == ( this . tenant . doubleValue ( ) ) ) ; } else return false ; }
org . junit . Assert . assertTrue ( ( ! ( newGroup . equals ( oldGroup ) ) ) )
testReducedMoreMembersGroup ( ) { java . util . Set < java . lang . String > members1 = new java . util . HashSet < java . lang . String > ( ) ; java . util . Set < java . lang . String > members2 = new java . util . HashSet < java . lang . String > ( ) ; java . lang . String situation = "@work" ; members1 . add ( "user1" ) ; members1 . add ( "user2" ) ; members1 . add ( "user3" ) ; members1 . add ( "user4" ) ; members1 . add ( "user5" ) ; members1 . add ( "user6" ) ; members1 . add ( "user7" ) ; members2 . add ( "user1" ) ; members2 . add ( "user2" ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup oldGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members1 , situation ) ; eu . dime . ps . controllers . context . raw . data . ContextGroup newGroup = new eu . dime . ps . controllers . context . raw . data . ContextGroup ( members2 , situation ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( o instanceof eu . dime . ps . controllers . placeprocessor . PlaceKey ) { eu . dime . ps . controllers . placeprocessor . PlaceKey p = ( ( eu . dime . ps . controllers . placeprocessor . PlaceKey ) ( o ) ) ; return ( p . guid . equalsIgnoreCase ( this . guid ) ) && ( ( p . tenant . doubleValue ( ) ) == ( this . tenant . doubleValue ( ) ) ) ; } else return false ; }
org . junit . Assert . assertTrue ( ( ! ( newGroup . equals ( oldGroup ) ) ) )
testNoOverrideJaxrs ( ) { final com . gargoylesoftware . htmlunit . html . HtmlPage page = webClient . getPage ( ( ( webUrl ) + "resources/annotations/no_override_jaxrs" ) ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNull ( page )
testBasicOperation ( ) { org . kie . api . KieBase kbase = loadKnowledgeBase ( kconf , "simpleSequential.drl" ) ; org . kie . api . runtime . StatelessKieSession ksession = createStatelessKnowledgeSession ( kbase ) ; final java . util . List list = new java . util . ArrayList ( ) ; ksession . setGlobal ( "list" , list ) ; final org . drools . compiler . Person p1 = new org . drools . compiler . Person ( "p1" , "stilton" ) ; final org . drools . compiler . Person p2 = new org . drools . compiler . Person ( "p2" , "cheddar" ) ; final org . drools . compiler . Person p3 = new org . drools . compiler . Person ( "p3" , "stilton" ) ; final org . drools . compiler . Cheese stilton = new org . drools . compiler . Cheese ( "stilton" , 15 ) ; final org . drools . compiler . Cheese cheddar = new org . drools . compiler . Cheese ( "cheddar" , 15 ) ; ksession . execute ( org . kie . internal . command . CommandFactory . newInsertElements ( java . util . Arrays . asList ( new java . lang . Object [ ] { p1 , stilton , p2 , cheddar , p3 } ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return rulesFired . size ( ) ; }
org . junit . Assert . assertEquals ( 3 , list . size ( ) )
testLargerCase1D ( ) { java . util . List < java . lang . String > results = new java . util . ArrayList ( ) ; final com . hubspot . baragon . models . BaragonAgentMetadata agentMetadata = generateBaragonAgentMetadata ( "us-east-1d" ) ; final com . hubspot . baragon . agent . handlebars . PreferSameRackWeightingHelper helper = new com . hubspot . baragon . agent . handlebars . PreferSameRackWeightingHelper ( com . hubspot . baragon . agent . PreferSameRackWeightingBalancedTest . CONFIGURATION , agentMetadata ) ; for ( java . lang . String availabilityZone : com . hubspot . baragon . agent . PreferSameRackWeightingBalancedTest . LARGER_AVAILABILITY_ZONES ) { final com . hubspot . baragon . models . UpstreamInfo currentUpstream = new com . hubspot . baragon . models . UpstreamInfo ( "testhost:8080" , com . google . common . base . Optional . of ( "test-126" ) , com . google . common . base . Optional . of ( availabilityZone ) ) ; java . lang . CharSequence result = helper . preferSameRackWeighting ( com . hubspot . baragon . agent . PreferSameRackWeightingBalancedTest . MANY_UPSTREAMS , currentUpstream , null ) ; results . add ( result . toString ( ) ) ; } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( ( ( ( ( ( "IndexView<sp>[appRoot=" + ( appRoot ) ) + ",<sp>staticRoot=" ) + ( staticRoot ) ) + ",<sp>apiRoot=" ) + ( apiRoot ) ) + ",<sp>title=" ) + ( title ) ) + ",<sp>authEnabled=" ) + ( authEnabled ) ) + ",<sp>elbEnabled" ) + ( elbEnabled ) ) + "]" ; }
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "" ) , results )
storeDocument_invalidTriggerForPrepare ( ) { final org . xmldb . api . modules . BinaryResource invalidModule = ( ( org . xmldb . api . modules . BinaryResource ) ( org . exist . collections . triggers . XQueryTriggerTest . testCollection . createResource ( org . exist . collections . triggers . XQueryTriggerTest . MODULE_NAME , "BinaryResource" ) ) ) ; ( ( org . exist . xmldb . EXistResource ) ( invalidModule ) ) . setMimeType ( "application/xquery" ) ; invalidModule . setContent ( org . exist . collections . triggers . XQueryTriggerTest . INVALID_MODULE . getBytes ( ) ) ; org . exist . collections . triggers . XQueryTriggerTest . testCollection . storeResource ( invalidModule ) ; final org . exist . xmldb . IndexQueryService idxConf = ( ( org . exist . xmldb . IndexQueryService ) ( org . exist . collections . triggers . XQueryTriggerTest . testCollection . getService ( "IndexQueryService" , "1.0" ) ) ) ; idxConf . configureCollection ( org . exist . collections . triggers . XQueryTriggerTest . COLLECTION_CONFIG ) ; final int max_store_attempts = 10 ; int count_prepare_exceptions = 0 ; for ( int i = 0 ; i < max_store_attempts ; i ++ ) { try { final org . xmldb . api . modules . XMLResource doc = ( ( org . xmldb . api . modules . XMLResource ) ( org . exist . collections . triggers . XQueryTriggerTest . testCollection . createResource ( org . exist . collections . triggers . XQueryTriggerTest . DOCUMENT_NAME , "XMLResource" ) ) ) ; doc . setContent ( org . exist . collections . triggers . XQueryTriggerTest . DOCUMENT_CONTENT ) ; org . exist . collections . triggers . XQueryTriggerTest . testCollection . storeResource ( doc ) ; } catch ( org . xmldb . api . base . XMLDBException xdbe ) { if ( ( xdbe . getCause ( ) ) instanceof org . exist . collections . triggers . TriggerException ) { if ( xdbe . getCause ( ) . getMessage ( ) . equals ( XQueryTrigger . PREPARE_EXCEPTION_MESSAGE ) ) { count_prepare_exceptions ++ ; } } } } "<AssertPlaceHolder>" ; } equals ( org . exist . numbering . NodeId ) { return ( i ) == ( ( ( org . exist . util . sorters . SortTestNodeId ) ( arg0 ) ) . i ) ; }
org . junit . Assert . assertEquals ( max_store_attempts , count_prepare_exceptions )
testFileShouldNotDiscardedIfNNRestarted ( ) { getClusterBuilder ( ) . setRamDiskReplicaCapacity ( 2 ) . build ( ) ; final java . lang . String METHOD_NAME = org . apache . hadoop . test . GenericTestUtils . getMethodName ( ) ; org . apache . hadoop . fs . Path path1 = new org . apache . hadoop . fs . Path ( ( ( "/" + METHOD_NAME ) + ".01.dat" ) ) ; makeTestFile ( path1 , org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . BLOCK_SIZE , true ) ; ensureFileReplicasOnStorageType ( path1 , org . apache . hadoop . hdfs . server . datanode . fsdataset . impl . RAM_DISK ) ; cluster . shutdownDataNodes ( ) ; cluster . restartNameNodes ( ) ; java . lang . Long corruptBlkCount ; do { java . lang . Thread . sleep ( ( ( DFS_NAMENODE_REDUNDANCY_INTERVAL_SECONDS_DEFAULT ) * 1000 ) ) ; corruptBlkCount = ( ( long ) ( com . google . common . collect . Iterators . size ( cluster . getNameNode ( ) . getNamesystem ( ) . getBlockManager ( ) . getCorruptReplicaBlockIterator ( ) ) ) ) ; } while ( corruptBlkCount != 1L ) ; "<AssertPlaceHolder>" ; } exists ( org . apache . hadoop . fs . Path ) { return fs . exists ( p ) ; }
org . junit . Assert . assertTrue ( fs . exists ( path1 ) )
testAxpyArrayArray ( ) { org . apache . ignite . ml . math . primitives . vector . Vector y = new org . apache . ignite . ml . math . primitives . vector . impl . DenseVector ( new double [ ] { 1.0 , 2.0 } ) ; double a = 2.0 ; org . apache . ignite . ml . math . primitives . vector . Vector x = new org . apache . ignite . ml . math . primitives . vector . impl . DenseVector ( new double [ ] { 1.0 , 2.0 } ) ; org . apache . ignite . ml . math . primitives . vector . Vector exp = x . times ( a ) . plus ( y ) ; org . apache . ignite . ml . math . Blas . axpy ( a , x , y ) ; "<AssertPlaceHolder>" ; } axpy ( java . lang . Double , org . apache . ignite . ml . math . primitives . vector . Vector , org . apache . ignite . ml . math . primitives . vector . Vector ) { if ( ( x . size ( ) ) != ( y . size ( ) ) ) throw new org . apache . ignite . ml . math . exceptions . CardinalityException ( x . size ( ) , y . size ( ) ) ; if ( ( x . isArrayBased ( ) ) && ( y . isArrayBased ( ) ) ) org . apache . ignite . ml . math . Blas . axpy ( a , x . getStorage ( ) . data ( ) , y . getStorage ( ) . data ( ) ) ; else if ( ( x instanceof org . apache . ignite . ml . math . primitives . vector . impl . SparseVector ) && ( y . isArrayBased ( ) ) ) org . apache . ignite . ml . math . Blas . axpy ( a , ( ( org . apache . ignite . ml . math . primitives . vector . impl . SparseVector ) ( x ) ) , y . getStorage ( ) . data ( ) ) ; else throw new org . apache . ignite . ml . math . exceptions . MathIllegalArgumentException ( ( ( ( ( "Operation<sp>'axpy'<sp>doesn't<sp>support<sp>this<sp>combination<sp>of<sp>parameters<sp>[x=" + ( x . getClass ( ) . getName ( ) ) ) + ",<sp>y=" ) + ( y . getClass ( ) . getName ( ) ) ) + "]." ) ) ; }
org . junit . Assert . assertEquals ( y , exp )
attr ( ) { org . jsoup . nodes . Document doc = org . jsoup . Jsoup . parse ( "<p<sp>title=foo><p<sp>title=bar><p<sp>class=foo><p<sp>class=bar>" ) ; java . lang . String classVal = doc . select ( "p" ) . attr ( "class" ) ; "<AssertPlaceHolder>" ; } attr ( java . lang . String ) { ensureAttributes ( ) ; return super . attr ( attributeKey ) ; }
org . junit . Assert . assertEquals ( "foo" , classVal )
testCreateMaxDimensionNoOriontationNoEnlarge ( ) { com . mortennobel . imagescaling . DimensionConstrain . DimensionConstrain constains = createMaxDimensionNoOrientation ( 400 , 200 , true ) ; com . mortennobel . imagescaling . Dimension res = constains . getDimension ( new com . mortennobel . imagescaling . Dimension ( 100 , 10 ) ) ; "<AssertPlaceHolder>" ; } createMaxDimensionNoOrientation ( int , int , boolean ) { assert ( length1 > 0 ) && ( length2 > 0 ) : "Dimension<sp>must<sp>be<sp>larger<sp>that<sp>0" ; final double scaleFactor = length1 / ( ( double ) ( length2 ) ) ; return new com . mortennobel . imagescaling . DimensionConstrain ( ) { public com . mortennobel . imagescaling . Dimension getDimension ( com . mortennobel . imagescaling . Dimension dimension ) { double srcScaleFactor = ( dimension . width ) / ( ( double ) ( dimension . height ) ) ; int width ; int height ; if ( srcScaleFactor > scaleFactor ) { width = length1 ; height = length2 ; } else { width = length2 ; height = length1 ; } final double scaleFactor = width / ( ( double ) ( height ) ) ; double scale ; if ( srcScaleFactor > scaleFactor ) { scale = width / ( ( double ) ( dimension . width ) ) ; } else { scale = height / ( ( double ) ( dimension . height ) ) ; } if ( neverEnlargeImage ) { scale = java . lang . Math . min ( scale , 1 ) ; } int dstWidth = ( ( int ) ( java . lang . Math . round ( ( ( dimension . width ) * scale ) ) ) ) ; int dstHeight = ( ( int ) ( java . lang . Math . round ( ( ( dimension . height ) * scale ) ) ) ) ; return new com . mortennobel . imagescaling . Dimension ( dstWidth , dstHeight ) ; } } ; }
org . junit . Assert . assertEquals ( new com . mortennobel . imagescaling . Dimension ( 100 , 10 ) , res )
getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_SUNLDAPTest_URAttrMappingVar4 . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; "<AssertPlaceHolder>" ; } getRealm ( ) { com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_SUNLDAPTest_URAttrMappingVar4 . c , "getRealm" , "Checking<sp>expected<sp>realm" ) ; org . junit . Assert . assertEquals ( "SampleLdapSUNRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_SUNLDAPTest_URAttrMappingVar4 . servlet . getRealm ( ) ) ; }
org . junit . Assert . assertEquals ( "SampleLdapSUNRealm" , com . ibm . ws . security . wim . adapter . ldap . fat . URAPIs_SUNLDAPTest_URAttrMappingVar4 . servlet . getRealm ( ) )
testCoerceIntegerToNumber ( ) { java . lang . Integer input = java . lang . Integer . valueOf ( 4390241 ) ; java . lang . Object output = org . apache . el . lang . ELSupport . coerceToType ( null , input , org . apache . el . lang . Number . class ) ; "<AssertPlaceHolder>" ; } coerceToType ( javax . el . ELContext , java . lang . Object , java . lang . Class ) { if ( ctx != null ) { boolean originalIsPropertyResolved = ctx . isPropertyResolved ( ) ; try { java . lang . Object result = ctx . getELResolver ( ) . convertToType ( ctx , obj , type ) ; if ( ctx . isPropertyResolved ( ) ) { return result ; } } finally { ctx . setPropertyResolved ( originalIsPropertyResolved ) ; } } if ( ( ( type == null ) || ( java . lang . Object . class . equals ( type ) ) ) || ( ( obj != null ) && ( type . isAssignableFrom ( obj . getClass ( ) ) ) ) ) { return obj ; } if ( ! ( org . apache . el . lang . ELSupport . COERCE_TO_ZERO ) ) { if ( ( ( obj == null ) && ( ! ( type . isPrimitive ( ) ) ) ) && ( ! ( java . lang . String . class . isAssignableFrom ( type ) ) ) ) { return null ; } } if ( java . lang . String . class . equals ( type ) ) { return org . apache . el . lang . ELSupport . coerceToString ( ctx , obj ) ; } if ( org . apache . el . lang . ELArithmetic . isNumberType ( type ) ) { return org . apache . el . lang . ELSupport . coerceToNumber ( ctx , obj , type ) ; } if ( ( org . apache . el . lang . Character . class . equals ( type ) ) || ( ( Character . TYPE ) == type ) ) { return org . apache . el . lang . ELSupport . coerceToCharacter ( ctx , obj ) ; } if ( ( org . apache . el . lang . Boolean . class . equals ( type ) ) || ( ( Boolean . TYPE ) == type ) ) { return org . apache . el . lang . ELSupport . coerceToBoolean ( ctx , obj , ( ( Boolean . TYPE ) == type ) ) ; } if ( type . isEnum ( ) ) { return org . apache . el . lang . ELSupport . coerceToEnum ( ctx , obj , type ) ; } if ( obj == null ) return null ; if ( obj instanceof java . lang . String ) { java . beans . PropertyEditor editor = java . beans . PropertyEditorManager . findEditor ( type ) ; if ( editor == null ) { if ( "" . equals ( obj ) ) { return null ; } throw new javax . el . ELException ( org . apache . el . util . MessageFactory . get ( "error.convert" , obj , obj . getClass ( ) , type ) ) ; } else { try { editor . setAsText ( ( ( java . lang . String ) ( obj ) ) ) ; return editor . getValue ( ) ; } catch ( java . lang . RuntimeException e ) { if ( "" . equals ( obj ) ) { return null ; } throw new javax . el . ELException ( org . apache . el . util . MessageFactory . get ( "error.convert" , obj , obj . getClass ( ) , type ) , e ) ; } } } if ( ( ( obj instanceof java . util . Set ) && ( type == ( java . util . Map . class ) ) ) && ( ( ( java . util . Set < ? > ) ( obj ) ) . isEmpty ( ) ) ) { return java . util . Collections . EMPTY_MAP ; } if ( ( type . isArray ( ) ) && ( obj . getClass ( ) . isArray ( ) ) ) { return org . apache . el . lang . ELSupport . coerceToArray ( ctx , obj , type ) ; } throw new javax . el . ELException ( org . apache . el . util . MessageFactory . get ( "error.convert" , obj , obj . getClass ( ) , type ) ) ; }
org . junit . Assert . assertEquals ( input , output )
testExports ( ) { org . junit . Assume . assumeFalse ( com . eclipsesource . v8 . NodeJSTest . skipMessage , com . eclipsesource . v8 . NodeJSTest . skipTest ( ) ) ; nodeJS . release ( ) ; java . io . File testScript = com . eclipsesource . v8 . NodeJSTest . createTemporaryScriptFile ( "exports.foo=7" , "testScript" ) ; nodeJS = com . eclipsesource . v8 . NodeJS . createNodeJS ( ) ; com . eclipsesource . v8 . V8Object exports = nodeJS . require ( testScript ) ; runMessageLoop ( ) ; "<AssertPlaceHolder>" ; exports . close ( ) ; } getInteger ( java . lang . String ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertEquals ( 7 , exports . getInteger ( "foo" ) )
testGetNextTuplePeopleFirstName ( ) { java . lang . String query = "g[^\\s]*" ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > exactResults = edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTestHelper . getQueryResults ( edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTest . PEOPLE_TABLE , query , java . util . Arrays . asList ( TestConstants . FIRST_NAME ) ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > expectedResults = new java . util . ArrayList < edu . uci . ics . texera . api . tuple . Tuple > ( ) ; java . util . List < edu . uci . ics . texera . api . tuple . Tuple > data = edu . uci . ics . texera . api . constants . test . TestConstants . getSamplePeopleTuples ( ) ; edu . uci . ics . texera . api . schema . Schema spanSchema = new edu . uci . ics . texera . api . schema . Schema . Builder ( ) . add ( TestConstants . SCHEMA_PEOPLE ) . add ( edu . uci . ics . texera . dataflow . regexmatcher . RegexMatcherTest . RESULTS , AttributeType . LIST ) . build ( ) ; java . util . List < edu . uci . ics . texera . api . span . Span > spans = new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( ) ; spans . add ( new edu . uci . ics . texera . api . span . Span ( edu . uci . ics . texera . api . constants . test . TestConstants . FIRST_NAME , 11 , 17 , query , "gelina" ) ) ; edu . uci . ics . texera . api . field . IField spanField = new edu . uci . ics . texera . api . field . ListField < edu . uci . ics . texera . api . span . Span > ( new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( spans ) ) ; java . util . List < edu . uci . ics . texera . api . field . IField > fields = new java . util . ArrayList < edu . uci . ics . texera . api . field . IField > ( data . get ( 2 ) . getFields ( ) ) ; fields . add ( spanField ) ; expectedResults . add ( new edu . uci . ics . texera . api . tuple . Tuple ( spanSchema , fields . toArray ( new edu . uci . ics . texera . api . field . IField [ fields . size ( ) ] ) ) ) ; spans . clear ( ) ; spans . add ( new edu . uci . ics . texera . api . span . Span ( edu . uci . ics . texera . api . constants . test . TestConstants . FIRST_NAME , 0 , 6 , query , "george" ) ) ; spanField = new edu . uci . ics . texera . api . field . ListField < edu . uci . ics . texera . api . span . Span > ( new java . util . ArrayList < edu . uci . ics . texera . api . span . Span > ( spans ) ) ; fields = new java . util . ArrayList < edu . uci . ics . texera . api . field . IField > ( data . get ( 3 ) . getFields ( ) ) ; fields . add ( spanField ) ; expectedResults . add ( new edu . uci . ics . texera . api . tuple . Tuple ( spanSchema , fields . toArray ( new edu . uci . ics . texera . api . field . IField [ fields . size ( ) ] ) ) ) ; "<AssertPlaceHolder>" ; } equals ( java . util . List , java . util . List ) { expectedResults = Tuple . Builder . removeIfExists ( expectedResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; exactResults = Tuple . Builder . removeIfExists ( exactResults , SchemaConstants . _ID , SchemaConstants . PAYLOAD ) ; if ( ( expectedResults . size ( ) ) != ( exactResults . size ( ) ) ) return false ; return ( expectedResults . containsAll ( exactResults ) ) && ( exactResults . containsAll ( expectedResults ) ) ; }
org . junit . Assert . assertTrue ( edu . uci . ics . texera . api . utils . TestUtils . equals ( expectedResults , exactResults ) )
checkGuiResources3D ( ) { for ( org . geogebra . desktop . geogebra3D . gui . GuiResources3D res : org . geogebra . desktop . geogebra3D . gui . GuiResources3D . values ( ) ) { java . lang . String fn = res . getFilename ( ) ; if ( ! ( fn . startsWith ( "/org" ) ) ) { fn = "/org/geogebra/desktop/geogebra3D" + fn ; } java . net . URL url = org . geogebra . resources . ResourceAvailability . class . getResource ( fn ) ; "<AssertPlaceHolder>" ; } } getFilename ( ) { return filename ; }
org . junit . Assert . assertNotNull ( ( "" + res ) , url )
id ( ) { colorTheme . setId ( "id" ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
org . junit . Assert . assertThat ( colorTheme . getId ( ) , org . hamcrest . CoreMatchers . is ( "id" ) )
itCanSetPropertyToNullNewModeKeepEmpty ( ) { org . nuxeo . ecm . core . api . DocumentModel note = org . nuxeo . ecm . restapi . test . RestServerInit . getNote ( 0 , session ) ; note . setPropertyValue ( "dc:format" , "a<sp>value<sp>that<sp>will<sp>be<sp>set<sp>to<sp>null" ) ; session . saveDocument ( note ) ; fetchInvalidations ( ) ; try ( org . nuxeo . jaxrs . test . CloseableClientResponse response = getResponse ( RequestType . PUT , ( "id/" + ( note . getId ( ) ) ) , "{\"entity-type\":\"document\",\"properties\":{\"dc:format\":\"\"}}" ) ) { fetchInvalidations ( ) ; note = org . nuxeo . ecm . restapi . test . RestServerInit . getNote ( 0 , session ) ; java . io . Serializable value = note . getPropertyValue ( "dc:format" ) ; if ( ! ( "" . equals ( value ) ) ) { "<AssertPlaceHolder>" ; } } } getPropertyValue ( java . lang . String ) { return getPropertyValue ( property , null ) ; }
org . junit . Assert . assertNull ( value )
testGetViolationsWithPolicy1 ( ) { eu . atos . sla . datamodel . IPolicy policy ; System . out . println ( "---testEvaluateWithPolicy1()---" ) ; java . util . List < eu . atos . sla . monitoring . IMonitoringMetric > metrics = setUpWithPolicies ( ) ; policy = newPolicy ( "LATENCY" , 2 , new java . util . Date ( 3000 ) ) ; term . setPolicies ( java . util . Arrays . asList ( new eu . atos . sla . datamodel . IPolicy [ ] { policy } ) ) ; java . util . List < eu . atos . sla . datamodel . IViolation > violations = evaluator . evaluate ( contract , term , metrics , now ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( list1 . size ( ) ) + ( list2 . size ( ) ) ; }
org . junit . Assert . assertEquals ( 0 , violations . size ( ) )
generateCustomEnvironmentName2 ( ) { java . lang . String projectName = "project" ; java . lang . String newName = "ENV2-project" ; when ( environment1 . getName ( ) ) . thenReturn ( ( "ENV1-" + projectName ) ) ; when ( environment2 . getName ( ) ) . thenReturn ( ( "ENV3-" + projectName ) ) ; java . util . List < org . eclipse . che . ide . ext . runner . client . models . Environment > environments = java . util . Arrays . asList ( environment1 , environment2 ) ; java . lang . String generated = org . eclipse . che . ide . ext . runner . client . util . NameGenerator . generateCustomEnvironmentName ( environments , projectName ) ; "<AssertPlaceHolder>" ; } generateCustomEnvironmentName ( java . util . List , java . lang . String ) { int counter = 1 ; java . lang . String name = ( ( ( org . eclipse . che . ide . ext . runner . client . util . NameGenerator . CUSTOM_ENV_PREFIX ) + counter ) + '-' ) + projectName ; for ( int i = 0 ; i < ( environments . size ( ) ) ; i ++ ) { if ( environments . get ( i ) . getName ( ) . equals ( name ) ) { counter ++ ; name = ( ( ( org . eclipse . che . ide . ext . runner . client . util . NameGenerator . CUSTOM_ENV_PREFIX ) + ( java . lang . String . valueOf ( counter ) ) ) + '-' ) + projectName ; i = 0 ; } } return name ; }
org . junit . Assert . assertEquals ( newName , generated )
testPeerDomainSameAuthority ( ) { java . net . URI current = java . net . URI . create ( "ws://gateway.kaazing.test:8001/echo" ) ; java . net . URI redirect = java . net . URI . create ( "ws://gateway.kaazing.test:8001/echo/;e/cbm" ) ; int status = HttpRedirectPolicy . PEER_DOMAIN . compare ( current , redirect ) ; "<AssertPlaceHolder>" ; } create ( java . lang . Class ) { return org . kaazing . net . auth . ChallengeHandler . load0 ( clazz , java . util . ServiceLoader . load ( clazz ) ) ; }
org . junit . Assert . assertTrue ( ( status == 0 ) )
testReadFileContentQuietly_exception ( ) { java . io . File output = this . folder . newFolder ( ) ; java . lang . String readS = net . roboconf . core . utils . Utils . readFileContentQuietly ( output , java . util . logging . Logger . getLogger ( getClass ( ) . getName ( ) ) ) ; "<AssertPlaceHolder>" ; } getName ( ) { return this . name ; }
org . junit . Assert . assertEquals ( "" , readS )
testContainmentVsReference_02 ( ) { org . eclipse . xtend2 . lib . StringConcatenation _builder = new org . eclipse . xtend2 . lib . StringConcatenation ( ) ; _builder . append ( "grammar<sp>test<sp>with<sp>org.eclipse.xtext.common.Terminals<sp>import<sp>\'http://www.eclipse.org/emf/2002/Ecore\'<sp>EClass:<sp>name=ID<sp>eSuperTypes+=[EClass];" ) ; final java . lang . String grammar = _builder . toString ( ) ; final org . eclipse . xtext . resource . XtextResource resource = this . getResourceFromString ( grammar ) ; "<AssertPlaceHolder>" ; } getErrors ( ) { getContents ( ) ; return super . getErrors ( ) ; }
org . junit . Assert . assertEquals ( resource . getErrors ( ) . toString ( ) , 0 , resource . getErrors ( ) . size ( ) )
testExceptions2 ( ) { java . lang . String imei = "" ; try { imei = edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . taintedString ( "abcde2" ) ; int [ ] arr = new int [ ( ( int ) ( java . lang . Math . sqrt ( 49 ) ) ) ] ; if ( ( arr [ 32 ] ) > 0 ) imei = "" ; } catch ( java . lang . RuntimeException ex ) { "<AssertPlaceHolder>" ; } } getTaint ( java . lang . String ) { edu . columbia . cs . psl . phosphor . runtime . Taint taint = edu . columbia . cs . psl . phosphor . runtime . MultiTainter . getTaint ( description . toCharArray ( ) [ 0 ] ) ; return ( taint == null ) || ( ( ( taint . lbl ) == null ) && ( taint . hasNoDependencies ( ) ) ) ? 0 : 1 ; }
org . junit . Assert . assertTrue ( ( ( edu . columbia . cs . psl . test . phosphor . DroidBenchObjTagITCase . getTaint ( imei ) ) != 0 ) )
get ( ) { cache . put ( 1 , 1 ) ; "<AssertPlaceHolder>" ; } get ( ) { cache . put ( 1 , 1 ) ; org . junit . Assert . assertEquals ( new org . springframework . cache . support . SimpleValueWrapper ( 1 ) . get ( ) , imcache . get ( 1 ) . get ( ) ) ; }
org . junit . Assert . assertEquals ( new org . springframework . cache . support . SimpleValueWrapper ( 1 ) . get ( ) , imcache . get ( 1 ) . get ( ) )
testDezelfdeVolgnummersMaarVerschillendeNamen ( ) { java . util . List < nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht > persoonVoornamen = new java . util . ArrayList < nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht > ( ) ; nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht voornaam = new nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht ( ) ; voornaam . setVolgnummer ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . VolgnummerAttribuut ( 1 ) ) ; nl . bzk . brp . model . bericht . kern . PersoonVoornaamStandaardGroepBericht standaardGroep = new nl . bzk . brp . model . bericht . kern . PersoonVoornaamStandaardGroepBericht ( ) ; standaardGroep . setNaam ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . VoornaamAttribuut ( "Oussama" ) ) ; voornaam . setStandaard ( standaardGroep ) ; persoonVoornamen . add ( voornaam ) ; nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht voornaam2 = new nl . bzk . brp . model . bericht . kern . PersoonVoornaamBericht ( ) ; voornaam2 . setVolgnummer ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . VolgnummerAttribuut ( 1 ) ) ; nl . bzk . brp . model . bericht . kern . PersoonVoornaamStandaardGroepBericht standaardGroep2 = new nl . bzk . brp . model . bericht . kern . PersoonVoornaamStandaardGroepBericht ( ) ; standaardGroep2 . setNaam ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . VoornaamAttribuut ( "Chougna" ) ) ; voornaam2 . setStandaard ( standaardGroep2 ) ; persoonVoornamen . add ( voornaam2 ) ; "<AssertPlaceHolder>" ; } isValid ( java . lang . String , javax . validation . ConstraintValidatorContext ) { return org . apache . commons . lang . StringUtils . isNotBlank ( waarde ) ; }
org . junit . Assert . assertFalse ( validator . isValid ( persoonVoornamen , null ) )
onMockFactoryProvided2 ( ) { final ro . isdc . wro . model . factory . WroModelFactory mockFactory = org . mockito . Mockito . mock ( ro . isdc . wro . model . factory . WroModelFactory . class ) ; org . mockito . Mockito . when ( mockFactory . create ( ) ) . thenReturn ( new ro . isdc . wro . model . WroModel ( ) ) ; final java . util . List < ro . isdc . wro . model . factory . WroModelFactory > list = java . util . Arrays . asList ( mockFactory ) ; factory = new ro . isdc . wro . extensions . model . factory . SmartWroModelFactory ( ) . setFactoryList ( list ) ; injector . inject ( factory ) ; "<AssertPlaceHolder>" ; } create ( ) { return callback ; }
org . junit . Assert . assertNotNull ( factory . create ( ) )
testForwardInsertNormalizationNecessaryMoreBasesSecond ( ) { de . charite . compbio . jannovar . reference . TranscriptPosition txPos = new de . charite . compbio . jannovar . reference . TranscriptPosition ( infoForward , 1 , PositionType . ZERO_BASED ) ; de . charite . compbio . jannovar . reference . GenomePosition gPos = projectorForward . transcriptToGenomePos ( txPos ) ; de . charite . compbio . jannovar . reference . GenomeVariant change = new de . charite . compbio . jannovar . reference . GenomeVariant ( gPos , "" , "GTGC" , Strand . FWD ) ; de . charite . compbio . jannovar . reference . GenomeVariant updatedChange = de . charite . compbio . jannovar . reference . GenomeVariantNormalizer . normalizeInsertion ( this . infoForward , change , txPos ) ; de . charite . compbio . jannovar . reference . GenomeVariant expectedChange = new de . charite . compbio . jannovar . reference . GenomeVariant ( gPos . shifted ( 2 ) , "" , "GCGT" , Strand . FWD ) ; "<AssertPlaceHolder>" ; } shifted ( int ) { return new de . charite . compbio . jannovar . reference . CDSPosition ( transcript , ( ( pos ) + delta ) , PositionType . ZERO_BASED ) ; }
org . junit . Assert . assertEquals ( expectedChange , updatedChange )
testSuppressionList ( ) { mockRecipientPrincipalAlias . setAlias ( org . sagebionetworks . repo . manager . MessageManagerImplSESTest . SUPPRESSION_EMAIL ) ; when ( mockNotificationEmailDao . getNotificationEmailForPrincipal ( mockRecipientId ) ) . thenReturn ( mockRecipientPrincipalAlias . getAlias ( ) ) ; java . util . List < java . lang . String > errors = messageManager . processMessage ( org . sagebionetworks . repo . manager . MessageManagerImplSESTest . MESSAGE_ID_PLAIN_TEXT , mockProgressCallback ) ; "<AssertPlaceHolder>" ; } toString ( ) { double percent = ( ( ( double ) ( currentIndex ) ) / ( ( double ) ( totalCount ) ) ) * 100.0 ; return java . lang . String . format ( "%1$-30s<sp>%2$10d/%3$-10d<sp>%4$8.2f<sp>%%" , message , currentIndex , totalCount , percent ) ; }
org . junit . Assert . assertEquals ( errors . toString ( ) , 0 , errors . size ( ) )
updateFullyConfiguredLoadBalancerForErrorPageRollbacks ( ) { try { buildHydratedLb ( ) ; stmAdapter . updateLoadBalancer ( config , lb , lb , null ) ; stmAdapter . setErrorFile ( config , lb , "" ) ; org . junit . Assert . fail ( "Should<sp>have<sp>failed<sp>to<sp>update" ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } } getUserPages ( ) { if ( ( userPagesNull ) == null ) { if ( ( userPages ) == null ) { userPagesNull = true ; } else { userPagesNull = false ; userPages . setLoadbalancer ( this ) ; } return userPages ; } else if ( userPagesNull ) { return null ; } return userPages ; }
org . junit . Assert . assertNull ( lb . getUserPages ( ) )
testIterator ( ) { me . prettyprint . hector . api . query . SliceQuery < java . lang . String , java . util . UUID , java . lang . String > query = me . prettyprint . hector . api . factory . HFactory . createSliceQuery ( keyspace , me . prettyprint . cassandra . service . ColumnSliceIteratorTest . se , me . prettyprint . cassandra . service . ColumnSliceIteratorTest . us , me . prettyprint . cassandra . service . ColumnSliceIteratorTest . se ) . setKey ( me . prettyprint . cassandra . service . ColumnSliceIteratorTest . KEY ) . setColumnFamily ( me . prettyprint . cassandra . service . ColumnSliceIteratorTest . CF ) ; me . prettyprint . cassandra . service . ColumnSliceIterator < java . lang . String , java . util . UUID , java . lang . String > it = new me . prettyprint . cassandra . service . ColumnSliceIterator < java . lang . String , java . util . UUID , java . lang . String > ( query , null , FINISH , false , 100 ) ; java . util . Map < java . util . UUID , java . lang . String > results = new java . util . HashMap < java . util . UUID , java . lang . String > ( ) ; while ( it . hasNext ( ) ) { me . prettyprint . hector . api . beans . HColumn < java . util . UUID , java . lang . String > c = it . next ( ) ; results . put ( c . getName ( ) , c . getValue ( ) ) ; } "<AssertPlaceHolder>" ; } size ( ) { return components . size ( ) ; }
org . junit . Assert . assertEquals ( 1000 , results . size ( ) )
compareToInputNotNullOutputPositive ( ) { final com . freedomotic . environment . GraphEdge objectUnderTest = new com . freedomotic . environment . GraphEdge ( null , 2147483295 , 541065984 ) ; final com . freedomotic . environment . GraphEdge other = new com . freedomotic . environment . GraphEdge ( 34627582 , 2147483551 , 536871680 ) ; final int retval = objectUnderTest . compareTo ( other ) ; "<AssertPlaceHolder>" ; } compareTo ( com . freedomotic . i18n . ComboLanguage ) { return description . compareTo ( other . toString ( ) ) ; }
org . junit . Assert . assertEquals ( 1 , retval )
canConvertExchange ( ) { converter = new edu . zipcloud . cloudstreetmarket . core . converters . IdentifiableToIdConverter ( edu . zipcloud . cloudstreetmarket . core . converters . Exchange . class ) ; "<AssertPlaceHolder>" ; } canConvert ( java . lang . Class ) { return type . isAssignableFrom ( this . type ) ; }
org . junit . Assert . assertTrue ( converter . canConvert ( edu . zipcloud . cloudstreetmarket . core . converters . Exchange . class ) )
testRootFilterRegistration ( ) { org . osgi . util . tracker . ServiceTracker < org . ops4j . pax . web . service . WebContainer , org . ops4j . pax . web . service . WebContainer > tracker = new org . osgi . util . tracker . ServiceTracker ( installWarBundle . getBundleContext ( ) , org . ops4j . pax . web . service . WebContainer . class , null ) ; tracker . open ( ) ; org . ops4j . pax . web . service . WebContainer service = tracker . waitForService ( TimeUnit . SECONDS . toMillis ( 20 ) ) ; final java . lang . String fullContent = "This<sp>content<sp>is<sp>Filtered<sp>by<sp>a<sp>javax.servlet.Filter" ; javax . servlet . Filter filter = new javax . servlet . Filter ( ) { @ org . ops4j . pax . web . itest . common . Override public void init ( javax . servlet . FilterConfig filterConfig ) throws javax . servlet . ServletException { } @ org . ops4j . pax . web . itest . common . Override public void doFilter ( javax . servlet . ServletRequest request , javax . servlet . ServletResponse response , javax . servlet . FilterChain chain ) throws java . io . IOException , javax . servlet . ServletException { java . io . PrintWriter writer = response . getWriter ( ) ; writer . write ( fullContent ) ; writer . flush ( ) ; } @ org . ops4j . pax . web . itest . common . Override public void destroy ( ) { } } ; final java . io . StringWriter writer = new java . io . StringWriter ( ) ; filter . doFilter ( null , ( ( javax . servlet . ServletResponse ) ( java . lang . reflect . Proxy . newProxyInstance ( getClass ( ) . getClassLoader ( ) , new java . lang . Class [ ] { javax . servlet . ServletResponse . class } , ( proxy , method , args ) -> { if ( method . getName ( ) . equals ( "/some/random/path" 2 ) ) { return new java . io . PrintWriter ( writer ) ; } return null ; } ) ) ) , null ) ; "<AssertPlaceHolder>" ; service . registerFilter ( filter , new java . lang . String [ ] { "*" , "/some/random/path" 1 , "/some/random/path" 0 , "/some/random/path" } , null , null , null ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'content<sp>is<sp>Filtered<sp>by'" , ( resp ) -> resp . contains ( "content<sp>is<sp>Filtered<sp>by" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/test-context/some/random/path" ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'content<sp>is<sp>Filtered<sp>by'" , ( resp ) -> resp . contains ( "content<sp>is<sp>Filtered<sp>by" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/test-context/some/notregistered/random/path" ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'content<sp>is<sp>Filtered<sp>by'" , ( resp ) -> resp . contains ( "content<sp>is<sp>Filtered<sp>by" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/test-context/" ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'content<sp>is<sp>Filtered<sp>by'" , ( resp ) -> resp . contains ( "content<sp>is<sp>Filtered<sp>by" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/helloworld/hs" ) ; org . ops4j . pax . web . itest . base . client . HttpTestClientFactory . createDefaultTestClient ( ) . withResponseAssertion ( "Response<sp>must<sp>contain<sp>'content<sp>is<sp>Filtered<sp>by'" , ( resp ) -> resp . contains ( "content<sp>is<sp>Filtered<sp>by" ) ) . doGETandExecuteTest ( "http://127.0.0.1:8181/images/logo.png" ) ; service . unregisterFilter ( filter ) ; tracker . close ( ) ; } toString ( ) { return new java . lang . StringBuilder ( ) . append ( this . getClass ( ) . getSimpleName ( ) ) . append ( "{" ) . append ( "id=" ) . append ( getId ( ) ) . append ( ",context=" ) . append ( contextModel ) . append ( "}" ) . toString ( ) ; }
org . junit . Assert . assertEquals ( fullContent , writer . toString ( ) )
versionOf ( ) { org . apache . jackrabbit . oak . plugins . document . DocumentStore store = new org . apache . jackrabbit . oak . plugins . document . memory . MemoryDocumentStore ( ) ; org . apache . jackrabbit . oak . plugins . document . FormatVersion v = org . apache . jackrabbit . oak . plugins . document . FormatVersion . versionOf ( store ) ; "<AssertPlaceHolder>" ; } versionOf ( org . apache . jackrabbit . oak . plugins . document . DocumentStore ) { checkNotNull ( store ) ; org . apache . jackrabbit . oak . plugins . document . FormatVersion v = org . apache . jackrabbit . oak . plugins . document . FormatVersion . V0 ; org . apache . jackrabbit . oak . plugins . document . Document d = store . find ( org . apache . jackrabbit . oak . plugins . document . Collection . SETTINGS , org . apache . jackrabbit . oak . plugins . document . FormatVersion . VERSION_ID ) ; if ( d != null ) { java . lang . Object p = d . get ( org . apache . jackrabbit . oak . plugins . document . FormatVersion . PROP_VERSION ) ; if ( p != null ) { try { v = org . apache . jackrabbit . oak . plugins . document . FormatVersion . valueOf ( p . toString ( ) ) ; } catch ( java . lang . IllegalArgumentException e ) { throw new org . apache . jackrabbit . oak . plugins . document . DocumentStoreException ( e ) ; } } } return v ; }
org . junit . Assert . assertSame ( org . apache . jackrabbit . oak . plugins . document . FormatVersion . V0 , v )
testGetModemResetTimeoutMsecNull ( ) { org . eclipse . kura . net . admin . monitor . ModemMonitorServiceImpl svc = new org . eclipse . kura . net . admin . monitor . ModemMonitorServiceImpl ( ) ; java . util . List < org . eclipse . kura . net . NetConfig > netConfigs = new java . util . ArrayList ( ) ; org . eclipse . kura . net . NetConfig config = new org . eclipse . kura . net . NetConfigIP4 ( org . eclipse . kura . net . NetInterfaceStatus . netIPv4StatusEnabledLAN , true ) ; netConfigs . add ( config ) ; org . eclipse . kura . net . modem . ModemConfig nc = new org . eclipse . kura . net . modem . ModemConfig ( 1 , org . eclipse . kura . net . modem . ModemConfig . PdpType . PPP , "apn" , org . eclipse . kura . net . IPAddress . parseHostAddress ( "10.10.10.10" ) , 1 , 2 ) ; nc . setResetTimeout ( 2 ) ; netConfigs . add ( nc ) ; long result = ( ( long ) ( org . eclipse . kura . core . testutil . TestUtil . invokePrivate ( svc , "getModemResetTimeoutMsec" , ( ( java . lang . String ) ( null ) ) , netConfigs ) ) ) ; "<AssertPlaceHolder>" ; } invokePrivate ( java . lang . Object , java . lang . String , org . eclipse . kura . core . testutil . Class [ ] , java . lang . Object [ ] ) { java . lang . reflect . Method method = org . eclipse . kura . core . testutil . TestUtil . getMethod ( svc , methodName , paramTypes ) ; method . setAccessible ( true ) ; try { java . lang . Object result = method . invoke ( svc , params ) ; return result ; } catch ( java . lang . IllegalAccessException e ) { org . eclipse . kura . core . testutil . TestUtil . logger . warn ( e . getMessage ( ) , e ) ; } catch ( java . lang . IllegalArgumentException e ) { org . eclipse . kura . core . testutil . TestUtil . logger . warn ( e . getMessage ( ) , e ) ; } catch ( java . lang . reflect . InvocationTargetException e ) { throw e . getCause ( ) ; } return null ; }
org . junit . Assert . assertEquals ( 0L , result )
int_set ( ) { final org . erlide . engine . util . PreferencesHelper helper = org . erlide . engine . util . PreferencesHelper . getHelper ( org . erlide . core . preferences . PreferencesHelperTest . QUALIFIER ) ; final int val = 314159 ; helper . putInt ( org . erlide . core . preferences . PreferencesHelperTest . KEY , val ) ; final int res = helper . getInt ( org . erlide . core . preferences . PreferencesHelperTest . KEY , Integer . MIN_VALUE ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { return service . getInt ( qualifier , key , defaultValue , loadContexts ) ; }
org . junit . Assert . assertEquals ( val , res )
testSystemAccountUsername ( ) { java . lang . String name = "foo" ; policy . setSystemAccountUsername ( name ) ; "<AssertPlaceHolder>" ; } getSystemAccountUsername ( ) { return systemAccountUsername ; }
org . junit . Assert . assertEquals ( name , policy . getSystemAccountUsername ( ) )
testlsdbAge ( ) { defaultLspWrapper . setLsdbAge ( defaultIsisLsdbAge ) ; lsdbAge = defaultLspWrapper . lsdbAge ( ) ; "<AssertPlaceHolder>" ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( lsdbAge , org . hamcrest . CoreMatchers . is ( defaultIsisLsdbAge ) )
testRemove ( ) { com . liferay . portal . kernel . model . LayoutSet newLayoutSet = addLayoutSet ( ) ; _persistence . remove ( newLayoutSet ) ; com . liferay . portal . kernel . model . LayoutSet existingLayoutSet = _persistence . fetchByPrimaryKey ( newLayoutSet . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } getPrimaryKey ( ) { return _amImageEntryId ; }
org . junit . Assert . assertNull ( existingLayoutSet )
tupled_A$ ( ) { com . m3 . scalaflavor4j . F2 < java . lang . String , java . lang . Integer , java . lang . Boolean > f = new com . m3 . scalaflavor4j . F2 < java . lang . String , java . lang . Integer , java . lang . Boolean > ( ) { public com . m3 . scalaflavor4j . Boolean apply ( java . lang . String v1 , java . lang . Integer v2 ) { return ( v1 . length ( ) ) == v2 ; } } ; com . m3 . scalaflavor4j . Function1 < com . m3 . scalaflavor4j . Tuple2 < java . lang . String , java . lang . Integer > , java . lang . Boolean > f2 = new com . m3 . scalaflavor4j . RichFunction2 ( f ) . tupled ( ) ; boolean result = f2 . apply ( com . m3 . scalaflavor4j . Tuple . apply ( "foo" , 3 ) ) ; "<AssertPlaceHolder>" ; } apply ( T1 , T2 ) { return new com . m3 . scalaflavor4j . Tuple2 < T1 , T2 > ( _1 , _2 ) ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( true ) )
hasAMutableNameProperty ( ) { com . metservice . kanban . model . WorkItemType workItemType = new com . metservice . kanban . model . WorkItemType ( ) ; workItemType . setName ( "name" ) ; "<AssertPlaceHolder>" ; } getName ( ) { return super . toString ( ) . toLowerCase ( ) ; }
org . junit . Assert . assertThat ( workItemType . getName ( ) , org . hamcrest . CoreMatchers . is ( "name" ) )
filterServiceConfiguration_Change ( ) { org . oscm . internal . vo . VOServicePaymentConfiguration conf = org . oscm . accountservice . bean . PaymentConfigurationFilterTest . createServiceConfiguration ( product . getKey ( ) , PaymentType . CREDIT_CARD ) ; java . util . List < org . oscm . internal . vo . VOServicePaymentConfiguration > input = java . util . Arrays . asList ( conf ) ; java . util . List < org . oscm . internal . vo . VOServicePaymentConfiguration > list = pcf . filterServiceConfiguration ( input ) ; "<AssertPlaceHolder>" ; } filterServiceConfiguration ( java . util . List ) { java . util . List < org . oscm . internal . vo . VOServicePaymentConfiguration > result = new java . util . ArrayList < org . oscm . internal . vo . VOServicePaymentConfiguration > ( ) ; if ( conf == null ) { return result ; } org . oscm . domobjects . Organization vendor = ds . getCurrentUser ( ) . getOrganization ( ) ; for ( org . oscm . internal . vo . VOServicePaymentConfiguration c : conf ) { org . oscm . domobjects . Product product = ds . getReference ( org . oscm . domobjects . Product . class , c . getService ( ) . getKey ( ) ) ; org . oscm . permission . PermissionCheck . owns ( product , vendor , org . oscm . accountservice . bean . PaymentConfigurationFilter . logger , null ) ; checkIsTemplate ( vendor , product ) ; if ( serviceConfigurationChanged ( c , product ) ) { result . add ( c ) ; } } return result ; }
org . junit . Assert . assertEquals ( input , list )
testMin ( ) { System . out . println ( "min" ) ; jsat . distributions . ContinuousDistribution dist = new jsat . distributions . FisherSendor ( 0.5 , 3 ) ; "<AssertPlaceHolder>" ; } min ( ) { return Double . NEGATIVE_INFINITY ; }
org . junit . Assert . assertTrue ( ( 0 == ( dist . min ( ) ) ) )
add_embedded_vcards_not_supported ( ) { ezvcard . VCard vcard = new ezvcard . VCard ( ) ; vcard . setFormattedName ( "John<sp>Doe" ) ; vcard . addProperty ( new ezvcard . io . xml . XCardDocumentTest . EmbeddedProperty ( ) ) ; ezvcard . io . xml . XCardDocument xcard = new ezvcard . io . xml . XCardDocument ( ) ; ezvcard . io . xml . XCardDocument . XCardDocumentStreamWriter writer = xcard . writer ( ) ; writer . registerScribe ( new ezvcard . io . xml . XCardDocumentTest . EmbeddedScribe ( ) ) ; writer . write ( vcard ) ; ezvcard . VCard parsedVCard = ezvcard . Ezvcard . parseXml ( xcard . write ( ) ) . first ( ) ; "<AssertPlaceHolder>" ; } getExtendedProperties ( ) { return getProperties ( ezvcard . property . RawProperty . class ) ; }
org . junit . Assert . assertTrue ( parsedVCard . getExtendedProperties ( ) . isEmpty ( ) )
testNormal ( ) { org . apache . druid . query . filter . Filter extractionFilter = new org . apache . druid . query . filter . SelectorDimFilter ( "foo" , "extractDimVal" , org . apache . druid . segment . filter . ExtractionDimFilterTest . DIM_EXTRACTION_FN ) . toFilter ( ) ; org . apache . druid . collections . bitmap . ImmutableBitmap immutableBitmap = extractionFilter . getBitmapIndex ( BITMAP_INDEX_SELECTOR ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( size ) < 0 ) { size = 0 ; for ( int i = 0 ; i <= ( lastWordIndex ) ; i ++ ) { int w = words [ i ] ; if ( org . apache . druid . extendedset . intset . ConciseSet . isLiteral ( w ) ) { size += org . apache . druid . extendedset . intset . ConciseSet . getLiteralBitCount ( w ) ; } else { if ( org . apache . druid . extendedset . intset . ConciseSet . isZeroSequence ( w ) ) { if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) ++ ; } } else { size += org . apache . druid . extendedset . intset . ConciseSet . maxLiteralLengthMultiplication ( ( ( org . apache . druid . extendedset . intset . ConciseSet . getSequenceCount ( w ) ) + 1 ) ) ; if ( ! ( org . apache . druid . extendedset . intset . ConciseSet . isSequenceWithNoBits ( w ) ) ) { ( size ) -- ; } } } } } return size ; }
org . junit . Assert . assertEquals ( 1 , immutableBitmap . size ( ) )
equalIncreasingByteBuffer ( ) { class TestCase { boolean mExpected ; java . nio . ByteBuffer mBuffer ; int mLength ; int mStart ; public TestCase ( boolean expected , java . nio . ByteBuffer buffer , int length , int start ) { mExpected = expected ; mBuffer = buffer ; mLength = length ; mStart = start ; } } java . util . ArrayList < TestCase > testCases = new java . util . ArrayList ( ) ; testCases . add ( new TestCase ( false , null , 0 , 0 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { } ) , 0 , 0 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 1 } ) , 0 , 0 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { } ) , 0 , 3 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 1 } ) , 0 , 3 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { 0 } ) , 1 , 0 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 1 } ) , 1 , 0 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 1 , 2 } ) , 3 , 0 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 0 , 1 , 2 , ( ( byte ) ( 255 ) ) } ) , 3 , 0 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 1 , 2 , 3 } ) , 3 , 0 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { 3 } ) , 1 , 3 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 2 } ) , 1 , 3 ) ) ; testCases . add ( new TestCase ( true , java . nio . ByteBuffer . wrap ( new byte [ ] { 3 , 4 , 5 } ) , 3 , 3 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 3 , 4 , 5 , ( ( byte ) ( 255 ) ) } ) , 3 , 3 ) ) ; testCases . add ( new TestCase ( false , java . nio . ByteBuffer . wrap ( new byte [ ] { 2 , 3 , 4 } ) , 3 , 3 ) ) ; for ( TestCase testCase : testCases ) { boolean result = alluxio . util . io . BufferUtils . equalIncreasingByteBuffer ( testCase . mStart , testCase . mLength , testCase . mBuffer ) ; "<AssertPlaceHolder>" ; } } equalIncreasingByteBuffer ( int , int , java . nio . ByteBuffer ) { if ( buf == null ) { return false ; } buf . rewind ( ) ; if ( ( buf . remaining ( ) ) != len ) { return false ; } for ( int k = 0 ; k < len ; k ++ ) { if ( ( buf . get ( ) ) != ( ( byte ) ( start + k ) ) ) { return false ; } } return true ; }
org . junit . Assert . assertEquals ( testCase . mExpected , result )
teststringoutput1 ( ) { org . apache . tools . ant . types . resources . StringResource r = new org . apache . tools . ant . types . resources . StringResource ( ) ; testoutputbe ( r ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return value ; }
org . junit . Assert . assertEquals ( "foo" , r . getValue ( ) )
openFile ( ) { java . io . File testDB = org . sqlite . ConnectionTest . copyToTemp ( "sample.db" ) ; "<AssertPlaceHolder>" ; java . sql . Connection conn = java . sql . DriverManager . getConnection ( java . lang . String . format ( "jdbc:sqlite:%s" , testDB ) ) ; conn . close ( ) ; } copyToTemp ( java . lang . String ) { java . io . InputStream in = org . sqlite . ConnectionTest . class . getResourceAsStream ( fileName ) ; java . io . File dir = new java . io . File ( "target" ) ; if ( ! ( dir . exists ( ) ) ) dir . mkdirs ( ) ; java . io . File tmp = java . io . File . createTempFile ( fileName , "" , new java . io . File ( "target" ) ) ; tmp . deleteOnExit ( ) ; java . io . FileOutputStream out = new java . io . FileOutputStream ( tmp ) ; byte [ ] buf = new byte [ 8192 ] ; for ( int readBytes = 0 ; ( readBytes = in . read ( buf ) ) != ( - 1 ) ; ) { out . write ( buf , 0 , readBytes ) ; } out . flush ( ) ; out . close ( ) ; in . close ( ) ; return tmp ; }
org . junit . Assert . assertTrue ( testDB . exists ( ) )
testLocalIJ1Threshold ( ) { ops . run ( net . imagej . ops . Ops . Threshold . IJ1 . class , out , in , new net . imglib2 . algorithm . neighborhood . RectangleShape ( 1 , false ) , new net . imglib2 . outofbounds . OutOfBoundsMirrorFactory < net . imglib2 . type . numeric . integer . ByteType , net . imglib2 . img . Img < net . imglib2 . type . numeric . integer . ByteType > > ( net . imglib2 . outofbounds . OutOfBoundsMirrorFactory . Boundary . SINGLE ) ) ; "<AssertPlaceHolder>" ; } firstElement ( ) { return cursor ( ) . next ( ) ; }
org . junit . Assert . assertEquals ( true , out . firstElement ( ) . get ( ) )
testMatchExactlyVlanNull ( ) { actions = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "type" , "aaa" ) ; put ( "eth_type" , "12" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowActionPushMplsQuery ( actions ) ; org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushMpls action = new org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionPushMpls ( ) ; "<AssertPlaceHolder>" ; } matchExactly ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) { if ( ( target == null ) || ( ! ( target . getType ( ) . equals ( org . o3project . odenos . core . component . network . flow . ofpflow . OFPFlowActionCopyTtlOut . class . getSimpleName ( ) ) ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . matchExactly ( ( ( org . o3project . odenos . core . component . network . flow . basic . FlowAction ) ( action ) ) ) , org . hamcrest . CoreMatchers . is ( true ) )
testAccessAttachment ( ) { final org . switchyard . component . bpm . service . BPMServiceTests . Holder holder = new org . switchyard . component . bpm . service . BPMServiceTests . Holder ( ) ; org . switchyard . component . bpm . config . model . BPMComponentImplementationModel bci_model = ( ( org . switchyard . component . bpm . config . model . BPMComponentImplementationModel ) ( new org . switchyard . component . bpm . config . model . BPMSwitchYardScanner ( ) . scan ( org . switchyard . component . bpm . service . BPMServiceTests . AccessAttachment . class ) . getImplementation ( ) ) ) ; javax . xml . namespace . QName serviceName = new javax . xml . namespace . QName ( "AccessAttachment" ) ; org . switchyard . component . bpm . exchange . BPMExchangeHandler handler = new org . switchyard . component . bpm . exchange . BPMExchangeHandler ( bci_model , serviceDomain , serviceName ) ; org . switchyard . Service service = serviceDomain . registerService ( serviceName , org . switchyard . extensions . java . JavaService . fromClass ( org . switchyard . component . bpm . service . BPMServiceTests . AccessAttachment . class ) , handler ) ; serviceDomain . registerServiceReference ( service . getName ( ) , service . getInterface ( ) , service . getProviderHandler ( ) ) ; handler . start ( ) ; javax . activation . DataSource attachment = new org . switchyard . test . TestDataSource ( "someAttach" , "text/plain" , "someAttachData" ) ; new org . switchyard . test . Invoker ( serviceDomain , serviceName ) . operation ( "process" ) . attachment ( attachment . getName ( ) , attachment ) . sendInOnly ( holder ) ; handler . stop ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return getModelValue ( ) ; }
org . junit . Assert . assertEquals ( "someAttachData" , holder . getValue ( ) )
testIsAssignableFromWithTwoClasses ( ) { com . googlecode . jtype . Generic < java . util . List > listType = com . googlecode . jtype . Generic . get ( java . util . List . class ) ; "<AssertPlaceHolder>" ; } isAssignableFrom ( com . googlecode . jtype . Generic , java . lang . Class ) { java . lang . reflect . Type type = generic . getType ( ) ; java . lang . Class < ? > typeToCompare = aClass ; if ( type instanceof java . lang . reflect . ParameterizedType ) { java . lang . reflect . ParameterizedType castType = ( ( java . lang . reflect . ParameterizedType ) ( type ) ) ; boolean isWildcardType = false ; if ( ( castType . getActualTypeArguments ( ) [ 0 ] ) instanceof java . lang . reflect . WildcardType ) { isWildcardType = true ; } java . lang . reflect . Type [ ] types = typeToCompare . getGenericInterfaces ( ) ; while ( ( ( types . length ) == 0 ) && ( com . picocontainer . JTypeHelper . canGetSuperClass ( typeToCompare ) ) ) { typeToCompare = typeToCompare . getSuperclass ( ) ; types = typeToCompare . getGenericInterfaces ( ) ; } if ( ( types . length ) == 0 ) { return generic . getRawType ( ) . isAssignableFrom ( aClass ) ; } com . googlecode . jtype . Generic aClassGeneric = com . googlecode . jtype . Generic . get ( types [ 0 ] ) ; boolean b = generic . equals ( aClassGeneric ) ; boolean from = false ; if ( isWildcardType || ( com . picocontainer . JTypeHelper . isRawType ( aClass ) ) ) { from = generic . getRawType ( ) . isAssignableFrom ( aClass ) ; } return b || from ; } else if ( type instanceof java . lang . Class ) { java . lang . Class clazz = ( ( java . lang . Class ) ( type ) ) ; if ( clazz . isPrimitive ( ) ) { if ( ( clazz == ( int . class ) ) && ( typeToCompare == ( com . picocontainer . Integer . class ) ) ) { return true ; } else if ( ( clazz == ( long . class ) ) && ( typeToCompare == ( com . picocontainer . Long . class ) ) ) { return true ; } else if ( ( clazz == ( float . class ) ) && ( typeToCompare == ( com . picocontainer . Float . class ) ) ) { return true ; } else if ( ( clazz == ( double . class ) ) && ( typeToCompare == ( com . picocontainer . Double . class ) ) ) { return true ; } else if ( ( clazz == ( boolean . class ) ) && ( typeToCompare == ( com . picocontainer . Boolean . class ) ) ) { return true ; } else if ( ( clazz == ( short . class ) ) && ( typeToCompare == ( com . picocontainer . Short . class ) ) ) { return true ; } else if ( ( clazz == ( byte . class ) ) && ( typeToCompare == ( com . picocontainer . Byte . class ) ) ) { return true ; } } return clazz . isAssignableFrom ( typeToCompare ) ; } return false ; }
org . junit . Assert . assertTrue ( com . picocontainer . JTypeHelper . isAssignableFrom ( listType , java . util . List . class ) )
execWithBlankVault ( ) { final joptsimple . OptionSet options = optionParser . parse ( "--list-jobs" , java . util . UUID . randomUUID ( ) . toString ( ) ) ; final de . kopis . glacier . commands . RequestArchivesListCommand command = new de . kopis . glacier . commands . RequestArchivesListCommand ( client , sqs , sns ) ; "<AssertPlaceHolder>" ; } valid ( joptsimple . OptionSet , de . kopis . glacier . parsers . GlacierUploaderOptionParser ) { return ( options . has ( optionParser . download ) ) && ( options . has ( optionParser . targetFile ) ) ; }
org . junit . Assert . assertFalse ( command . valid ( options , optionParser ) )
testGenerateForCaseManagementDiagramMarshaller ( ) { org . kie . workbench . common . stunner . bpmn . backend . legacy . resource . JBPMBpmn2ResourceImpl bpmn2Resource = mock ( org . kie . workbench . common . stunner . bpmn . backend . legacy . resource . JBPMBpmn2ResourceImpl . class ) ; org . eclipse . emf . common . util . EList < org . eclipse . emf . ecore . EObject > contents = mock ( org . eclipse . emf . common . util . EList . class ) ; when ( cmDiagramMarshaller . marshallToBpmn2Resource ( diagram ) ) . thenReturn ( bpmn2Resource ) ; when ( bpmn2Resource . getContents ( ) ) . thenReturn ( contents ) ; when ( contents . get ( 0 ) ) . thenReturn ( definitions ) ; when ( cmBackendService . getDiagramMarshaller ( ) ) . thenReturn ( cmDiagramMarshaller ) ; org . eclipse . bpmn2 . Definitions result = tested . generate ( diagram ) ; verify ( cmDiagramMarshaller ) . marshallToBpmn2Resource ( diagram ) ; "<AssertPlaceHolder>" ; } verify ( org . kie . workbench . common . services . shared . whitelist . WhiteList ) { for ( final java . lang . String packageName : kieModuleMetaData . getPackages ( ) ) { if ( whiteList . contains ( packageName ) ) { for ( final java . lang . String className : kieModuleMetaData . getClasses ( packageName ) ) { verifyClass ( packageName , className ) ; } } } return buildMessages ; }
org . junit . Assert . assertEquals ( result , definitions )
testBuildWithExmptyParametersAndDisabledSecurityConstraint ( ) { unit . setSecurity ( false ) ; org . lnu . is . domain . specoffer . SpecOffer context = new org . lnu . is . domain . specoffer . SpecOffer ( ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>SpecOffer<sp>e<sp>WHERE<sp>e.status=:status<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . specoffer . SpecOffer > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
optionRetrievalTest ( ) { org . aesh . tty . TestConnection connection = new org . aesh . tty . TestConnection ( false ) ; org . aesh . command . map . MapCommandTest . DynCommand1 cmd = new org . aesh . command . map . MapCommandTest . DynCommand1 ( ) ; org . aesh . command . map . MapCommandTest . DynamicOptionsCountProvider provider = new org . aesh . command . map . MapCommandTest . DynamicOptionsCountProvider ( ) ; provider . options = org . aesh . command . map . MapCommandTest . getOptions ( ) ; org . aesh . command . map . MapProcessedCommandBuilder builder = org . aesh . command . map . MapProcessedCommandBuilder . builder ( ) ; builder . command ( cmd ) ; builder . lookupAtCompletionOnly ( true ) ; builder . name ( "dyn1" ) ; builder . optionProvider ( provider ) ; org . aesh . command . registry . CommandRegistry registry = org . aesh . command . impl . registry . AeshCommandRegistryBuilder . builder ( ) . command ( builder . create ( ) ) . create ( ) ; org . aesh . command . settings . Settings settings = org . aesh . command . settings . SettingsBuilder . builder ( ) . logging ( true ) . connection ( connection ) . commandRegistry ( registry ) . build ( ) ; org . aesh . readline . ReadlineConsole console = new org . aesh . readline . ReadlineConsole ( settings ) ; console . setPrompt ( new org . aesh . readline . Prompt ( "" ) ) ; console . start ( ) ; connection . clearOutputBuffer ( ) ; connection . read ( "dyn1<sp>--" ) ; connection . read ( completeChar . getFirstValue ( ) ) ; "<AssertPlaceHolder>" ; } read ( org . aesh . readline . Prompt ) { return delegate . read ( prompt ) ; }
org . junit . Assert . assertEquals ( provider . count , 1 )
benchmarkWithQuickFIX ( ) { long f1xDecoding = org . f1x . v1 . Test_DecodingNewOrderSingle . getDecodingTimeF1X ( ) ; System . out . println ( ( ( "Average<sp>F1X<sp>encoding<sp>time:<sp>" + f1xDecoding ) + "<sp>ns.<sp>per<sp>message" ) ) ; long qfixDecoding = org . f1x . v1 . Test_DecodingNewOrderSingle . getDecodingTimeQuickFIXJ ( ) ; System . out . println ( ( ( "Average<sp>QuickFIX<sp>encoding<sp>time:<sp>" + qfixDecoding ) + "<sp>ns.<sp>per<sp>message" ) ) ; double expectedAdvantage = 3.0 ; "<AssertPlaceHolder>" ; } getDecodingTimeQuickFIXJ ( ) { quickfix . Message msg = new quickfix . Message ( ) ; for ( int i = 0 ; i < ( org . f1x . v1 . Test_DecodingNewOrderSingle . WARMUP ) ; i ++ ) org . f1x . v1 . Test_DecodingNewOrderSingle . decode ( org . f1x . v1 . Test_DecodingNewOrderSingle . SAMPLE , msg ) ; long start = java . lang . System . nanoTime ( ) ; for ( int i = 0 ; i < ( org . f1x . v1 . Test_DecodingNewOrderSingle . N ) ; i ++ ) org . f1x . v1 . Test_DecodingNewOrderSingle . decode ( org . f1x . v1 . Test_DecodingNewOrderSingle . SAMPLE , msg ) ; long end = java . lang . System . nanoTime ( ) ; return ( end - start ) / ( org . f1x . v1 . Test_DecodingNewOrderSingle . N ) ; }
org . junit . Assert . assertTrue ( ( ( f1xDecoding * expectedAdvantage ) < qfixDecoding ) )
testEqualsWhenEqual ( ) { edu . illinois . library . cantaloupe . http . Header h1 = new edu . illinois . library . cantaloupe . http . Header ( "1" , "2" ) ; edu . illinois . library . cantaloupe . http . Header h2 = new edu . illinois . library . cantaloupe . http . Header ( "1" , "2" ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( h1 , h2 )
testToCreateNewInnerClassInstanceDirectly ( ) { org . baeldung . mocks . jmockit . AdvancedCollaborator . InnerAdvancedCollaborator innerCollaborator = mockit . Deencapsulation . newInnerInstance ( org . baeldung . mocks . jmockit . AdvancedCollaborator . InnerAdvancedCollaborator . class , mock ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( innerCollaborator )