input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testAppUserRest ( ) { try { uk . me . doitto . webapp . beans . EjbTest . ctx . lookup ( "java:global/classes/AppUserRest" ) ; "<AssertPlaceHolder>" ; } catch ( javax . naming . NamingException e ) { e . printStackTrace ( ) ; org . junit . Assert . fail ( "Should<sp>not<sp>reach<sp>here!" ) ; } }
org . junit . Assert . assertTrue ( true )
CalcularIcmsCreditoComQuantidadeDois ( ) { tributos . setValorProduto ( java . math . BigDecimal . valueOf ( 2000 ) ) ; tributos . setQuantidadeProduto ( java . math . BigDecimal . valueOf ( 2 ) ) ; tributos . setPercentualCredito ( java . math . BigDecimal . valueOf ( 17 ) ) ; com . chronos . calc . resultados . IResultadoCalculoCredito result = calcular . calcularIcmsCredito ( ) ; 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 )
testGetTransform_initiallyReturnsIdentityTransform ( ) { org . eclipse . swt . graphics . Transform transform = new org . eclipse . swt . graphics . Transform ( display ) ; gc . getTransform ( transform ) ; float [ ] elements = new float [ 6 ] ; transform . getElements ( elements ) ; "<AssertPlaceHolder>" ; } getElements ( java . lang . Object ) { return input ; }
org . junit . Assert . assertArrayEquals ( new float [ ] { 1 , 0 , 0 , 1 , 0 , 0 } , elements , 0 )
testSplitIntoBundles ( ) { "<AssertPlaceHolder>" ; } splitIntoBundles ( long , org . talend . components . api . container . RuntimeContainer ) { return java . util . Arrays . asList ( this ) ; }
org . junit . Assert . assertEquals ( 1 , source . splitIntoBundles ( 10 , container ) . size ( ) )
flakyTest ( ) { System . out . println ( ( "Running<sp>JUnit<sp>" + ( junit . runner . Version . id ( ) ) ) ) ; boolean current = jiras . surefire1146 . SimpleParameterizedTest . success ; jiras . surefire1146 . SimpleParameterizedTest . success = ! ( jiras . surefire1146 . SimpleParameterizedTest . success ) ; "<AssertPlaceHolder>" ; } println ( java . lang . String ) { target . writeTestOutput ( ( s == null ? "null" : s ) , true , isStdout ) ; }
org . junit . Assert . assertTrue ( current )
testListPlaceholderTildeSignatureAWS4 ( ) { final ch . cyberduck . core . s3 . Path container = new ch . cyberduck . core . s3 . Path ( "test-us-east-1-cyberduck" , java . util . EnumSet . of ( Path . Type . directory , Path . Type . volume ) ) ; container . attributes ( ) . setRegion ( "us-east-1" ) ; final ch . cyberduck . core . s3 . Path placeholder = new ch . cyberduck . core . s3 . S3DirectoryFeature ( session , new ch . cyberduck . core . s3 . S3WriteFeature ( session , new ch . cyberduck . core . s3 . S3DisabledMultipartService ( ) ) ) . mkdir ( new ch . cyberduck . core . s3 . Path ( container , java . lang . String . format ( "%s~" , java . util . UUID . randomUUID ( ) . toString ( ) ) , java . util . EnumSet . of ( Path . Type . directory ) ) , null , new ch . cyberduck . core . transfer . TransferStatus ( ) ) ; final ch . cyberduck . core . s3 . AttributedList < ch . cyberduck . core . s3 . Path > list = new ch . cyberduck . core . s3 . S3ObjectListService ( session ) . list ( placeholder , new ch . cyberduck . core . s3 . DisabledListProgressListener ( ) ) ; "<AssertPlaceHolder>" ; new ch . cyberduck . core . s3 . S3DefaultDeleteFeature ( session ) . delete ( java . util . Collections . singletonList ( placeholder ) , new ch . cyberduck . core . s3 . DisabledLoginCallback ( ) , new ch . cyberduck . core . features . Delete . DisabledCallback ( ) ) ; } isEmpty ( ) { return ( size ( ) ) == 0 ; }
org . junit . Assert . assertTrue ( list . isEmpty ( ) )
testMultigame ( ) { java . io . InputStream is = com . goai . sgf . parse . FullParse . class . getResourceAsStream ( "multigame.sgf" ) ; com . goai . sgf . ebnf . GameTreeCollection collection = com . goai . sgf . parse . SGFParser . parse ( is ) ; "<AssertPlaceHolder>" ; } getGametrees ( ) { return gametrees ; }
org . junit . Assert . assertEquals ( 2 , collection . getGametrees ( ) . size ( ) )
MustInCorrectPrepareWhenKeysGetOrAddThrowException ( ) { info . smart_tools . smartactors . iobject . iobject . IObject query = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject document = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; when ( documentField . in ( query ) ) . thenReturn ( document ) ; when ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "db.collection.upsert" ) ) . thenThrow ( new info . smart_tools . smartactors . ioc . iioccontainer . exception . ResolutionException ( "" ) ) ; try { testTask . prepare ( query ) ; } catch ( info . smart_tools . smartactors . database . interfaces . idatabase_task . exception . TaskPrepareException e ) { verify ( documentField ) . in ( query ) ; verify ( doneFlagField ) . out ( document , true ) ; verifyStatic ( ) ; info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "db.collection.upsert" ) ; return ; } "<AssertPlaceHolder>" ; } getOrAdd ( java . lang . String ) { return ( ( info . smart_tools . smartactors . ioc . ikey . IKey ) ( info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( info . smart_tools . smartactors . ioc . ioc . IOC . getKeyForKeyStorage ( ) , keyName ) ) ) ; }
org . junit . Assert . assertTrue ( false )
testGetRoles ( ) { java . util . List roles = lookupDao . getRoles ( ) ; log . debug ( roles ) ; "<AssertPlaceHolder>" ; } size ( ) { return users . size ( ) ; }
org . junit . Assert . assertTrue ( ( ( roles . size ( ) ) > 0 ) )
applyTest ( ) { java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "{{<sp>''<sp>|<sp>upcase<sp>}}" , "" } , new java . lang . String [ ] { "{{<sp>nil<sp>|<sp>upcase<sp>}}" , "" } , new java . lang . String [ ] { "{{<sp>'Abc'<sp>|<sp>upcase<sp>}}" , "ABC" } , new java . lang . String [ ] { "{{<sp>'abc'<sp>|<sp>upcase<sp>}}" , "ABC" } } ; for ( java . lang . String [ ] test : tests ) { liqp . Template template = liqp . Template . parse ( test [ 0 ] ) ; java . lang . String rendered = java . lang . String . valueOf ( template . render ( ) ) ; "<AssertPlaceHolder>" ; } } render ( ) { return render ( new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ) ; }
org . junit . Assert . assertThat ( rendered , org . hamcrest . CoreMatchers . is ( test [ 1 ] ) )
shouldRecognizeAPure440Note ( ) { final int length = 10000 ; final int samplerate = 44100 ; final long [ ] signal = new long [ length ] ; for ( int j = 0 ; j < length ; j ++ ) { signal [ j ] = ( ( long ) ( ( java . lang . Math . sin ( ( ( ( ( j * 440 ) * 2 ) * ( Math . PI ) ) / samplerate ) ) ) * 32768.0 ) ) ; } final org . toilelibre . libe . soundtransform . model . converted . sound . Channel s = new org . toilelibre . libe . soundtransform . model . converted . sound . Channel ( signal , new org . toilelibre . libe . soundtransform . model . converted . FormatInfo ( 2 , samplerate ) , 1 ) ; final org . toilelibre . libe . soundtransform . model . library . pack . note . Note n = $ . select ( org . toilelibre . libe . soundtransform . model . library . pack . note . SoundToNoteService . class ) . convert ( new org . toilelibre . libe . soundtransform . model . library . pack . note . SimpleNoteInfo ( "Sample<sp>A4<sp>(440<sp>Hz)<sp>Sound" ) , new org . toilelibre . libe . soundtransform . model . converted . sound . Sound ( new org . toilelibre . libe . soundtransform . model . converted . sound . Channel [ ] { s } ) ) ; new org . toilelibre . libe . soundtransform . infrastructure . service . observer . Slf4jObserver ( ) . notify ( ( ( "Sample<sp>A4<sp>(440Hz)<sp>Sound,<sp>but<sp>frequency<sp>found<sp>was<sp>" + ( n . getFrequency ( ) ) ) + "Hz" ) ) ; "<AssertPlaceHolder>" ; new org . toilelibre . libe . soundtransform . infrastructure . service . observer . Slf4jObserver ( ) . notify ( "...acceptable" ) ; } getFrequency ( ) { return this . frequency ; }
org . junit . Assert . assertTrue ( ( ( ( n . getFrequency ( ) ) > ( 440 - 10 ) ) && ( ( n . getFrequency ( ) ) < ( 440 + 10 ) ) ) )
testDescendants ( ) { owltools . graph . OWLGraphWrapper g = getOntologyWrapper ( ) ; org . semanticweb . owlapi . model . OWLClass c = g . getOWLClass ( "http://purl.obolibrary.org/obo/NCBITaxon_10090" ) ; org . semanticweb . owlapi . model . OWLObject i = g . getOWLObject ( "http://purl.obolibrary.org/obo/MGI_101761" ) ; System . out . println ( ( "Descendants<sp>of<sp>" + c ) ) ; System . out . println ( ( "Expecting<sp>" + i ) ) ; boolean ok = false ; for ( owltools . graph . OWLGraphEdge e : g . getIncomingEdgesClosure ( c ) ) { System . out . println ( ( "i:" + e ) ) ; if ( e . getSource ( ) . equals ( i ) ) ok = true ; } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( obj instanceof owltools . gaf . ExtensionExpression ) == false ) return false ; owltools . gaf . ExtensionExpression other = ( ( owltools . gaf . ExtensionExpression ) ( obj ) ) ; if ( ( cls ) == null ) { if ( ( other . cls ) != null ) return false ; } else if ( ! ( cls . equals ( other . cls ) ) ) return false ; if ( ( relation ) == null ) { if ( ( other . relation ) != null ) return false ; } else if ( ! ( relation . equals ( other . relation ) ) ) return false ; return true ; }
org . junit . Assert . assertTrue ( ok )
testCyclic_Int ( ) { int n = benzene . getAtomCount ( ) ; org . openscience . cdk . ringsearch . RingSearch ringSearch = new org . openscience . cdk . ringsearch . RingSearch ( benzene ) ; for ( int i = 0 ; i < n ; i ++ ) { "<AssertPlaceHolder>" ; } } cyclic ( int ) { return cyclic . get ( v ) ; }
org . junit . Assert . assertTrue ( ringSearch . cyclic ( i ) )
testCapabilityUtil ( ) { final byte [ ] result = new byte [ ] { 1 , 2 , 4 , 8 } ; final io . netty . buffer . ByteBuf aggregator = io . netty . buffer . Unpooled . buffer ( ) ; org . opendaylight . protocol . bgp . parser . spi . CapabilityUtil . formatCapability ( 1 , io . netty . buffer . Unpooled . wrappedBuffer ( new byte [ ] { 4 , 8 } ) , aggregator ) ; "<AssertPlaceHolder>" ; } getAllBytes ( io . netty . buffer . ByteBuf ) { return org . opendaylight . protocol . util . ByteArray . getBytes ( buffer , buffer . readableBytes ( ) ) ; }
org . junit . Assert . assertArrayEquals ( result , org . opendaylight . protocol . util . ByteArray . getAllBytes ( aggregator ) )
applyTest ( ) { java . lang . String json = "{<sp>\"n\"<sp>:<sp>[1,2,3,4,5]<sp>}" ; java . lang . String [ ] [ ] tests = new java . lang . String [ ] [ ] { new java . lang . String [ ] { "{{<sp>nil<sp>|<sp>escape<sp>}}" , "" } , new java . lang . String [ ] { "{{<sp>42<sp>|<sp>escape<sp>}}" , "42" } , new java . lang . String [ ] { "{{<sp>n<sp>|<sp>escape<sp>}}" , "12345" } , new java . lang . String [ ] { "{{<sp>\'<foo>&\"\'<sp>|<sp>escape<sp>}}" , "&lt;foo&gt;&amp;&quot;" } , new java . lang . String [ ] { "{{<sp>false<sp>|<sp>escape<sp>}}" , "false" } } ; for ( java . lang . String [ ] test : tests ) { liqp . Template template = liqp . Template . parse ( test [ 0 ] ) ; java . lang . String rendered = java . lang . String . valueOf ( template . render ( json ) ) ; "<AssertPlaceHolder>" ; } } render ( java . util . Map ) { if ( this . protectionSettings . isRenderTimeLimited ( ) ) { return render ( variables , liqp . Executors . newSingleThreadExecutor ( ) , true ) ; } else { if ( ( this . templateSize ) > ( this . protectionSettings . maxTemplateSizeBytes ) ) { throw new java . lang . RuntimeException ( ( ( "template<sp>exceeds<sp>" + ( this . protectionSettings . maxTemplateSizeBytes ) ) + "<sp>bytes" ) ) ; } return renderUnguarded ( variables ) ; } }
org . junit . Assert . assertThat ( rendered , org . hamcrest . CoreMatchers . is ( test [ 1 ] ) )
isTouchedByRangeWithin ( ) { org . wickedsource . docxstamper . replace . IndexedRun run = new org . wickedsource . docxstamper . replace . IndexedRun ( 5 , 10 , 0 , null ) ; "<AssertPlaceHolder>" ; } isTouchedByRange ( int , int ) { return ( ( ( ( startIndex ) >= globalStartIndex ) && ( ( startIndex ) <= globalEndIndex ) ) || ( ( ( endIndex ) >= globalStartIndex ) && ( ( endIndex ) <= globalEndIndex ) ) ) || ( ( ( startIndex ) <= globalStartIndex ) && ( ( endIndex ) >= globalEndIndex ) ) ; }
org . junit . Assert . assertTrue ( run . isTouchedByRange ( 5 , 7 ) )
isValidGaleraConnection ( ) { try ( java . sql . Connection connection = getNewConnection ( false ) ) { "<AssertPlaceHolder>" ; } } isValid ( int ) { if ( ( currentProtocol ) != null ) { if ( currentProtocol . isMasterConnection ( ) ) { boolean valid = currentProtocol . isValid ( timeout ) ; if ( ( secondaryProtocol ) != null ) { try { boolean secondValid = secondaryProtocol . isValid ( timeout ) ; if ( ( ( ! valid ) && ( urlParser . getOptions ( ) . allowMasterDownConnection ) ) && secondValid ) { setMasterHostFail ( ) ; return true ; } } catch ( java . sql . SQLException sqle ) { } } return valid ; } else { boolean valid = currentProtocol . isValid ( timeout ) ; if ( ( masterProtocol ) != null ) { try { masterProtocol . isValid ( timeout ) ; } catch ( java . sql . SQLException sqle ) { } } return valid ; } } return false ; }
org . junit . Assert . assertTrue ( connection . isValid ( 0 ) )
testModifyUserZoneCheckXML ( ) { java . lang . String userName = "test" ; java . lang . String zone = "<arg9></arg9>\n" 1 ; org . irods . jargon . core . packinstr . GeneralAdminInp pi = org . irods . jargon . core . packinstr . GeneralAdminInp . instanceForModifyUserZone ( userName , zone ) ; java . lang . String tagOut = pi . getParsedTags ( ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "<generalAdminInp_PI><arg0>modify</arg0>\n" ) ; sb . append ( "<arg1>user</arg1>\n" ) ; sb . append ( "<arg2>test</arg2>\n" ) ; sb . append ( "<arg3>zone</arg3>\n" ) ; sb . append ( "<arg9></arg9>\n" 2 ) ; sb . append ( "<arg5></arg5>\n" ) ; sb . append ( "<arg6></arg6>\n" ) ; sb . append ( "<arg7></arg7>\n" ) ; sb . append ( "<arg9></arg9>\n" 0 ) ; sb . append ( "<arg9></arg9>\n" ) ; sb . append ( "</generalAdminInp_PI>\n" ) ; "<AssertPlaceHolder>" ; } toString ( ) { final int maxLen = 10 ; java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "DataProfile<sp>[file=" ) . append ( file ) . append ( ",<sp>domainObject=" ) . append ( domainObject ) . append ( ",<sp>irodsTagValues=" 1 ) . append ( ( ( metadata ) != null ? metadata . subList ( 0 , java . lang . Math . min ( metadata . size ( ) , maxLen ) ) : null ) ) . append ( ",<sp>acls=" ) . append ( ( ( acls ) != null ? acls . subList ( 0 , java . lang . Math . min ( acls . size ( ) , maxLen ) ) : null ) ) . append ( ",<sp>isStarred=" ) . append ( isStarred ) . append ( ",<sp>isShared=" ) . append ( isShared ) . append ( ",<sp>mimeType=" ) . append ( mimeType ) . append ( ",<sp>irodsTagValues=" 0 ) . append ( infoType ) . append ( ",<sp>irodsTagValues=" ) . append ( ( ( irodsTagValues ) != null ? irodsTagValues . subList ( 0 , java . lang . Math . min ( irodsTagValues . size ( ) , maxLen ) ) : null ) ) . append ( ",<sp>parentPath=" ) . append ( parentPath ) . append ( ",<sp>irodsTagValues=" 2 ) . append ( childName ) . append ( ",<sp>pathComponents=" ) . append ( ( ( pathComponents ) != null ? pathComponents . subList ( 0 , java . lang . Math . min ( pathComponents . size ( ) , maxLen ) ) : null ) ) . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( "<arg9></arg9>\n" 3 , sb . toString ( ) , tagOut )
testGetEps ( ) { final org . hipparchus . clustering . DBSCANClusterer < org . hipparchus . clustering . DoublePoint > transformer = new org . hipparchus . clustering . DBSCANClusterer < org . hipparchus . clustering . DoublePoint > ( 2.0 , 5 ) ; "<AssertPlaceHolder>" ; } getEps ( ) { return eps ; }
org . junit . Assert . assertEquals ( 2.0 , transformer . getEps ( ) , 0.0 )
testMakeFileStr ( ) { java . io . FileOutputStream fos = info . michaelkohler . helpertools . io . FileHelper . makeFile ( info . michaelkohler . helpertools . FileHelperTest . targetFile ) ; fos . write ( 12 ) ; fos . close ( ) ; "<AssertPlaceHolder>" ; } makeFile ( java . io . File ) { checkNotNull ( file , "file<sp>cannot<sp>be<sp>null" ) ; return info . michaelkohler . helpertools . io . FileHelper . makeFile ( file . getAbsolutePath ( ) ) ; }
org . junit . Assert . assertTrue ( info . michaelkohler . helpertools . FileHelperTest . targetFile . exists ( ) )
shouldFindEmptyStream ( ) { java . lang . String name = "something" ; org . apache . deltaspike . data . test . java8 . entity . Simple s = new org . apache . deltaspike . data . test . java8 . entity . Simple ( name ) ; entityManager . persist ( s ) ; java . util . stream . Stream < org . apache . deltaspike . data . test . java8 . entity . Simple > found = simpleRepository . findByName ( "some<sp>other<sp>name" ) ; "<AssertPlaceHolder>" ; } persist ( java . lang . Object ) { javax . enterprise . inject . spi . BeanManager beanManager = org . apache . deltaspike . core . api . provider . BeanManagerProvider . getInstance ( ) . getBeanManager ( ) ; java . util . Set < javax . enterprise . inject . spi . Bean < ? > > beans = beanManager . getBeans ( org . apache . deltaspike . data . impl . audit . PrePersistAuditListener . class ) ; for ( javax . enterprise . inject . spi . Bean < ? > bean : beans ) { org . apache . deltaspike . data . impl . audit . PrePersistAuditListener result = ( ( org . apache . deltaspike . data . impl . audit . PrePersistAuditListener ) ( beanManager . getReference ( bean , org . apache . deltaspike . data . impl . audit . PrePersistAuditListener . class , beanManager . createCreationalContext ( bean ) ) ) ) ; result . prePersist ( entity ) ; } }
org . junit . Assert . assertEquals ( emptyList ( ) , found . collect ( toList ( ) ) )
testRefreshCase ( ) { final org . jbpm . workbench . cm . model . CaseInstanceSummary cis = setupCaseInstance ( ) ; presenter . refreshCase ( ) ; final org . mockito . ArgumentCaptor < org . jbpm . workbench . cm . client . events . CaseRefreshEvent > captor = org . mockito . ArgumentCaptor . forClass ( org . jbpm . workbench . cm . client . events . CaseRefreshEvent . class ) ; verify ( caseRefreshEvent ) . fire ( captor . capture ( ) ) ; "<AssertPlaceHolder>" ; } getCaseId ( ) { return caseId ; }
org . junit . Assert . assertEquals ( cis . getCaseId ( ) , captor . getValue ( ) . getCaseId ( ) )
getEncountersByPatient_shouldIncludeVoidedEncountersInTheReturnedListIfIncludedVoidedIsTrue ( ) { org . openmrs . api . EncounterService encounterService = org . openmrs . api . context . Context . getEncounterService ( ) ; java . util . List < org . openmrs . Encounter > encounters = encounterService . getEncountersByPatient ( "12345" , true ) ; "<AssertPlaceHolder>" ; } size ( ) { return getMemberships ( ) . stream ( ) . filter ( ( m ) -> ! ( m . getVoided ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) . size ( ) ; }
org . junit . Assert . assertEquals ( 4 , encounters . size ( ) )
testValidateLimits4 ( ) { java . lang . String string = new java . lang . String ( new int [ ] { 1114111 } , 0 , 1 ) ; boolean result = org . oscm . validator . ADMValidator . containsOnlyValidIdChars ( string ) ; "<AssertPlaceHolder>" ; } containsOnlyValidIdChars ( java . lang . String ) { if ( value == null ) { return true ; } java . util . regex . Matcher matcher = org . oscm . validator . ADMValidator . INVALID_ID_CHARS . matcher ( value ) ; return ! ( matcher . find ( ) ) ; }
org . junit . Assert . assertTrue ( result )
testEncodeOtherType ( ) { java . lang . String str = "Meep!" ; ch . writeOutbound ( str ) ; "<AssertPlaceHolder>" ; } readOutbound ( ) { T message = ( ( T ) ( io . netty . channel . embedded . EmbeddedChannel . poll ( outboundMessages ) ) ) ; if ( message != null ) { io . netty . util . ReferenceCountUtil . touch ( message , "Caller<sp>of<sp>readOutbound()<sp>will<sp>handle<sp>the<sp>message<sp>from<sp>this<sp>point." ) ; } return message ; }
org . junit . Assert . assertThat ( ch . readOutbound ( ) , org . hamcrest . CoreMatchers . is ( ( ( java . lang . Object ) ( str ) ) ) )
test2 ( ) { com . actiontech . dble . route . function . PartitionByFileMap partition = new com . actiontech . dble . route . function . PartitionByFileMap ( ) ; partition . setMapFile ( "partition-hash-int.txt" ) ; partition . setDefaultNode ( 1 ) ; partition . init ( ) ; java . lang . String idVal = "10020" ; "<AssertPlaceHolder>" ; } calculate ( long ) { long v1 = 0L ; long v2 = 0L ; long v3 = 0L ; int c1 = 0 ; int c2 = 0 ; int c3 = 0 ; for ( com . actiontech . dble . statistic . HeartbeatRecorder . Record record : records ) { long t = time - ( record . time ) ; if ( t <= ( com . actiontech . dble . statistic . HeartbeatRecorder . AVG1_TIME ) ) { v1 += record . value ; ++ c1 ; } if ( t <= ( com . actiontech . dble . statistic . HeartbeatRecorder . AVG2_TIME ) ) { v2 += record . value ; ++ c2 ; } if ( t <= ( com . actiontech . dble . statistic . HeartbeatRecorder . AVG3_TIME ) ) { v3 += record . value ; ++ c3 ; } } if ( c1 != 0 ) { avg1 = v1 / c1 ; } if ( c2 != 0 ) { avg2 = v2 / c2 ; } if ( c3 != 0 ) { avg3 = v3 / c3 ; } }
org . junit . Assert . assertEquals ( true , ( 1 == ( partition . calculate ( idVal ) ) ) )
testSchemaId ( ) { requestHeader . setSchemaId ( "id" ) ; "<AssertPlaceHolder>" ; } getSchemaId ( ) { return schemaId ; }
org . junit . Assert . assertEquals ( "id" , requestHeader . getSchemaId ( ) )
levenshteinDistanceShouldWorkForSmallInputs ( ) { for ( int inputSize = org . mafagafogigante . dungeon . commands . StringDistanceMetricsTest . SMALL_INPUT_MINIMUM_SIZE ; inputSize <= ( org . mafagafogigante . dungeon . commands . StringDistanceMetricsTest . SMALL_INPUT_MAXIMUM_SIZE ) ; inputSize *= 2 ) { java . lang . String input = org . mafagafogigante . dungeon . commands . StringDistanceMetricsTest . makeRandomString ( inputSize ) ; java . lang . String shuffled = org . mafagafogigante . dungeon . commands . StringDistanceMetricsTest . replaceLetterByDash ( input ) ; int expectedDistance = org . mafagafogigante . dungeon . commands . StringDistanceMetricsTest . countCharacters ( shuffled , '-' ) ; int distance = org . mafagafogigante . dungeon . commands . StringDistanceMetrics . levenshteinDistance ( input , shuffled ) ; "<AssertPlaceHolder>" ; } } levenshteinDistance ( java . lang . String , java . lang . String ) { if ( ! ( org . mafagafogigante . dungeon . commands . CommandLimits . isWithinMaximumCommandLength ( a ) ) ) { throw new java . lang . IllegalArgumentException ( "input<sp>is<sp>too<sp>big." ) ; } if ( ! ( org . mafagafogigante . dungeon . commands . CommandLimits . isWithinMaximumCommandLength ( b ) ) ) { throw new java . lang . IllegalArgumentException ( "input<sp>is<sp>too<sp>big." ) ; } return org . apache . commons . lang3 . StringUtils . getLevenshteinDistance ( a , b ) ; }
org . junit . Assert . assertEquals ( expectedDistance , distance )
testFindByAction ( ) { java . lang . String action1 = "alpha" ; java . lang . String action2 = "bravo" ; org . oscarehr . common . model . ReportProvider reportProvider1 = new org . oscarehr . common . model . ReportProvider ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( reportProvider1 ) ; reportProvider1 . setAction ( action1 ) ; dao . persist ( reportProvider1 ) ; org . oscarehr . common . model . ReportProvider reportProvider2 = new org . oscarehr . common . model . ReportProvider ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( reportProvider2 ) ; reportProvider2 . setAction ( action2 ) ; dao . persist ( reportProvider2 ) ; org . oscarehr . common . model . ReportProvider reportProvider3 = new org . oscarehr . common . model . ReportProvider ( ) ; org . oscarehr . common . dao . utils . EntityDataGenerator . generateTestDataForModelClass ( reportProvider3 ) ; reportProvider3 . setAction ( action1 ) ; dao . persist ( reportProvider3 ) ; java . util . List < org . oscarehr . common . model . ReportProvider > expectedResult = new java . util . ArrayList < org . oscarehr . common . model . ReportProvider > ( java . util . Arrays . asList ( reportProvider1 , reportProvider3 ) ) ; java . util . List < org . oscarehr . common . model . ReportProvider > result = dao . findByAction ( action1 ) ; org . apache . log4j . Logger logger = org . oscarehr . util . MiscUtils . getLogger ( ) ; if ( ( result . size ( ) ) != ( expectedResult . size ( ) ) ) { logger . warn ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Array<sp>sizes<sp>do<sp>not<sp>match." ) ; } for ( int i = 0 ; i < ( expectedResult . size ( ) ) ; i ++ ) { if ( ! ( expectedResult . get ( i ) . equals ( result . get ( i ) ) ) ) { logger . warn ( "Items<sp>do<sp>not<sp>match." ) ; org . junit . Assert . fail ( "Items<sp>do<sp>not<sp>match." ) ; } } "<AssertPlaceHolder>" ; } get ( java . lang . String ) { try { return terser . get ( path ) ; } catch ( ca . uhn . hl7v2 . HL7Exception e ) { oscar . oscarLab . ca . all . parsers . CLSHandler . logger . warn ( ( "Unable<sp>to<sp>get<sp>field<sp>at<sp>" + path ) , e ) ; return null ; } }
org . junit . Assert . assertTrue ( true )
testSlackService ( ) { org . gitlab4j . api . services . SlackService slackNotifications = org . gitlab4j . api . JsonUtils . unmarshalResource ( org . gitlab4j . api . services . SlackService . class , "slack-notifications.json" ) ; "<AssertPlaceHolder>" ; } compareJson ( T , java . lang . String ) { java . io . InputStreamReader reader = new java . io . InputStreamReader ( org . gitlab4j . api . TestGitLabApiBeans . class . getResourceAsStream ( filename ) ) ; return org . gitlab4j . api . JsonUtils . compareJson ( apiObject , reader ) ; }
org . junit . Assert . assertTrue ( org . gitlab4j . api . JsonUtils . compareJson ( slackNotifications , "slack-notifications.json" ) )
TestGetPowerStatePaused ( ) { com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus status = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus ( ) ; status . state = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerState ( ) ; status . state . waiting = new com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStateWaiting ( ) ; com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState state = com . vmware . admiral . adapter . kubernetes . KubernetesContainerStateMapper . getPowerState ( status ) ; "<AssertPlaceHolder>" ; } getPowerState ( com . vmware . admiral . compute . kubernetes . entities . pods . ContainerStatus ) { if ( ( status == null ) || ( ( status . state ) == null ) ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . UNKNOWN ; } if ( ( status . state . running ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . RUNNING ; } else if ( ( status . state . waiting ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . PAUSED ; } else if ( ( status . state . terminated ) != null ) { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . STOPPED ; } else { return com . vmware . admiral . compute . container . ContainerService . ContainerState . PowerState . UNKNOWN ; } }
org . junit . Assert . assertEquals ( PowerState . PAUSED , state )
testGetDefaultRoles_nullRolesString ( ) { doReturn ( null ) . when ( spyAppConfigProperties ) . getDefaultRolesString ( ) ; java . util . List < java . lang . String > defaultRoles = spyAppConfigProperties . getDefaultRoles ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return getRecurrences ( ) . size ( ) ; }
org . junit . Assert . assertEquals ( 0 , defaultRoles . size ( ) )
testSerialization ( ) { org . jfree . chart . annotations . XYImageAnnotation a1 = new org . jfree . chart . annotations . XYImageAnnotation ( 10.0 , 20.0 , getTestImage ( ) ) ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( a1 ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; org . jfree . chart . annotations . XYImageAnnotation a2 = ( ( org . jfree . chart . annotations . XYImageAnnotation ) ( in . readObject ( ) ) ) ; in . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { try { this . connection . close ( ) ; } catch ( java . lang . Exception e ) { System . err . println ( "JdbcXYDataset:<sp>swallowing<sp>exception." ) ; } }
org . junit . Assert . assertEquals ( a1 , a2 )
testCompositeApisApiIdDelete ( ) { org . wso2 . carbon . apimgt . rest . api . store . impl . TestUtil . printTestMethodName ( ) ; java . lang . String apiID = java . util . UUID . randomUUID ( ) . toString ( ) ; org . wso2 . carbon . apimgt . rest . api . store . impl . CompositeApisApiServiceImpl compositeApisApiService = new org . wso2 . carbon . apimgt . rest . api . store . impl . CompositeApisApiServiceImpl ( ) ; org . wso2 . carbon . apimgt . core . api . APIStore apiStore = org . mockito . Mockito . mock ( org . wso2 . carbon . apimgt . core . impl . APIStoreImpl . class ) ; org . powermock . api . mockito . PowerMockito . mockStatic ( org . wso2 . carbon . apimgt . rest . api . common . util . RestApiUtil . class ) ; org . powermock . api . mockito . PowerMockito . when ( org . wso2 . carbon . apimgt . rest . api . common . util . RestApiUtil . getConsumer ( org . wso2 . carbon . apimgt . rest . api . store . impl . CompositeApisApiServiceImplTestCase . USER ) ) . thenReturn ( apiStore ) ; org . wso2 . msf4j . Request request = org . wso2 . carbon . apimgt . rest . api . store . impl . TestUtil . getRequest ( ) ; org . powermock . api . mockito . PowerMockito . when ( org . wso2 . carbon . apimgt . rest . api . common . util . RestApiUtil . getLoggedInUsername ( request ) ) . thenReturn ( org . wso2 . carbon . apimgt . rest . api . store . impl . CompositeApisApiServiceImplTestCase . USER ) ; org . mockito . Mockito . doNothing ( ) . doThrow ( new java . lang . IllegalArgumentException ( ) ) . when ( apiStore ) . deleteCompositeApi ( apiID ) ; javax . ws . rs . core . Response response = compositeApisApiService . compositeApisApiIdDelete ( apiID , null , null , request ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; }
org . junit . Assert . assertEquals ( 200 , response . getStatus ( ) )
testComplement ( ) { org . antlr . v4 . runtime . misc . IntervalSet s = org . antlr . v4 . runtime . misc . IntervalSet . of ( 100 , 100 ) ; s . add ( 101 , 101 ) ; org . antlr . v4 . runtime . misc . IntervalSet s2 = org . antlr . v4 . runtime . misc . IntervalSet . of ( 100 , 102 ) ; java . lang . String expecting = "102" ; java . lang . String result = s . complement ( s2 ) . toString ( ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( getTarget ( ) ) + ":" ) + ( getTestName ( ) ) ; }
org . junit . Assert . assertEquals ( expecting , result )
testCopyFromInputViewToOutputView ( ) { org . gradoop . common . model . impl . id . GradoopId inputId = org . gradoop . common . model . impl . id . GradoopId . get ( ) ; java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; inputId . write ( new org . apache . flink . core . memory . DataOutputViewStreamWrapper ( outputStream ) ) ; outputStream . flush ( ) ; byte [ ] writtenBytes = outputStream . toByteArray ( ) ; outputStream . close ( ) ; java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( writtenBytes ) ; org . apache . flink . core . memory . DataInputViewStreamWrapper inputView = new org . apache . flink . core . memory . DataInputViewStreamWrapper ( inputStream ) ; java . io . ByteArrayOutputStream outputStreamForCopy = new java . io . ByteArrayOutputStream ( ) ; org . apache . flink . core . memory . DataOutputViewStreamWrapper outputView = new org . apache . flink . core . memory . DataOutputViewStreamWrapper ( outputStreamForCopy ) ; inputId . copy ( inputView , outputView ) ; byte [ ] writtenBytesOfCopy = outputStreamForCopy . toByteArray ( ) ; outputView . close ( ) ; inputView . close ( ) ; java . io . ByteArrayInputStream inputStreamFromCopiedData = new java . io . ByteArrayInputStream ( writtenBytesOfCopy ) ; org . apache . flink . core . memory . DataInputViewStreamWrapper inputViewFromCopiedData = new org . apache . flink . core . memory . DataInputViewStreamWrapper ( inputStreamFromCopiedData ) ; org . gradoop . common . model . impl . id . GradoopId copy = new org . gradoop . common . model . impl . id . GradoopId ( ) ; copy . read ( inputViewFromCopiedData ) ; inputStreamFromCopiedData . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { vertexTable . close ( ) ; edgeTable . close ( ) ; graphHeadTable . close ( ) ; }
org . junit . Assert . assertEquals ( inputId , copy )
testEscapeHTML ( ) { java . lang . String html = "the<sp>quick<sp>brown<sp><script<sp>type=\"text/javascript\">alert(\'hi\');</script><sp>fox" ; java . lang . String expected = "the<sp>quick<sp>brown<sp>&#60;script<sp>type=&#34;text/javascript&#34;&#62;alert('hi');&#60;/script&#62;<sp>fox" ; "<AssertPlaceHolder>" ; } escapeHTML ( java . lang . String ) { java . lang . StringBuilder out = new java . lang . StringBuilder ( java . lang . Math . max ( 16 , html . length ( ) ) ) ; for ( int i = 0 , length = html . length ( ) ; i < length ; i ++ ) { char c = html . charAt ( i ) ; if ( ( ( ( ( c > 127 ) || ( c == '"' ) ) || ( c == '<' ) ) || ( c == '>' ) ) || ( c == '&' ) ) { out . append ( "&#" ) ; out . append ( ( ( int ) ( c ) ) ) ; out . append ( ';' ) ; } else { out . append ( c ) ; } } return out . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , edu . illinois . library . cantaloupe . util . StringUtils . escapeHTML ( html ) )
generateTspCertificate ( ) { eu . europa . esig . dss . token . DSSPrivateKeyEntry keyEntry = service . generateTspCertificate ( SignatureAlgorithm . RSA_SHA256 ) ; "<AssertPlaceHolder>" ; eu . europa . esig . dss . x509 . CertificateToken certificate = keyEntry . getCertificate ( ) ; org . bouncycastle . tsp . TSPUtil . validateCertificate ( new org . bouncycastle . cert . X509CertificateHolder ( certificate . getEncoded ( ) ) ) ; } generateTspCertificate ( eu . europa . esig . dss . SignatureAlgorithm ) { java . security . KeyPair keyPair = generateKeyPair ( algorithm . getEncryptionAlgorithm ( ) ) ; org . bouncycastle . asn1 . x500 . X500Name issuer = new org . bouncycastle . asn1 . x500 . X500Name ( "CN=RootIssuerTSPFake,O=DSS-test" ) ; org . bouncycastle . asn1 . x500 . X500Name subject = new org . bouncycastle . asn1 . x500 . X500Name ( "CN=RootSubjectTSP,O=DSS-test" ) ; final java . util . Date notBefore = new java . util . Date ( ( ( java . lang . System . currentTimeMillis ( ) ) - ( ( ( 24 * 60 ) * 60 ) * 1000 ) ) ) ; final java . util . Date notAfter = new java . util . Date ( ( ( java . lang . System . currentTimeMillis ( ) ) + ( eu . europa . esig . dss . test . gen . CertificateService . MAX ) ) ) ; eu . europa . esig . dss . x509 . CertificateToken cert = generateTspCertificate ( algorithm , keyPair , issuer , subject , notBefore , notAfter ) ; return new eu . europa . esig . dss . test . mock . MockPrivateKeyEntry ( algorithm . getEncryptionAlgorithm ( ) , cert , keyPair . getPrivate ( ) ) ; }
org . junit . Assert . assertNotNull ( keyEntry )
testParseNegativeY ( ) { java . lang . String source = ( "{1" + ( getDecimalCharacter ( ) ) ) + "2323}" ; org . apache . commons . math4 . geometry . euclidean . oned . Vector1D expected = new org . apache . commons . math4 . geometry . euclidean . oned . Cartesian1D ( 1.2323 ) ; org . apache . commons . math4 . geometry . euclidean . oned . Vector1D actual = vector1DFormat . parse ( source ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { java . text . ParsePosition parsePosition = new java . text . ParsePosition ( 0 ) ; org . apache . commons . math4 . geometry . euclidean . twod . Vector2D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { throw new org . apache . commons . math4 . exception . MathParseException ( source , parsePosition . getErrorIndex ( ) , org . apache . commons . math4 . geometry . euclidean . twod . Vector2D . class ) ; } return result ; }
org . junit . Assert . assertEquals ( expected , actual )
testParseLeafeNameSingleKeyValue ( ) { final java . lang . String distinguishedName = "key=value" ; final java . lang . String value = com . cloud . ldap . DistinguishedNameParser . parseLeafName ( distinguishedName ) ; "<AssertPlaceHolder>" ; } parseLeafName ( java . lang . String ) { if ( distinguishedName . contains ( com . cloud . ldap . DistinguishedNameParser . NAME_SEPARATOR ) ) { final java . lang . String [ ] parts = distinguishedName . split ( com . cloud . ldap . DistinguishedNameParser . NAME_SEPARATOR ) ; return com . cloud . ldap . DistinguishedNameParser . parseValue ( parts [ 0 ] ) ; } else { return com . cloud . ldap . DistinguishedNameParser . parseValue ( distinguishedName ) ; } }
org . junit . Assert . assertThat ( value , org . hamcrest . Matchers . equalTo ( "value" ) )
testParse ( ) { org . junit . Assume . assumeTrue ( org . apache . tika . parser . strings . StringsParserTest . canRun ( ) ) ; java . lang . String resource = "/test-documents/testOCTET_header.dbase3" ; java . lang . String [ ] content = new java . lang . String [ ] { "CLASSNO" , "TITLE" , "ITEMNO" , "LISTNO" , "LISTDATE" } ; java . lang . String [ ] met_attributes = new java . lang . String [ ] { "min-len" , "encoding" , "strings:file_output" } ; org . apache . tika . parser . strings . StringsConfig stringsConfig = new org . apache . tika . parser . strings . StringsConfig ( ) ; org . apache . tika . parser . strings . FileConfig fileConfig = new org . apache . tika . parser . strings . FileConfig ( ) ; org . apache . tika . parser . Parser parser = new org . apache . tika . parser . strings . StringsParser ( ) ; org . xml . sax . ContentHandler handler = new org . apache . tika . sax . BodyContentHandler ( ) ; org . apache . tika . metadata . Metadata metadata = new org . apache . tika . metadata . Metadata ( ) ; org . apache . tika . parser . ParseContext context = new org . apache . tika . parser . ParseContext ( ) ; context . set ( org . apache . tika . parser . strings . StringsConfig . class , stringsConfig ) ; context . set ( org . apache . tika . parser . strings . FileConfig . class , fileConfig ) ; try ( java . io . InputStream stream = org . apache . tika . parser . strings . StringsParserTest . class . getResourceAsStream ( resource ) ) { parser . parse ( stream , handler , metadata , context ) ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } for ( java . lang . String word : content ) { "<AssertPlaceHolder>" ; } java . util . Arrays . equals ( met_attributes , metadata . names ( ) ) ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "FileStarted<sp>[resourceId=" ) ; builder . append ( resourceId ) ; builder . append ( ",<sp>started=" ) ; builder . append ( started ) ; builder . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertTrue ( handler . toString ( ) . contains ( word ) )
testBrpPersoonslijstGetterZonderInhoud ( ) { final nl . moderniseringgba . isc . esb . message . brp . generated . TransseksualiteitVerzoekType transseksualiteitVerzoekType = new nl . moderniseringgba . isc . esb . message . brp . generated . TransseksualiteitVerzoekType ( ) ; final nl . moderniseringgba . isc . esb . message . brp . impl . TransseksualiteitVerzoekBericht transseksualiteitVerzoekBericht = new nl . moderniseringgba . isc . esb . message . brp . impl . TransseksualiteitVerzoekBericht ( transseksualiteitVerzoekType ) ; "<AssertPlaceHolder>" ; } getBrpPersoonslijst ( ) { return asBrpPersoonslijst ( leesUitBrpAntwoordType . getBrpPl ( ) ) ; }
org . junit . Assert . assertNull ( transseksualiteitVerzoekBericht . getBrpPersoonslijst ( ) )
ackingContinousSeqNumsShouldUpdateLatestValidSeqNum ( ) { state . emit ( newRecordWithSequenceNumber ( "01" ) , false ) ; state . emit ( newRecordWithSequenceNumber ( "02" ) , false ) ; state . emit ( newRecordWithSequenceNumber ( "03" ) , false ) ; state . ack ( "02" ) ; state . ack ( "01" ) ; "<AssertPlaceHolder>" ; } getLatestValidSeqNum ( ) { return tracker . getCheckpointSequenceNumber ( ) ; }
org . junit . Assert . assertThat ( state . getLatestValidSeqNum ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( "02" ) ) )
setsEncoderOnV2Tag ( ) { com . mpatric . mp3agic . ID3v1 id3v1Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v1TagForTesting ( ) ; com . mpatric . mp3agic . ID3v2 id3v2Tag = new com . mpatric . mp3agic . ID3WrapperTest . ID3v2TagForTesting ( ) ; com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( id3v1Tag , id3v2Tag ) ; wrapper . setEncoder ( "an<sp>encoder" ) ; "<AssertPlaceHolder>" ; } getEncoder ( ) { if ( ( id3v2Tag ) != null ) { return id3v2Tag . getEncoder ( ) ; } else { return null ; } }
org . junit . Assert . assertEquals ( "an<sp>encoder" , id3v2Tag . getEncoder ( ) )
shouldFetchChanges ( ) { in . ashwanthkumar . gocd . slack . Server server = mock ( in . ashwanthkumar . gocd . slack . Server . class ) ; in . ashwanthkumar . gocd . slack . Pipeline pipeline1 = new in . ashwanthkumar . gocd . slack . Pipeline ( ) ; { pipeline1 . buildCause = new in . ashwanthkumar . gocd . slack . BuildCause ( ) ; in . ashwanthkumar . gocd . slack . MaterialRevision leafRevision = new in . ashwanthkumar . gocd . slack . MaterialRevision ( ) ; leafRevision . material = new in . ashwanthkumar . gocd . slack . Material ( ) ; leafRevision . material . type = "Something" ; leafRevision . material . id = 1338 ; leafRevision . changed = true ; in . ashwanthkumar . gocd . slack . MaterialRevision pipelineRevision = new in . ashwanthkumar . gocd . slack . MaterialRevision ( ) ; pipelineRevision . material = new in . ashwanthkumar . gocd . slack . Material ( ) ; pipelineRevision . material . type = "Pipeline" ; pipelineRevision . changed = true ; in . ashwanthkumar . gocd . slack . Modification modification = new in . ashwanthkumar . gocd . slack . Modification ( ) ; modification . revision = "pipeline2/11/foo" ; pipelineRevision . modifications = in . ashwanthkumar . utils . collections . Lists . of ( modification ) ; pipeline1 . buildCause . materialRevisions = new in . ashwanthkumar . gocd . slack . MaterialRevision [ ] { leafRevision , pipelineRevision } ; } in . ashwanthkumar . gocd . slack . Pipeline pipeline2 = new in . ashwanthkumar . gocd . slack . Pipeline ( ) ; { pipeline2 . buildCause = new in . ashwanthkumar . gocd . slack . BuildCause ( ) ; in . ashwanthkumar . gocd . slack . MaterialRevision leafRevision = new in . ashwanthkumar . gocd . slack . MaterialRevision ( ) ; leafRevision . material = new in . ashwanthkumar . gocd . slack . Material ( ) ; leafRevision . material . type = "Something<sp>other" ; leafRevision . material . id = 1337 ; leafRevision . changed = true ; pipeline2 . buildCause . materialRevisions = new in . ashwanthkumar . gocd . slack . MaterialRevision [ ] { leafRevision } ; } when ( server . getPipelineInstance ( "pipeline1" , 10 ) ) . thenReturn ( pipeline1 ) ; when ( server . getPipelineInstance ( "pipeline2" , 11 ) ) . thenReturn ( pipeline2 ) ; in . ashwanthkumar . gocd . slack . GoNotificationMessage message = new in . ashwanthkumar . gocd . slack . GoNotificationMessage ( in . ashwanthkumar . gocd . slack . util . TestUtils . createMockServerFactory ( server ) , in . ashwanthkumar . gocd . slack . GoNotificationMessageTest . info ( "pipeline1" , 10 ) ) ; java . util . List < in . ashwanthkumar . gocd . slack . MaterialRevision > revisions = message . fetchChanges ( new in . ashwanthkumar . gocd . slack . ruleset . Rules ( ) ) ; "<AssertPlaceHolder>" ; } fetchChanges ( in . ashwanthkumar . gocd . slack . ruleset . Rules ) { in . ashwanthkumar . gocd . slack . Server server = serverFactory . getServer ( rules ) ; in . ashwanthkumar . gocd . slack . Pipeline pipelineInstance = server . getPipelineInstance ( pipeline . name , java . lang . Integer . parseInt ( pipeline . counter ) ) ; return pipelineInstance . rootChanges ( server ) ; }
org . junit . Assert . assertThat ( revisions . size ( ) , org . hamcrest . CoreMatchers . is ( 2 ) )
custom ( ) { final java . util . concurrent . atomic . AtomicReference < java . lang . String > method = new java . util . concurrent . atomic . AtomicReference < java . lang . String > ( ) ; final org . apache . openejb . server . httpd . HttpListenerRegistry registry = org . apache . openejb . loader . SystemInstance . get ( ) . getComponent ( org . apache . openejb . server . httpd . HttpListenerRegistry . class ) ; registry . addHttpListener ( new org . apache . openejb . server . httpd . HttpListener ( ) { @ org . apache . openejb . server . httpd . Override public void onMessage ( final org . apache . openejb . server . httpd . HttpRequest request , final org . apache . openejb . server . httpd . HttpResponse response ) throws org . apache . openejb . server . httpd . Exception { method . set ( request . getMethod ( ) ) ; } } , "/custom" ) ; try { final java . net . URL url = new java . net . URL ( ( ( "http://localhost:" + ( nextAvailablePort ) ) + "/custom" ) ) ; final java . net . HttpURLConnection connection = java . net . HttpURLConnection . class . cast ( url . openConnection ( ) ) ; connection . setRequestMethod ( "OPTIONS" ) ; final java . io . InputStream inputStream = connection . getInputStream ( ) ; org . apache . openejb . loader . IO . slurp ( inputStream ) ; "<AssertPlaceHolder>" ; inputStream . close ( ) ; } finally { registry . removeHttpListener ( "/custom" ) ; } } get ( ) { org . junit . Assert . assertEquals ( "org.apache.openejb.arquillian.tests.appcomposer.Bean1_true_org.apache.openejb.persistence.JtaEntityManager" , org . apache . openejb . arquillian . common . IO . slurp ( new java . net . URL ( ( ( url . toExternalForm ( ) ) + "endpoint" ) ) ) ) ; }
org . junit . Assert . assertEquals ( "OPTIONS" , method . get ( ) )
moidfyWithExpression01 ( ) { com . ebay . cloud . cms . metadata . model . MetaAttribute attribute = new com . ebay . cloud . cms . metadata . model . MetaAttribute ( false ) ; attribute . setName ( "newCalName" ) ; attribute . setDataType ( DataTypeEnum . STRING ) ; attribute . setExpression ( "$name<sp>+<sp>$archTier" ) ; attribute . setDbName ( com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . sequence . getNext ( ) ) ; com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . applicationMetadata . addField ( attribute ) ; java . lang . String oldName = "expression-update" ; com . ebay . cloud . cms . dal . entity . flatten . impl . NewBsonEntity entity = newExpressEntity ( com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . applicationMetadata , oldName ) ; java . lang . String createId = com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . persistenceService . create ( entity , com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . context ) ; com . ebay . cloud . cms . dal . entity . flatten . impl . NewBsonEntity queryEntity = buildQueryEntity ( com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . BRANCH_TEST , RaptorEntityGenerator . TypeEnum . ApplicationService . name ( ) , createId ) ; com . ebay . cloud . cms . dal . entity . IEntity getApp = com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . persistenceService . get ( queryEntity , com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . context ) ; getApp . addFieldValue ( "archTier" , "archTierValue" ) ; com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . persistenceService . modify ( getApp , com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . context ) ; getApp = com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . persistenceService . get ( queryEntity , com . ebay . cloud . cms . dal . persistence . flatten . EntityExpressionTest . context ) ; "<AssertPlaceHolder>" ; } getFieldValues ( java . lang . String ) { com . ebay . cloud . cms . metadata . model . MetaField metaField = getMetaClass ( ) . getFieldByName ( fieldName ) ; com . ebay . cloud . cms . utils . CheckConditions . checkArgument ( ( metaField != null ) , "Can't<sp>find<sp>meta<sp>field<sp>%s" , fieldName ) ; com . ebay . cloud . cms . utils . CheckConditions . checkNotNull ( metaField . getDbName ( ) , "Meta<sp>field<sp>doesn't<sp>have<sp>db<sp>name<sp>set!" ) ; com . mongodb . BasicDBObject fieldBsonObject = null ; java . lang . String dbValName = null ; if ( metaField . isInternal ( ) ) { dbValName = metaField . getDbName ( ) ; fieldBsonObject = bsonObject ; } else { dbValName = com . ebay . cloud . cms . metadata . model . MetaField . VALUE_KEY ; fieldBsonObject = bsonObject ; dbValName = metaField . getFlattenValueDbName ( ) ; } if ( fieldBsonObject == null ) { return java . util . Collections . EMPTY_LIST ; } com . ebay . cloud . cms . metadata . model . MetaField . CardinalityEnum cardinality = metaField . getCardinality ( ) ; com . ebay . cloud . cms . metadata . model . MetaField . DataTypeEnum dataType = metaField . getDataType ( ) ; com . ebay . cloud . cms . dal . entity . datahandler . IDataTypeHandler handler = com . ebay . cloud . cms . dal . entity . flatten . impl . datahandler . BsonDataTypeHandlerFactory . getHandler ( dataType ) ; java . util . List < java . lang . Object > result = java . util . Collections . EMPTY_LIST ; if ( fieldBsonObject . containsField ( dbValName ) ) { if ( cardinality == ( com . ebay . cloud . cms . metadata . model . MetaField . CardinalityEnum . One ) ) { java . lang . Object bsonValue = fieldBsonObject . get ( dbValName ) ; if ( ! ( bsonValue instanceof com . mongodb . BasicDBList ) ) { result = new java . util . ArrayList < java . lang . Object > ( 1 ) ; java . lang . Object value = handler . read ( this , bsonValue , metaField ) ; addReadValue ( result , value ) ; } } else { java . util . List < java . lang . Object > bsonList = null ; if ( ( fieldBsonObject . get ( dbValName ) ) instanceof java . util . List ) { bsonList = ( ( java . util . List < java . lang . Object > ) ( fieldBsonObject . get ( dbValName ) ) ) ; } else if ( ( fieldBsonObject . get ( dbValName ) ) != null ) { bsonList = new java . util . ArrayList < java . lang . Object > ( ) ; bsonList . add ( fieldBsonObject . get ( dbValName ) ) ; } if ( bsonList != null ) { result = new java . util . ArrayList < java . lang . Object > ( ) ; for ( java . lang . Object bsonValue : bsonList ) { java . lang . Object value = handler . read ( this , bsonValue , metaField ) ; addReadValue ( result , value ) ; } } } } return result ; }
org . junit . Assert . assertEquals ( ( ( getApp . getFieldValues ( "name" ) . get ( 0 ) . toString ( ) ) + ( getApp . getFieldValues ( "archTier" ) . get ( 0 ) . toString ( ) ) ) , getApp . getFieldValues ( "newCalName" ) . get ( 0 ) )
filterNot_A$Function1_Nil ( ) { com . m3 . scalaflavor4j . ForkJoinParSeq < java . lang . String > target = com . m3 . scalaflavor4j . ForkJoinParSeq . apply ( emptyList ) ; com . m3 . scalaflavor4j . ParSeq < java . lang . String > actual = target . filterNot ( new com . m3 . scalaflavor4j . F1 < java . lang . String , java . lang . Boolean > ( ) { public com . m3 . scalaflavor4j . Boolean apply ( java . lang . String v1 ) { return ( v1 != null ) && ( v1 . contains ( "f" ) ) ; } } ) ; "<AssertPlaceHolder>" ; } toSeq ( ) { return com . m3 . scalaflavor4j . Seq . apply ( new com . m3 . scalaflavor4j . ArrayList < T > ( collection ) ) ; }
org . junit . Assert . assertThat ( actual . toSeq ( ) . size ( ) , org . hamcrest . CoreMatchers . is ( org . hamcrest . CoreMatchers . equalTo ( 0 ) ) )
testCall1 ( ) { @ eu . toolchain . concurrent . SuppressWarnings ( "unchecked" ) final java . util . concurrent . Callable < java . lang . Object > callable = mock ( java . util . concurrent . Callable . class ) ; doReturn ( executor ) . when ( underTest ) . executor ( ) ; doReturn ( completable ) . when ( underTest ) . completable ( ) ; doReturn ( future ) . when ( underTest ) . doCall ( callable , executor , completable ) ; "<AssertPlaceHolder>" ; verify ( underTest ) . executor ( ) ; verify ( underTest ) . completable ( ) ; verify ( underTest ) . doCall ( callable , executor , completable ) ; } call ( java . util . concurrent . Callable ) { return doCall ( callable , executor ( ) , this . completable ( ) ) ; }
org . junit . Assert . assertEquals ( future , underTest . call ( callable ) )
testSingleQuotedStringCAProcessor ( ) { org . eclipse . jface . text . contentassist . IContentAssistProcessor processor = fConfig . getContentAssistProcessor ( null , RubySourceConfiguration . STRING_SINGLE ) ; "<AssertPlaceHolder>" ; } getContentAssistProcessor ( org . eclipse . jface . text . source . ISourceViewer , java . lang . String ) { return com . aptana . editor . html . HTMLSourceConfiguration . getDefault ( ) . getContentAssistProcessor ( getEditor ( ) , contentType ) ; }
org . junit . Assert . assertNull ( processor )
testRegisterEditorDiscardsEditorInstance ( ) { provider . registerEditor ( org . uberfire . client . authz . EditorTreeProviderTest . EDITOR1_ID , org . uberfire . client . authz . EditorTreeProviderTest . EDITOR1_NAME ) ; verify ( iocManager ) . destroyBean ( editorActivityCaptor . capture ( ) ) ; final org . uberfire . client . mvp . WorkbenchEditorActivity editorActivity = editorActivityCaptor . getValue ( ) ; "<AssertPlaceHolder>" ; } getIdentifier ( ) { return identifier ; }
org . junit . Assert . assertEquals ( org . uberfire . client . authz . EditorTreeProviderTest . EDITOR1_ID , editorActivity . getIdentifier ( ) )
shouldThrowProcessorStateExceptionOnOpeningReadOnlyDir ( ) { final java . io . File tmpDir = org . apache . kafka . test . TestUtils . tempDirectory ( ) ; final org . apache . kafka . test . InternalMockProcessorContext tmpContext = new org . apache . kafka . test . InternalMockProcessorContext ( tmpDir , new org . apache . kafka . streams . StreamsConfig ( org . apache . kafka . test . StreamsTestUtils . getStreamsConfig ( ) ) ) ; "<AssertPlaceHolder>" ; try { rocksDBStore . openDB ( tmpContext ) ; org . junit . Assert . fail ( "Should<sp>have<sp>thrown<sp>ProcessorStateException" ) ; } catch ( final org . apache . kafka . streams . errors . ProcessorStateException e ) { } } setReadOnly ( ) { this . isReadOnly = true ; }
org . junit . Assert . assertTrue ( tmpDir . setReadOnly ( ) )
returnBrokerDiscountTest ( ) { org . openl . rules . testmethod . TestDataAccessFieldTest . ITestDataAccessField instance = org . openl . rules . TestUtils . create ( org . openl . rules . testmethod . TestDataAccessFieldTest . FILE_NAME , org . openl . rules . testmethod . TestDataAccessFieldTest . ITestDataAccessField . class ) ; org . openl . rules . testmethod . TestUnitsResults result = instance . returnBrokerDiscountTest ( ) ; "<AssertPlaceHolder>" ; } getNumberOfFailures ( ) { int cnt = 0 ; for ( int i = 0 ; i < ( getNumberOfTestUnits ( ) ) ; i ++ ) { if ( ( testUnits . get ( i ) . getResultStatus ( ) ) != ( TestStatus . TR_OK ) ) { ++ cnt ; } } return cnt ; }
org . junit . Assert . assertEquals ( 2 , result . getNumberOfFailures ( ) )
testResponsesWithMalformedDateHeadersAreNotCacheableUsingSharedPublicCache ( ) { policy = new org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy ( 0 , true , false , false ) ; request . setHeader ( "Authorization" , "Basic<sp>QWxhZGRpbjpvcGVuIHNlc2FtZQ==" ) ; response . setHeader ( "Cache-Control" , "public" ) ; response . addHeader ( "Date" , "garbage" ) ; "<AssertPlaceHolder>" ; } isResponseCacheable ( org . apache . hc . core5 . http . HttpRequest , org . apache . hc . core5 . http . HttpResponse ) { final org . apache . hc . core5 . http . ProtocolVersion version = ( ( request . getVersion ( ) ) != null ) ? request . getVersion ( ) : org . apache . hc . core5 . http . HttpVersion . DEFAULT ; if ( ( version . compareToVersion ( HttpVersion . HTTP_1_1 ) ) > 0 ) { if ( log . isDebugEnabled ( ) ) { log . debug ( ( ( "Protocol<sp>version<sp>" + version ) + "<sp>is<sp>non-cacheable" ) ) ; } return false ; } final java . lang . String [ ] uncacheableRequestDirectives = new java . lang . String [ ] { org . apache . hc . client5 . http . cache . HeaderConstants . CACHE_CONTROL_NO_STORE } ; if ( hasCacheControlParameterFrom ( request , uncacheableRequestDirectives ) ) { log . debug ( "Response<sp>is<sp>explcitily<sp>non-cacheable<sp>per<sp>cache<sp>control<sp>directive" ) ; return false ; } if ( request . getRequestUri ( ) . contains ( "?" ) ) { if ( ( neverCache1_0ResponsesWithQueryString ) && ( from1_0Origin ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>had<sp>a<sp>query<sp>string" ) ; return false ; } else if ( ! ( isExplicitlyCacheable ( response ) ) ) { log . debug ( "Response<sp>is<sp>not<sp>cacheable<sp>as<sp>it<sp>is<sp>missing<sp>explicit<sp>caching<sp>headers" ) ; return false ; } } if ( expiresHeaderLessOrEqualToDateHeaderAndNoCacheControl ( response ) ) { log . debug ( "Expires<sp>header<sp>less<sp>or<sp>equal<sp>to<sp>Date<sp>header<sp>and<sp>no<sp>cache<sp>control<sp>directives" ) ; return false ; } if ( sharedCache ) { if ( ( ( request . countHeaders ( HeaderConstants . AUTHORIZATION ) ) > 0 ) && ( ! ( hasCacheControlParameterFrom ( response , org . apache . hc . client5 . http . impl . cache . ResponseCachingPolicy . AUTH_CACHEABLE_PARAMS ) ) ) ) { log . debug ( "Request<sp>contains<sp>private<sp>credentials" ) ; return false ; } } final java . lang . String method = request . getMethod ( ) ; return isResponseCacheable ( method , response ) ; }
org . junit . Assert . assertFalse ( policy . isResponseCacheable ( request , response ) )
usesCustomHash ( ) { final java . lang . RuntimeException exception = new java . lang . RuntimeException ( ) ; hudson . util . ConsistentHash . Hash < java . lang . String > hashFunction = new hudson . util . ConsistentHash . Hash < java . lang . String > ( ) { public java . lang . String hash ( java . lang . String str ) { throw exception ; } } ; try { hudson . util . ConsistentHash < java . lang . String > hash = new hudson . util . ConsistentHash < java . lang . String > ( hashFunction ) ; hash . add ( "foo" ) ; org . junit . Assert . fail ( "Didn't<sp>use<sp>custom<sp>hash<sp>function" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } } add ( T ) { eventList . add ( t ) ; return this ; }
org . junit . Assert . assertSame ( exception , e )
testFieldsIsSet ( ) { boolean result = fixture . fieldsIsSet ( ) ; "<AssertPlaceHolder>" ; } fieldsIsSet ( ) { return ( fFields ) != null ; }
org . junit . Assert . assertTrue ( result )
testGetCode ( ) { final nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3GemeenteCode gemeenteCode = new nl . moderniseringgba . migratie . conversie . model . lo3 . element . Lo3GemeenteCode ( "testGetCode" ) ; "<AssertPlaceHolder>" ; } getCode ( ) { return code ; }
org . junit . Assert . assertEquals ( "testGetCode" , gemeenteCode . getCode ( ) )
givenProcess_whenCreatingViaProcessBuilder_shouldSucceed ( ) { java . lang . ProcessBuilder builder = new java . lang . ProcessBuilder ( ) ; if ( org . baeldung . java . shell . JavaProcessUnitIntegrationTest . IS_WINDOWS ) { builder . command ( "cmd.exe" , "/c" , "dir" ) ; } else { builder . command ( "sh" , "-c" , "ls" ) ; } builder . directory ( new org . baeldung . java . shell . File ( homeDirectory ) ) ; java . lang . Process process = builder . start ( ) ; org . baeldung . java . shell . JavaProcessUnitIntegrationTest . StreamGobbler streamGobbler = new org . baeldung . java . shell . JavaProcessUnitIntegrationTest . StreamGobbler ( process . getInputStream ( ) , consumer ) ; java . util . concurrent . Executors . newSingleThreadExecutor ( ) . submit ( streamGobbler ) ; int exitCode = process . waitFor ( ) ; "<AssertPlaceHolder>" ; } submit ( com . baeldung . domain . Article ) { service . startProcess ( article ) ; }
org . junit . Assert . assertEquals ( 0 , exitCode )
inverseMatching ( ) { dakara . eclipse . plugin . kavi . picklist . InputCommand inputCommand = dakara . eclipse . plugin . kavi . picklist . InputCommand . parse ( "!5,def" ) ; java . util . List < dakara . eclipse . plugin . stringscore . RankedItem < dakara . eclipse . plugin . kavi . picklist . ListRankAndSelectorTest . TestItem > > listItems = rankSelectorMultiColumn . rankAndFilter ( inputCommand , itemList ) ; "<AssertPlaceHolder>" ; } rankAndFilter ( dakara . eclipse . plugin . kavi . picklist . InputCommand , java . util . List ) { if ( ( ! ( inputCommand . isColumnFiltering ) ) && ( ( inputCommand . getColumnFilterOptions ( 0 ) . rawInputText . length ( ) ) == 0 ) ) return makeRankedList ( items ) ; return items . parallelStream ( ) . map ( ( item ) -> new dakara . eclipse . plugin . stringscore . RankedItem < > ( item ) ) . map ( ( item ) -> setItemRank ( item , inputCommand ) ) . filter ( ( item ) -> ( item . totalScore ( ) ) > 0 ) . sorted ( java . util . Comparator . comparing ( ( dakara . eclipse . plugin . stringscore . RankedItem < T > item ) -> item . totalScore ( ) ) . reversed ( ) . thenComparing ( ( item ) -> sortFieldResolver . apply ( ( ( dakara . eclipse . plugin . stringscore . T ) ( item . dataItem ) ) ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; }
org . junit . Assert . assertEquals ( 5 , listItems . size ( ) )
failedPolicyCheck ( ) { org . hl7 . v3 . PRPAIN201305UV02 request = new org . hl7 . v3 . PRPAIN201305UV02 ( ) ; gov . hhs . fha . nhinc . common . nhinccommon . AssertionType assertion = new gov . hhs . fha . nhinc . common . nhinccommon . AssertionType ( ) ; org . hl7 . v3 . MCCIIN000002UV01 expectedErrorResponse = new org . hl7 . v3 . MCCIIN000002UV01 ( ) ; gov . hhs . fha . nhinc . patientdiscovery . PatientDiscoveryPolicyChecker policyChecker = mock ( gov . hhs . fha . nhinc . patientdiscovery . PatientDiscoveryPolicyChecker . class ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . error . proxy . AdapterPatientDiscoveryDeferredReqErrorProxyObjectFactory proxyErrorFactory = mock ( gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . error . proxy . AdapterPatientDiscoveryDeferredReqErrorProxyObjectFactory . class ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . error . proxy . AdapterPatientDiscoveryDeferredReqErrorProxy errorProxy = mock ( gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . error . proxy . AdapterPatientDiscoveryDeferredReqErrorProxy . class ) ; java . util . Properties webContextProperties = new java . util . Properties ( ) ; gov . hhs . fha . nhinc . patientdiscovery . audit . PatientDiscoveryDeferredRequestAuditLogger auditLogger = getAuditLogger ( true ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxyObjectFactory adapterProxyFactory = mock ( gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . proxy . AdapterPatientDiscoveryDeferredReqProxyObjectFactory . class ) ; when ( proxyErrorFactory . create ( ) ) . thenReturn ( errorProxy ) ; when ( errorProxy . processPatientDiscoveryAsyncReqError ( eq ( request ) , any ( org . hl7 . v3 . PRPAIN201306UV02 . class ) , eq ( assertion ) , any ( java . lang . String . class ) ) ) . thenReturn ( expectedErrorResponse ) ; when ( policyChecker . checkIncomingPolicy ( request , assertion ) ) . thenReturn ( false ) ; gov . hhs . fha . nhinc . patientdiscovery . inbound . deferred . request . StandardInboundPatientDiscoveryDeferredRequest standardPatientDiscovery = new gov . hhs . fha . nhinc . patientdiscovery . inbound . deferred . request . StandardInboundPatientDiscoveryDeferredRequest ( policyChecker , proxyErrorFactory , adapterProxyFactory , auditLogger ) ; org . hl7 . v3 . MCCIIN000002UV01 actualResponse = standardPatientDiscovery . respondingGatewayPRPAIN201305UV02 ( request , assertion , webContextProperties ) ; "<AssertPlaceHolder>" ; verify ( mockEJBLogger ) . auditResponseMessage ( eq ( request ) , eq ( actualResponse ) , eq ( assertion ) , isNull ( gov . hhs . fha . nhinc . common . nhinccommon . NhinTargetSystemType . class ) , eq ( NhincConstants . AUDIT_LOG_INBOUND_DIRECTION ) , eq ( NhincConstants . AUDIT_LOG_NHIN_INTERFACE ) , eq ( Boolean . FALSE ) , eq ( webContextProperties ) , eq ( NhincConstants . PATIENT_DISCOVERY_DEFERRED_REQ_SERVICE_NAME ) , any ( gov . hhs . fha . nhinc . patientdiscovery . audit . transform . PatientDiscoveryDeferredRequestAuditTransforms . class ) ) ; } respondingGatewayPRPAIN201305UV02 ( org . hl7 . v3 . PRPAIN201305UV02 , gov . hhs . fha . nhinc . common . nhinccommon . AssertionType , java . util . Properties ) { org . hl7 . v3 . PRPAIN201306UV02 response = process ( body , assertion , webContextProperties ) ; auditResponse ( body , response , assertion , webContextProperties ) ; return response ; }
org . junit . Assert . assertSame ( expectedErrorResponse , actualResponse )
whenMultipleResultsVersionCalledForNonExistingTitle_aCollectionWithNoValuesIsReturned ( ) { java . util . List < java . lang . String > isbnCodes = books . entrySet ( ) . stream ( ) . filter ( ( e ) -> e . getValue ( ) . startsWith ( "Spring" ) ) . map ( java . util . Map . Entry :: getKey ) . collect ( java . util . stream . Collectors . toList ( ) ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return ( total ) == 0 ; }
org . junit . Assert . assertTrue ( isbnCodes . isEmpty ( ) )
testMetacardTransform ( ) { ddf . catalog . impl . MockEventProcessor eventAdmin = new ddf . catalog . impl . MockEventProcessor ( ) ; ddf . catalog . impl . MockMemoryProvider provider = new ddf . catalog . impl . MockMemoryProvider ( "Provider" , "Provider" , "v1.0" , "DDF" , new java . util . HashSet < ddf . catalog . data . ContentType > ( ) , true , new java . util . Date ( ) ) ; org . osgi . framework . BundleContext context = mock ( org . osgi . framework . BundleContext . class ) ; ddf . catalog . transform . MetacardTransformer transformer = mock ( ddf . catalog . transform . MetacardTransformer . class ) ; org . osgi . framework . ServiceReference reference = mock ( org . osgi . framework . ServiceReference . class ) ; org . osgi . framework . ServiceReference [ ] serviceReferences = new org . osgi . framework . ServiceReference [ ] { reference } ; when ( context . getServiceReferences ( anyString ( ) , anyString ( ) ) ) . thenReturn ( serviceReferences ) ; when ( context . getService ( isA ( org . osgi . framework . ServiceReference . class ) ) ) . thenReturn ( transformer ) ; when ( transformer . transform ( isA ( ddf . catalog . data . Metacard . class ) , isA ( java . util . Map . class ) ) ) . thenReturn ( new ddf . catalog . data . impl . BinaryContentImpl ( null ) ) ; ddf . catalog . CatalogFramework framework = this . createDummyCatalogFramework ( provider , context , eventAdmin , true ) ; ddf . catalog . data . impl . MetacardImpl newCard = new ddf . catalog . data . impl . MetacardImpl ( ) ; newCard . setId ( null ) ; ddf . catalog . data . BinaryContent content = framework . transform ( newCard , "NONE" , new java . util . HashMap < java . lang . String , java . io . Serializable > ( ) ) ; "<AssertPlaceHolder>" ; } setId ( java . lang . String ) { this . id = id ; }
org . junit . Assert . assertNotNull ( content )
testFindByCriteria ( ) { try { qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentDTO . setHasHumanLabels ( true ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . entityManager . getTransaction ( ) . begin ( ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentDTO = qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentResourceFacadeImp . addDocument ( qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentDTO ) ; qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . entityManager . getTransaction ( ) . commit ( ) ; java . lang . String columnName = "hasHumanLabels" ; boolean value = true ; java . util . List < qa . qcri . aidr . dbmanager . dto . DocumentDTO > result = qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . documentResourceFacadeImp . findByCriteria ( columnName , value ) ; "<AssertPlaceHolder>" ; } catch ( qa . qcri . aidr . common . exception . PropertyNotSetException ex ) { qa . qcri . aidr . dbmanager . ejb . remote . facade . imp . TestDocumentResourceFacadeImp . logger . error ( ( "PropertyNotSetException<sp>while<sp>finding<sp>document<sp>by<sp>criteria<sp>" + ( ex . getMessage ( ) ) ) ) ; org . junit . Assert . fail ( "testFindByCriteria<sp>failed" ) ; } } getHasHumanLabels ( ) { return hasHumanLabels ; }
org . junit . Assert . assertEquals ( value , result . get ( 0 ) . getHasHumanLabels ( ) )
notEmpty ( ) { "<AssertPlaceHolder>" ; } newWith ( ) { org . eclipse . collections . api . bag . ImmutableBag < java . lang . String > bag = this . newBag ( ) ; org . eclipse . collections . api . bag . ImmutableBag < java . lang . String > newBag = bag . newWith ( "1" ) ; org . junit . Assert . assertNotEquals ( bag , newBag ) ; org . junit . Assert . assertEquals ( newBag . size ( ) , ( ( bag . size ( ) ) + 1 ) ) ; org . eclipse . collections . api . bag . ImmutableBag < java . lang . String > newBag2 = bag . newWith ( "5" ) ; org . junit . Assert . assertNotEquals ( bag , newBag2 ) ; org . junit . Assert . assertEquals ( newBag2 . size ( ) , ( ( bag . size ( ) ) + 1 ) ) ; org . junit . Assert . assertEquals ( 1 , newBag2 . sizeDistinct ( ) ) ; }
org . junit . Assert . assertFalse ( this . newWith ( ) . notEmpty ( ) )
testSetLunDescription ( ) { com . iwave . ext . netapp . Lun lun = new com . iwave . ext . netapp . Lun ( com . iwave . ext . netapp . LunTest . server , com . iwave . ext . netapp . LunTest . LUN_PATH ) ; lun . setLunDescription ( "testing" ) ; "<AssertPlaceHolder>" ; } setLunDescription ( java . lang . String ) { netapp . manage . NaElement elem = new netapp . manage . NaElement ( "lun-set-comment" ) ; elem . addNewChild ( "comment" , description ) ; elem . addNewChild ( "path" , path ) ; try { server . invokeElem ( elem ) ; } catch ( java . lang . Exception e ) { java . lang . String msg = "Failed<sp>to<sp>set<sp>comment<sp>on<sp>LUN<sp>path=" + ( path ) ; log . error ( msg , e ) ; throw new com . iwave . ext . netapp . NetAppException ( msg , e ) ; } }
org . junit . Assert . assertTrue ( true )
testWriterIsClosed_GoodCase ( ) { java . io . PrintWriter pw = mock ( java . io . PrintWriter . class ) ; org . oscm . operatorsvc . client . commands . GetUserOperationLogCommand comm = spy ( new org . oscm . operatorsvc . client . commands . GetUserOperationLogCommand ( ) ) ; doReturn ( pw ) . when ( comm ) . createPrintWriter ( any ( java . io . File . class ) ) ; java . lang . String fileName = org . oscm . operatorsvc . client . commands . GetUserOperationLogCommandTest . CORRECT_FILE_NAME ; java . lang . String entityType = "SUBSCR" ; java . lang . String fromDate = "2011-10-01" ; java . lang . String toDate = "2011-11-30" ; args . put ( "filename" , fileName ) ; args . put ( "entitytype" , entityType ) ; args . put ( "from" , fromDate ) ; args . put ( "to" , toDate ) ; stubCallReturn = org . oscm . operatorsvc . client . commands . GetUserOperationLogCommandTest . STUB_RETURN . getBytes ( ) ; "<AssertPlaceHolder>" ; verify ( pw , times ( 1 ) ) . close ( ) ; } run ( org . oscm . operatorsvc . client . CommandContext ) { final org . oscm . internal . vo . VOOrganization organization = new org . oscm . internal . vo . VOOrganization ( ) ; organization . setOrganizationId ( ctx . getString ( org . oscm . operatorsvc . client . commands . AddAvailablePaymentTypesCommand . ARG_ORGID ) ) ; final java . util . Set < java . lang . String > types = new java . util . HashSet < java . lang . String > ( ctx . getList ( org . oscm . operatorsvc . client . commands . AddAvailablePaymentTypesCommand . ARG_PAYMENTTYPES ) ) ; ctx . getService ( ) . addAvailablePaymentTypes ( organization , types ) ; ctx . out ( ) . println ( "The<sp>following<sp>payment<sp>types<sp>were<sp>successfully<sp>enabled:" ) ; for ( java . lang . String t : types ) { ctx . out ( ) . println ( t ) ; } return true ; }
org . junit . Assert . assertTrue ( comm . run ( ctx ) )
testExecutePersonSubscribed ( ) { sut = new org . eurekastreams . server . persistence . mappers . db . notification . GetStreamActivitySubscriptionDbMapper ( org . eurekastreams . server . domain . EntityType . PERSON ) ; ( ( org . eurekastreams . server . persistence . mappers . BaseDomainMapper ) ( sut ) ) . setEntityManager ( getEntityManager ( ) ) ; org . eurekastreams . server . persistence . mappers . requests . GetStreamActivitySubscriptionMapperRequest request = new org . eurekastreams . server . persistence . mappers . requests . GetStreamActivitySubscriptionMapperRequest ( 142 , 98 ) ; "<AssertPlaceHolder>" ; } execute ( java . util . List ) { java . util . List < java . lang . Long > personIds = new java . util . ArrayList < java . lang . Long > ( ) ; java . util . List < java . lang . Long > groupIds = new java . util . ArrayList < java . lang . Long > ( ) ; java . lang . Long id ; for ( org . eurekastreams . server . domain . dto . DisplayInfoSettable ds : inDisplaySettables ) { id = ds . getEntityId ( ) ; switch ( ds . getEntityType ( ) ) { case PERSON : if ( ! ( personIds . contains ( id ) ) ) { personIds . add ( id ) ; } break ; case GROUP : if ( ! ( groupIds . contains ( id ) ) ) { groupIds . add ( id ) ; } break ; default : break ; } } java . util . List < org . eurekastreams . server . search . modelview . PersonModelView > personDTOs = getPersonModelViewsByIdsMapper . execute ( personIds ) ; java . util . List < org . eurekastreams . server . search . modelview . DomainGroupModelView > groupDTOs = getGroupModelViewsByIdsMapper . execute ( groupIds ) ; java . util . Map < java . lang . String , org . eurekastreams . server . search . modelview . PersonModelView > peopleByAccountIdsMap = new java . util . HashMap < java . lang . String , org . eurekastreams . server . search . modelview . PersonModelView > ( ) ; java . util . Map < java . lang . String , org . eurekastreams . server . search . modelview . DomainGroupModelView > domainGroupsByShortNamesMap = new java . util . HashMap < java . lang . String , org . eurekastreams . server . search . modelview . DomainGroupModelView > ( ) ; for ( org . eurekastreams . server . search . modelview . PersonModelView person : personDTOs ) { peopleByAccountIdsMap . put ( person . getAccountId ( ) , person ) ; } for ( org . eurekastreams . server . search . modelview . DomainGroupModelView domainGroup : groupDTOs ) { domainGroupsByShortNamesMap . put ( domainGroup . getShortName ( ) , domainGroup ) ; } org . eurekastreams . server . search . modelview . PersonModelView pmv ; org . eurekastreams . server . search . modelview . DomainGroupModelView gmv ; for ( org . eurekastreams . server . domain . dto . DisplayInfoSettable ds : inDisplaySettables ) { if ( ( ds . getEntityType ( ) ) == ( org . eurekastreams . server . domain . EntityType . PERSON ) ) { pmv = peopleByAccountIdsMap . get ( ds . getStreamUniqueKey ( ) ) ; if ( pmv != null ) { ds . setAvatarId ( pmv . getAvatarId ( ) ) ; ds . setDisplayName ( pmv . getDisplayName ( ) ) ; } } else if ( ( ds . getEntityType ( ) ) == ( org . eurekastreams . server . domain . EntityType . GROUP ) ) { gmv = domainGroupsByShortNamesMap . get ( ds . getStreamUniqueKey ( ) ) ; if ( gmv != null ) { ds . setAvatarId ( gmv . getAvatarId ( ) ) ; ds . setDisplayName ( gmv . getDisplayName ( ) ) ; } } } return inDisplaySettables ; }
org . junit . Assert . assertTrue ( sut . execute ( request ) )
toString_bindingsSubsetOfVarOrder ( ) { final org . eclipse . rdf4j . query . impl . MapBindingSet originalBindingSet = new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; originalBindingSet . addBinding ( "x" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://a" ) ) ; originalBindingSet . addBinding ( "y" , org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverterTest . VF . createIRI ( "http://b" ) ) ; final org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder varOrder = new org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ( "x" , "a" , "y" , "b" ) ; final org . apache . rya . indexing . pcj . storage . accumulo . BindingSetConverter < java . lang . String > converter = new org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter ( ) ; final java . lang . String bindingSetString = converter . convert ( originalBindingSet , varOrder ) ; final java . lang . String expected = ( ( ( "http://a<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" + ( BindingSetStringConverter . NULL_VALUE_STRING ) ) + ":::" ) + "http://b<<~>>http://www.w3.org/2001/XMLSchema#anyURI:::" ) + ( BindingSetStringConverter . NULL_VALUE_STRING ) ; "<AssertPlaceHolder>" ; } convert ( java . lang . String , org . apache . rya . indexing . pcj . storage . accumulo . VariableOrder ) { requireNonNull ( bindingSetString ) ; requireNonNull ( varOrder ) ; if ( ( bindingSetString . isEmpty ( ) ) && ( varOrder . toString ( ) . isEmpty ( ) ) ) { return new org . eclipse . rdf4j . query . impl . MapBindingSet ( ) ; } final java . lang . String [ ] bindingStrings = bindingSetString . split ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . BINDING_DELIM ) ; final java . lang . String [ ] varOrderArr = varOrder . toArray ( ) ; checkArgument ( ( ( varOrderArr . length ) == ( bindingStrings . length ) ) , "The<sp>number<sp>of<sp>Bindings<sp>must<sp>match<sp>the<sp>length<sp>of<sp>the<sp>VariableOrder." ) ; final org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet bindingSet = new org . eclipse . rdf4j . query . algebra . evaluation . QueryBindingSet ( ) ; for ( int i = 0 ; i < ( bindingStrings . length ) ; i ++ ) { final java . lang . String bindingString = bindingStrings [ i ] ; if ( ! ( org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . NULL_VALUE_STRING . equals ( bindingString ) ) ) { final java . lang . String name = varOrderArr [ i ] ; final org . eclipse . rdf4j . model . Value value = org . apache . rya . indexing . pcj . storage . accumulo . BindingSetStringConverter . toValue ( bindingStrings [ i ] ) ; bindingSet . addBinding ( name , value ) ; } } return bindingSet ; }
org . junit . Assert . assertEquals ( expected , bindingSetString )
whenSetToTakesValues ( ) { final org . tessell . tests . model . dsl . BooleanProperty b = booleanProperty ( "b" , false ) ; final org . tessell . gwt . dom . client . StubElement e = new org . tessell . gwt . dom . client . StubElement ( ) ; binder . when ( b ) . is ( true ) . set ( textOf ( e ) ) . to ( "t" ) ; b . set ( true ) ; "<AssertPlaceHolder>" ; } getInnerText ( ) { return innerText ; }
org . junit . Assert . assertThat ( e . getInnerText ( ) , org . hamcrest . CoreMatchers . is ( "t" ) )
testNewMultimapWith ( ) { com . gs . collections . api . tuple . Pair < java . lang . Integer , java . lang . String > pair1 = com . gs . collections . impl . tuple . Tuples . pair ( 1 , "One" ) ; com . gs . collections . api . tuple . Pair < java . lang . Integer , java . lang . String > pair2 = com . gs . collections . impl . tuple . Tuples . pair ( 2 , "Two" ) ; com . gs . collections . api . tuple . Pair < java . lang . Integer , java . lang . String > pair3 = com . gs . collections . impl . tuple . Tuples . pair ( 3 , "Three" ) ; com . gs . collections . api . tuple . Pair < java . lang . Integer , java . lang . String > pair4 = com . gs . collections . impl . tuple . Tuples . pair ( 4 , "Four" ) ; com . gs . collections . api . list . ListIterable < com . gs . collections . api . tuple . Pair < java . lang . Integer , java . lang . String > > pairs = com . gs . collections . impl . list . mutable . FastList . newListWith ( pair1 , pair2 , pair3 , pair4 ) ; com . gs . collections . api . multimap . Multimap < java . lang . Integer , java . lang . String > expected = this . newMultimap ( pair1 , pair2 , pair3 , pair4 ) ; com . gs . collections . api . multimap . Multimap < java . lang . Integer , java . lang . String > actual = this . newMultimapFromPairs ( pairs ) ; "<AssertPlaceHolder>" ; } newMultimapFromPairs ( java . lang . Iterable ) { return com . gs . collections . impl . multimap . bag . strategy . HashBagMultimapWithHashingStrategy . newMultimap ( com . gs . collections . impl . block . factory . HashingStrategies . defaultStrategy ( ) , inputIterable ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testGetBytesOffset ( ) { final zmq . Msg msg = initMsg ( ) ; final byte [ ] dst = new byte [ 6 ] ; msg . getBytes ( 3 , dst , 1 , 2 ) ; "<AssertPlaceHolder>" ; } getBytes ( int , byte [ ] , int , int ) { int count = java . lang . Math . min ( len , ( ( size ) - index ) ) ; if ( ( data ) == null ) { java . nio . ByteBuffer dup = buf . duplicate ( ) ; dup . position ( index ) ; dup . get ( dst , off , count ) ; } else { java . lang . System . arraycopy ( data , index , dst , off , count ) ; } return count ; }
org . junit . Assert . assertThat ( dst , org . hamcrest . CoreMatchers . is ( new byte [ ] { 0 , 3 , 4 , 0 , 0 , 0 } ) )
test37 ( ) { net . pms . formats . SUP sUP0 = new net . pms . formats . SUP ( ) ; boolean b1 = net . pms . formats . FormatFactory . addFormat ( sUP0 ) ; "<AssertPlaceHolder>" ; } addFormat ( net . pms . formats . Format ) { if ( format == null ) { throw new java . lang . NullPointerException ( "format<sp>cannot<sp>be<sp>null" ) ; } net . pms . formats . FormatFactory . formatsLock . writeLock ( ) . lock ( ) ; try { return net . pms . formats . FormatFactory . formats . add ( format ) ; } finally { net . pms . formats . FormatFactory . formatsLock . writeLock ( ) . unlock ( ) ; } }
org . junit . Assert . assertTrue ( ( b1 == true ) )
iterate_loop ( ) { final org . exist . xquery . value . EmptySequence emptySequence = ( ( org . exist . xquery . value . EmptySequence ) ( Sequence . EMPTY_SEQUENCE ) ) ; final org . exist . xquery . value . SequenceIterator it = emptySequence . iterate ( ) ; int count = 0 ; while ( it . hasNext ( ) ) { it . nextItem ( ) ; count ++ ; } "<AssertPlaceHolder>" ; } nextItem ( ) { if ( ( ( pos ) == ( size ) ) || ( ( pos ) < 0 ) ) { pos = - 1 ; return null ; } return nodes [ ( ( pos ) ++ ) ] ; }
org . junit . Assert . assertEquals ( 0 , count )
shouldThrowExceptionWhenUsedMethodScopeInjectionOnArquillianResource ( ) { java . lang . reflect . Method resourceMethod = org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricherTestCase . ObjectClass3 . class . getMethod ( "testWithInjectionQualifier" , java . lang . Object . class ) ; org . mockito . Mockito . when ( resourceProvider . lookup ( ( ( org . jboss . arquillian . test . api . ArquillianResource ) ( org . mockito . Mockito . any ( ) ) ) , org . mockito . Mockito . argThat ( new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricherTestCase . CustomAnnotationMatcher ( resourceMethod . getParameterAnnotations ( ) [ 0 ] [ 1 ] , ResourceProvider . MethodInjection . class ) ) ) ) . thenReturn ( resource ) ; org . jboss . arquillian . test . spi . TestEnricher enricher = new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricher ( ) ; injector . get ( ) . inject ( enricher ) ; java . lang . Throwable cause = null ; try { enricher . resolve ( resourceMethod ) ; } catch ( java . lang . Exception ex ) { cause = ex ; } "<AssertPlaceHolder>" ; } resolve ( java . lang . reflect . Method ) { java . lang . Object [ ] values = new java . lang . Object [ method . getParameterTypes ( ) . length ] ; java . lang . Class < ? > [ ] parameterTypes = method . getParameterTypes ( ) ; for ( int i = 0 ; i < ( parameterTypes . length ) ; i ++ ) { org . jboss . arquillian . test . api . ArquillianResource resource = getResourceAnnotation ( method . getParameterAnnotations ( ) [ i ] ) ; if ( resource != null ) { java . util . List < java . lang . annotation . Annotation > qualifiers = filterAnnotations ( java . util . Arrays . asList ( method . getParameterAnnotations ( ) [ i ] ) ) ; checkPresentScopeInjection ( qualifiers , ResourceProvider . ClassInjection . class ) ; checkPresentScopeInjection ( qualifiers , ResourceProvider . MethodInjection . class ) ; org . jboss . arquillian . test . spi . enricher . resource . ResourceProvider . MethodInjection methodInjectedResource = new org . jboss . arquillian . test . impl . enricher . resource . ArquillianResourceTestEnricher . SerializableMethodInjection ( ) ; qualifiers . add ( methodInjectedResource ) ; values [ i ] = lookup ( method . getParameterTypes ( ) [ i ] , resource , qualifiers ) ; } } return values ; }
org . junit . Assert . assertEquals ( org . jboss . arquillian . test . impl . enricher . resource . IllegalStateException . class , cause . getClass ( ) )
testGetHandsComp ( ) { int [ ] expected = new int [ ] { 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 , 1 , 2 , 1 , 1 , 1 , 1 , 1 } ; "<AssertPlaceHolder>" ; } getHandsComp ( ) { return handsComp ; }
org . junit . Assert . assertArrayEquals ( expected , actual . getHandsComp ( ) )
testRevokeAllPrivilege ( ) { java . lang . String roleName = "r1" ; org . apache . sentry . provider . db . generic . service . persistent . PrivilegeObject allPrivilege = new org . apache . sentry . provider . db . generic . service . persistent . PrivilegeObject . Builder ( queryPrivilege ) . setAction ( SearchConstants . ALL ) . build ( ) ; sentryStore . alterRoleRevokePrivilege ( org . apache . sentry . provider . db . generic . service . persistent . TestPrivilegeOperatePersistence . SEARCH , roleName , allPrivilege , grantor ) ; "<AssertPlaceHolder>" ; } getPrivilegesByRole ( java . util . Set , javax . jdo . PersistenceManager ) { java . util . Set < org . apache . sentry . provider . db . generic . service . persistent . PrivilegeObject > privileges = com . google . common . collect . Sets . newHashSet ( ) ; if ( ( roles == null ) || ( ( roles . size ( ) ) == 0 ) ) { return privileges ; } javax . jdo . Query query = pm . newQuery ( org . apache . sentry . provider . db . service . model . MSentryGMPrivilege . class ) ; java . lang . StringBuilder filters = new java . lang . StringBuilder ( ) ; query . declareVariables ( "org.apache.sentry.provider.db.service.model.MSentryRole<sp>role" ) ; java . util . List < java . lang . String > rolesFiler = new java . util . LinkedList < java . lang . String > ( ) ; for ( org . apache . sentry . provider . db . service . model . MSentryRole role : roles ) { rolesFiler . add ( ( ( "role.roleName<sp>==<sp>\"" + ( role . getRoleName ( ) ) ) + "\"<sp>" ) ) ; } filters . append ( ( ( ( "roles.contains(role)<sp>" + "&&<sp>(" ) + ( com . google . common . base . Joiner . on ( "<sp>||<sp>" ) . join ( rolesFiler ) ) ) + ")" ) ) ; query . setFilter ( filters . toString ( ) ) ; java . util . List < org . apache . sentry . provider . db . service . model . MSentryGMPrivilege > mPrivileges = ( ( java . util . List < org . apache . sentry . provider . db . service . model . MSentryGMPrivilege > ) ( query . execute ( ) ) ) ; if ( ( mPrivileges == null ) || ( mPrivileges . isEmpty ( ) ) ) { return privileges ; } for ( org . apache . sentry . provider . db . service . model . MSentryGMPrivilege mPrivilege : mPrivileges ) { privileges . add ( new org . apache . sentry . provider . db . generic . service . persistent . PrivilegeObject . Builder ( ) . setComponent ( mPrivilege . getComponentName ( ) ) . setService ( mPrivilege . getServiceName ( ) ) . setAction ( mPrivilege . getAction ( ) ) . setAuthorizables ( mPrivilege . getAuthorizables ( ) ) . withGrantOption ( mPrivilege . getGrantOption ( ) ) . build ( ) ) ; } return privileges ; }
org . junit . Assert . assertEquals ( com . google . common . collect . Sets . newHashSet ( ) , sentryStore . getPrivilegesByRole ( org . apache . sentry . provider . db . generic . service . persistent . TestPrivilegeOperatePersistence . SEARCH , com . google . common . collect . Sets . newHashSet ( roleName ) ) )
testMaxTag ( ) { io . protostuff . runtime . RuntimeSchema < io . protostuff . runtime . RuntimeSchemaTagTest . MaxTag > schema = io . protostuff . runtime . RuntimeSchema . createFrom ( io . protostuff . runtime . RuntimeSchemaTagTest . MaxTag . class ) ; "<AssertPlaceHolder>" ; } createFrom ( java . lang . Class ) { return io . protostuff . runtime . RuntimeSchema . createFrom ( typeClass , io . protostuff . runtime . RuntimeSchema . NO_EXCLUSIONS , io . protostuff . runtime . RuntimeEnv . ID_STRATEGY ) ; }
org . junit . Assert . assertNotNull ( schema )
testLocalVariableLevelSuppression ( ) { net . sourceforge . pmd . Report rpt = new net . sourceforge . pmd . Report ( ) ; runTestFromString ( net . sourceforge . pmd . lang . apex . SuppressWarningsTest . TEST8 , new net . sourceforge . pmd . lang . apex . FooRule ( ) , rpt , net . sourceforge . pmd . lang . LanguageRegistry . getLanguage ( ApexLanguageModule . NAME ) . getDefaultVersion ( ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return rules . size ( ) ; }
org . junit . Assert . assertEquals ( 1 , rpt . size ( ) )
testOpschonenVoiscBerichtenNullDate ( ) { final java . util . Date ouderDan = null ; final int aantalOpgeschoond = subject . opschonenVoiscBerichten ( ouderDan ) ; org . mockito . Mockito . verifyNoMoreInteractions ( voiscDatabase , voiscConfiguratie , voiscMailbox , voiscQueue ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertEquals ( 0 , aantalOpgeschoond )
ensureLazy ( ) { org . eclipse . collections . impl . lazy . CompositeIterable < java . lang . Integer > iterables = new org . eclipse . collections . impl . lazy . CompositeIterable ( ) ; java . util . List < java . lang . Integer > expected = org . eclipse . collections . impl . list . Interval . oneTo ( 5 ) ; iterables . add ( expected ) ; iterables . add ( ( ) -> { throw new java . lang . RuntimeException ( "Iterator<sp>should<sp>not<sp>be<sp>invoked<sp>eagerly" ) ; } ) ; "<AssertPlaceHolder>" ; } take ( int ) { return null ; }
org . junit . Assert . assertEquals ( expected , iterables . take ( expected . size ( ) ) . toList ( ) )
shouldReadIscChildIdentityXml ( ) { net . ripe . rpki . commons . provisioning . x509 . ProvisioningIdentityCertificate childCert = extractCarolIdentityCert ( ) ; "<AssertPlaceHolder>" ; } extractCarolIdentityCert ( ) { java . lang . String childIdXml = com . google . common . io . Files . toString ( new java . io . File ( ( ( net . ripe . rpki . commons . provisioning . interop . ProcessIscUpdownPdusTest . PATH_TO_TEST_PDUS ) + "/carol-child-id.xml" ) ) , Charsets . UTF_8 ) ; net . ripe . rpki . commons . provisioning . identity . ChildIdentitySerializer serializer = new net . ripe . rpki . commons . provisioning . identity . ChildIdentitySerializer ( ) ; net . ripe . rpki . commons . provisioning . identity . ChildIdentity childId = serializer . deserialize ( childIdXml ) ; net . ripe . rpki . commons . provisioning . x509 . ProvisioningIdentityCertificate childCert = childId . getIdentityCertificate ( ) ; return childCert ; }
org . junit . Assert . assertNotNull ( childCert )
testIsolated_NonCyclic ( ) { int [ ] [ ] g = new int [ ] [ ] { new int [ ] { 1 } , new int [ ] { 0 , 2 } , new int [ ] { 1 , 3 } , new int [ ] { 2 , 4 } , new int [ ] { 3 } } ; org . openscience . cdk . ringsearch . CyclicVertexSearch search = new org . openscience . cdk . ringsearch . RegularCyclicVertexSearch ( g ) ; "<AssertPlaceHolder>" ; } cyclic ( ) { return org . openscience . cdk . ringsearch . RegularCyclicVertexSearch . toArray ( cyclic ) ; }
org . junit . Assert . assertThat ( search . cyclic ( ) , org . hamcrest . CoreMatchers . is ( new int [ 0 ] ) )
testContainsWithIn ( ) { au . gov . ga . earthsci . core . temporal . BigTime start = new au . gov . ga . earthsci . core . temporal . BigTime ( java . math . BigInteger . valueOf ( 1000 ) ) ; au . gov . ga . earthsci . core . temporal . BigTime end = new au . gov . ga . earthsci . core . temporal . BigTime ( java . math . BigInteger . valueOf ( 10000 ) ) ; au . gov . ga . earthsci . core . temporal . timescale . BasicTimePeriod period1 = au . gov . ga . earthsci . core . temporal . timescale . BasicTimePeriod . Builder . buildTimePeriod ( "id" , "name" , "description" ) . from ( start , true ) . to ( end , true ) . atLevel ( au . gov . ga . earthsci . core . temporal . timescale . BasicTimePeriodTest . level1 ) . build ( ) ; au . gov . ga . earthsci . core . temporal . BigTime test = new au . gov . ga . earthsci . core . temporal . BigTime ( java . math . BigInteger . valueOf ( 1000 ) ) ; "<AssertPlaceHolder>" ; } contains ( au . gov . ga . earthsci . common . math . vector . Vector3 ) { if ( point == null ) { return false ; } return ( ( xRange . contains ( point . x ) ) && ( yRange . contains ( point . y ) ) ) && ( zRange . contains ( point . z ) ) ; }
org . junit . Assert . assertTrue ( period1 . contains ( test ) )
testAdvanced ( ) { org . eclipse . swt . graphics . GC gc = new org . eclipse . swt . graphics . GC ( display , org . eclipse . swt . SWT . NONE ) ; gc . setAdvanced ( true ) ; "<AssertPlaceHolder>" ; } getAdvanced ( ) { checkDisposed ( ) ; return advanced ; }
org . junit . Assert . assertTrue ( gc . getAdvanced ( ) )
testNoAuthZLlapClusterInfo ( ) { java . lang . String instanceId1 = java . util . UUID . randomUUID ( ) . toString ( ) ; miniHS2_1 . start ( getConfOverlay ( instanceId1 ) ) ; java . sql . Connection hs2Conn = getConnection ( miniHS2_1 . getJdbcURL ( ) , "user1" ) ; boolean caughtException = false ; java . sql . Statement stmt = hs2Conn . createStatement ( ) ; try { stmt . execute ( "set<sp>hive.llap.daemon.service.hosts=@localhost" ) ; stmt . execute ( "llap<sp>cluster<sp>-info" ) ; } catch ( java . sql . SQLException e ) { caughtException = true ; } finally { stmt . close ( ) ; hs2Conn . close ( ) ; } "<AssertPlaceHolder>" ; } close ( ) { mComputeServiceContext . close ( ) ; }
org . junit . Assert . assertEquals ( false , caughtException )
checkDoesNotEquivalateToSeveralPaWithoutBroadcasts ( ) { org . atlasapi . media . entity . Item item = new org . atlasapi . media . entity . Item ( ) ; item . setPublisher ( Publisher . ARQIVA ) ; item . setCanonicalUri ( "target" ) ; java . util . List < org . atlasapi . equiv . results . scores . ScoredCandidates < org . atlasapi . media . entity . Item > > equivalents = getScoredCandidates ( 5.0 , 5.0 , 4.7 , 4.7 ) ; org . atlasapi . equiv . results . EquivalenceResult equivalenceResult = resultBuilder . resultFor ( item , equivalents , new org . atlasapi . equiv . results . description . DefaultDescription ( ) , equivToTelescopeResults ) ; "<AssertPlaceHolder>" ; } strongEquivalences ( ) { return results . stream ( ) . map ( EquivalenceResult :: strongEquivalences ) . map ( Multimap :: values ) . flatMap ( Collection :: stream ) . map ( ScoredCandidate :: candidate ) . collect ( com . metabroadcast . common . stream . MoreCollectors . toImmutableSet ( ) ) ; }
org . junit . Assert . assertTrue ( ( ( equivalenceResult . strongEquivalences ( ) . values ( ) . size ( ) ) == 1 ) )
testSetDefaultWebEngine ( ) { com . lynden . gmapsfx . javascript . JavascriptRuntime . setDefaultWebEngine ( mockWebEngine ) ; "<AssertPlaceHolder>" ; } setDefaultWebEngine ( com . lynden . gmapsfx . javascript . IWebEngine ) { com . lynden . gmapsfx . javascript . JavascriptRuntime . engine = e ; }
org . junit . Assert . assertEquals ( mockWebEngine , JavascriptRuntime . engine )
decode ( ) { final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . SWFDecoder decoder = new com . flagstone . transform . coder . SWFDecoder ( stream ) ; fixture = new com . flagstone . transform . action . ActionData ( decoder . readBytes ( new byte [ data . length ] ) ) ; "<AssertPlaceHolder>" ; } getData ( ) { return java . util . Arrays . copyOf ( data , data . length ) ; }
org . junit . Assert . assertArrayEquals ( data , fixture . getData ( ) )
testGetValueWithRawValue ( ) { when ( view . getValue ( ) ) . thenReturn ( "value" ) ; final java . lang . String expected = "\"value\"" ; final java . lang . String actual = stringSelector . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return rootPath ; }
org . junit . Assert . assertEquals ( expected , actual )
saveDescriptorWhenIAmOwner ( ) { org . xwiki . wiki . descriptor . WikiDescriptor oldDescriptor = mock ( org . xwiki . wiki . descriptor . WikiDescriptor . class ) ; when ( oldDescriptor . getId ( ) ) . thenReturn ( "wikiId" ) ; when ( oldDescriptor . getOwnerId ( ) ) . thenReturn ( "mainWiki:XWiki.User" ) ; when ( wikiDescriptorManager . getById ( oldDescriptor . getId ( ) ) ) . thenReturn ( oldDescriptor ) ; org . xwiki . wiki . descriptor . WikiDescriptor descriptor = new org . xwiki . wiki . descriptor . WikiDescriptor ( oldDescriptor . getId ( ) , "wikiAlias" ) ; descriptor . setOwnerId ( oldDescriptor . getOwnerId ( ) ) ; boolean result = mocker . getComponentUnderTest ( ) . saveDescriptor ( descriptor ) ; "<AssertPlaceHolder>" ; verify ( oldDescriptor , times ( 2 ) ) . getOwnerId ( ) ; verify ( wikiDescriptorManager ) . saveDescriptor ( descriptor ) ; } saveDescriptor ( org . xwiki . wiki . descriptor . WikiDescriptor ) { try { this . wikiDescriptorBuilderProvider . get ( ) . save ( descriptor ) ; } catch ( org . xwiki . wiki . internal . descriptor . builder . WikiDescriptorBuilderException e ) { throw new org . xwiki . wiki . manager . WikiManagerException ( java . lang . String . format ( "Unable<sp>to<sp>save<sp>wiki<sp>descriptor<sp>for<sp>[%s]." , descriptor . getId ( ) ) , e ) ; } }
org . junit . Assert . assertTrue ( result )
should_be_building_before_post_production_state ( ) { com . groupon . jenkins . dynamic . build . CurrentBuildState currentBuildState = new com . groupon . jenkins . dynamic . build . CurrentBuildState ( "NOT_STARTED" , hudson . model . Result . NOT_BUILT ) ; "<AssertPlaceHolder>" ; } isBuilding ( ) { return ( state ) == null ? false : ( com . groupon . jenkins . dynamic . build . CurrentBuildState . State . valueOf ( state ) . compareTo ( com . groupon . jenkins . dynamic . build . CurrentBuildState . State . POST_PRODUCTION ) ) < 0 ; }
org . junit . Assert . assertTrue ( currentBuildState . isBuilding ( ) )
testBytes1 ( ) { java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; org . apache . wss4j . common . util . CRLFOutputStream crlfOutputStream = new org . apache . wss4j . common . util . CRLFOutputStream ( baos ) ; crlfOutputStream . write ( "aaaaaaaaaa" . getBytes ( ) ) ; crlfOutputStream . close ( ) ; "<AssertPlaceHolder>" ; } close ( ) { cache . clear ( ) ; ids . clear ( ) ; }
org . junit . Assert . assertArrayEquals ( "aaaaaaaaaa" . getBytes ( ) , baos . toByteArray ( ) )
return_empty_set_apache_commons ( ) { @ com . levelup . java . collections . SuppressWarnings ( "unchecked" ) java . util . Set < java . lang . String > emptySet = org . apache . commons . collections . SetUtils . EMPTY_SET ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertTrue ( emptySet . isEmpty ( ) )
testGetHandler ( ) { jerseyServer . start ( ) ; com . englishtown . vertx . jersey . JerseyHandler handler = jerseyServer . getHandler ( ) ; "<AssertPlaceHolder>" ; } getHandler ( ) { return jerseyHandler ; }
org . junit . Assert . assertEquals ( jerseyHandler , handler )
testRemoveClusterDefaultCluster ( ) { com . orientechnologies . orient . core . metadata . schema . OClass clazz = db . getMetadata ( ) . getSchema ( ) . createClass ( "Test" , 1 , null ) ; clazz . addCluster ( "TestOneMore" ) ; clazz . removeClusterId ( db . getClusterIdByName ( "Test" ) ) ; db . getMetadata ( ) . getSchema ( ) . reload ( ) ; clazz = db . getMetadata ( ) . getSchema ( ) . getClass ( "Test" ) ; "<AssertPlaceHolder>" ; } getDefaultClusterId ( ) { return defaultClusterId ; }
org . junit . Assert . assertEquals ( clazz . getDefaultClusterId ( ) , db . getClusterIdByName ( "TestOneMore" ) )
shouldRejectNullClustersObject ( ) { org . openstack . atlas . api . validation . results . ValidatorResult result = clustersValidator . validate ( null , HttpRequestType . POST ) ; "<AssertPlaceHolder>" ; } resultMessage ( org . openstack . atlas . api . validation . results . ValidatorResult , java . lang . Enum ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; if ( ! ( result . passedValidation ( ) ) ) { java . util . List < org . openstack . atlas . api . validation . results . ExpectationResult > ers = result . getValidationResults ( ) ; sb . append ( java . lang . String . format ( "ON<sp>%s<sp>result.withMessage([" , ctx . toString ( ) ) ) ; for ( org . openstack . atlas . api . validation . results . ExpectationResult er : ers ) { sb . append ( java . lang . String . format ( "%s" , er . getMessage ( ) ) ) ; sb . append ( "])" ) ; } } else { sb . append ( java . lang . String . format ( "On<sp>%s<sp>All<sp>Expectations<sp>PASSED\n" , ctx . toString ( ) ) ) ; } return sb . toString ( ) ; }
org . junit . Assert . assertFalse ( resultMessage ( result , HttpRequestType . POST ) , result . passedValidation ( ) )
testMaskAndShifts ( ) { inra . ijpb . morphology . Strel strel = ShiftedCross3x3Strel . RIGHT ; int [ ] [ ] shifts = strel . getShifts ( ) ; int [ ] [ ] mask = strel . getMask ( ) ; int [ ] offset = strel . getOffset ( ) ; for ( int s = 0 ; s < ( shifts . length ) ; s ++ ) { int [ ] shift = shifts [ s ] ; int indX = ( shift [ 0 ] ) + ( offset [ 0 ] ) ; int indY = ( shift [ 1 ] ) + ( offset [ 1 ] ) ; "<AssertPlaceHolder>" ; } } getOffset ( ) { int intRadius = ( ( int ) ( java . lang . Math . round ( xRadius ) ) ) ; return new int [ ] { intRadius , intRadius , intRadius } ; }
org . junit . Assert . assertEquals ( 255 , mask [ indY ] [ indX ] )
testBuildDBNameNewEncoding ( ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildDBName]" ) ) + "--------<sp>The<sp>schema<sp>name<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp>the<sp>notified/defaulted<sp>service" ) ) ; java . lang . String attrPersistence = null ; java . lang . String batchSize = null ; java . lang . String batchTime = null ; java . lang . String batchTTL = null ; java . lang . String dataModel = null ; java . lang . String enableEncoding = "true" ; java . lang . String enableGrouping = null ; java . lang . String enableLowercase = null ; java . lang . String host = null ; java . lang . String password = null ; java . lang . String port = null ; java . lang . String username = null ; java . lang . String cache = null ; com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink sink = new com . telefonica . iot . cygnus . sinks . NGSIPostgreSQLSink ( ) ; sink . configure ( createContext ( attrPersistence , batchSize , batchTime , batchTTL , dataModel , enableEncoding , enableGrouping , enableLowercase , host , password , port , username , cache ) ) ; java . lang . String service = "someService" ; try { java . lang . String builtSchemaName = sink . buildSchemaName ( service ) ; java . lang . String expectedDBName = "somex0053ervice" ; try { "<AssertPlaceHolder>" ; System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildDBName]" ) ) + "-<sp>OK<sp>-<sp>'" ) + expectedDBName ) + "'<sp>is<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service>" ) ) ; } catch ( java . lang . AssertionError e ) { System . out . println ( ( ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildDBName]" ) ) + "-<sp>FAIL<sp>-<sp>'" ) + expectedDBName ) + "'<sp>is<sp>not<sp>equals<sp>to<sp>the<sp>encoding<sp>of<sp><service>" ) ) ; throw e ; } } catch ( java . lang . Exception e ) { System . out . println ( ( ( getTestTraceHead ( "[NGSIPostgreSQLSink.buildDBName]" ) ) + "-<sp>FAIL<sp>-<sp>There<sp>was<sp>some<sp>problem<sp>when<sp>building<sp>the<sp>DB<sp>name" ) ) ; throw e ; } buildSchemaName ( java . lang . String ) { java . lang . String name = com . telefonica . iot . cygnus . utils . NGSICharsets . encodePostgreSQL ( service ) ; if ( ( name . length ( ) ) > ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) { throw new com . telefonica . iot . cygnus . errors . CygnusBadConfiguration ( ( ( ( "Building<sp>schema<sp>name<sp>'" + name ) + "'<sp>and<sp>its<sp>length<sp>is<sp>greater<sp>than<sp>" ) + ( com . telefonica . iot . cygnus . utils . NGSIConstants . POSTGRESQL_MAX_NAME_LEN ) ) ) ; } return name ; }
org . junit . Assert . assertEquals ( expectedDBName , builtSchemaName )
testDateMinusTimestampValues ( ) { java . lang . String sqlText = "values<sp>date('2011-06-04')<sp>-<sp>timestamp('2011-06-05',<sp>'05:06:00')" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . SimpleDateArithmeticIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "----\n" + "-1<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
testGetBusinessObjectDataAttributesSubPartitionValuesCount3 ( ) { org . finra . herd . model . api . xml . BusinessObjectDataKey businessObjectDataKey = new org . finra . herd . model . api . xml . BusinessObjectDataKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , java . util . Arrays . asList ( org . finra . herd . rest . SUBPARTITION_VALUES . get ( 0 ) , org . finra . herd . rest . SUBPARTITION_VALUES . get ( 1 ) , org . finra . herd . rest . SUBPARTITION_VALUES . get ( 2 ) ) , DATA_VERSION ) ; org . finra . herd . model . api . xml . BusinessObjectDataAttributeKeys businessObjectDataAttributeKeys = new org . finra . herd . model . api . xml . BusinessObjectDataAttributeKeys ( java . util . Arrays . asList ( new org . finra . herd . model . api . xml . BusinessObjectDataAttributeKey ( BDEF_NAMESPACE , BDEF_NAME , FORMAT_USAGE_CODE , FORMAT_FILE_TYPE_CODE , FORMAT_VERSION , PARTITION_VALUE , NO_SUBPARTITION_VALUES , DATA_VERSION , ATTRIBUTE_NAME_1_MIXED_CASE ) ) ) ; when ( businessObjectDataAttributeService . getBusinessObjectDataAttributes ( businessObjectDataKey ) ) . thenReturn ( businessObjectDataAttributeKeys ) ; org . finra . herd . model . api . xml . BusinessObjectDataAttributeKeys result = businessObjectDataAttributeRestController . getBusinessObjectDataAttributes ( org . finra . herd . rest . BDEF_NAMESPACE , org . finra . herd . rest . BDEF_NAME , org . finra . herd . rest . FORMAT_USAGE_CODE , org . finra . herd . rest . FORMAT_FILE_TYPE_CODE , org . finra . herd . rest . FORMAT_VERSION , org . finra . herd . rest . PARTITION_VALUE , org . finra . herd . rest . SUBPARTITION_VALUES . get ( 0 ) , org . finra . herd . rest . SUBPARTITION_VALUES . get ( 1 ) , org . finra . herd . rest . SUBPARTITION_VALUES . get ( 2 ) , org . finra . herd . rest . DATA_VERSION ) ; verify ( businessObjectDataAttributeService ) . getBusinessObjectDataAttributes ( businessObjectDataKey ) ; verifyNoMoreInteractionsHelper ( ) ; "<AssertPlaceHolder>" ; } verifyNoMoreInteractionsHelper ( ) { verifyNoMoreInteractions ( awsHelper , javaPropertiesHelper , retryPolicyFactory , s3Operations ) ; }
org . junit . Assert . assertEquals ( businessObjectDataAttributeKeys , result )