input
stringlengths
28
18.7k
output
stringlengths
39
1.69k
testCount_Collection ( ) { final java . util . HashSet < java . lang . Integer > set = new java . util . HashSet < java . lang . Integer > ( ) ; set . add ( 1 ) ; set . add ( 2 ) ; com . googlecode . aviator . runtime . function . seq . SeqCountFunction fun = new com . googlecode . aviator . runtime . function . seq . SeqCountFunction ( ) ; com . googlecode . aviator . runtime . type . AviatorObject result = fun . call ( null , new com . googlecode . aviator . runtime . type . AviatorRuntimeJavaType ( set ) ) ; "<AssertPlaceHolder>" ; } getValue ( java . util . Map ) { return ( "/" + ( this . pattern . pattern ( ) ) ) + "/" ; }
org . junit . Assert . assertEquals ( 2 , result . getValue ( null ) )
persisteerPersoonslijstAnummerNull ( ) { try { service . persisteerPersoonslijst ( maakBrpPersoonslijst ( ) , null ) ; org . junit . Assert . fail ( "Er<sp>wordt<sp>een<sp>NullPointerException<sp>verwacht" ) ; } catch ( final nl . moderniseringgba . migratie . conversie . validatie . InputValidationException ive ) { org . junit . Assert . fail ( "Geen<sp>InputValidationException<sp>verwacht" ) ; } catch ( final java . lang . NullPointerException npe ) { "<AssertPlaceHolder>" ; } } getMessage ( ) { return message ; }
org . junit . Assert . assertTrue ( ( ( npe . getMessage ( ) ) != null ) )
testGetIndexFamilies ( ) { java . util . List < uk . ac . bbsrc . tgac . miso . core . data . IndexFamily > list = dao . getIndexFamilies ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
org . junit . Assert . assertEquals ( 12 , list . size ( ) )
testValideEnGeauthenticeerdBericht ( ) { nl . bzk . brp . business . dto . BerichtResultaat resultaat = getWebService ( ) . voerBerichtUit ( getBerichtVerwerker ( ) , getBericht ( ) ) ; org . mockito . Mockito . verify ( getBerichtVerwerker ( ) ) . verwerkBericht ( org . mockito . Mockito . any ( nl . bzk . brp . business . dto . BRPBericht . class ) , org . mockito . Mockito . any ( nl . bzk . brp . business . dto . BerichtContext . class ) ) ; "<AssertPlaceHolder>" ; } getMeldingen ( ) { return java . util . Collections . unmodifiableSet ( meldingen ) ; }
org . junit . Assert . assertEquals ( 0 , resultaat . getMeldingen ( ) . size ( ) )
add ( ) { part1 . SinglyLinkedList list = new part1 . SinglyLinkedList ( ) ; list . add ( 0 ) ; "<AssertPlaceHolder>" ; } size ( ) { part1 . SinglyLinkedList . Node current = start ; int result = 0 ; while ( current != null ) { current = current . next ; result ++ ; } return result ; }
org . junit . Assert . assertSame ( 1 , list . size ( ) )
shouldSetDefaultIfUserSetsAsDefault ( ) { groupRateLimit2 . setDefault ( true ) ; groupRateLimit2 . setId ( 2 ) ; when ( groupRepository . getAll ( ) ) . thenReturn ( groupRateLimitList ) ; groupService . updateGroupDefaults ( groupRateLimit2 ) ; "<AssertPlaceHolder>" ; } getDefault ( ) { return new org . openstack . atlas . api . mgmt . helpers . LDAPTools . UncertainCertIgnoreingSSLFactory ( ) ; }
org . junit . Assert . assertTrue ( groupRateLimit2 . getDefault ( ) )
testProcessSong ( ) { java . lang . String testName = "testName" ; org . bff . javampd . processor . NameTagProcessor nameTagProcessor = new org . bff . javampd . processor . NameTagProcessor ( ) ; org . bff . javampd . song . MPDSong song = new org . bff . javampd . song . MPDSong ( "testFile" , "testTitle" ) ; java . lang . String line = "Name:" + testName ; nameTagProcessor . processTag ( song , line ) ; "<AssertPlaceHolder>" ; } getName ( ) { if ( ( ( super . getName ( ) ) == null ) || ( "" . equals ( super . getName ( ) ) ) ) { return getTitle ( ) ; } else { return super . getName ( ) ; } }
org . junit . Assert . assertEquals ( testName , song . getName ( ) )
plainObjectValue ( ) { final java . lang . Object someObject = new java . lang . Object ( ) ; final java . lang . Object defaultObject = new java . lang . Object ( ) ; final org . jboss . msc . value . Value < java . lang . Object > value = new org . jboss . msc . value . DefaultValue < java . lang . Object > ( new org . jboss . msc . value . ImmediateValue < java . lang . Object > ( someObject ) , new org . jboss . msc . value . ImmediateValue < java . lang . Object > ( defaultObject ) ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return ( count ) ++ ; }
org . junit . Assert . assertSame ( someObject , value . getValue ( ) )
testCreateRequest ( ) { org . kaaproject . kaa . client . persistence . KaaClientState clientState = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . persistence . KaaClientState . class ) ; org . kaaproject . kaa . client . event . EventManager manager = org . mockito . Mockito . mock ( org . kaaproject . kaa . client . event . EventManager . class ) ; org . kaaproject . kaa . common . endpoint . gen . Event event1 = new org . kaaproject . kaa . common . endpoint . gen . Event ( ) ; event1 . setSeqNum ( 1 ) ; org . kaaproject . kaa . common . endpoint . gen . Event event2 = new org . kaaproject . kaa . common . endpoint . gen . Event ( ) ; event2 . setSeqNum ( 2 ) ; org . mockito . Mockito . when ( manager . pollPendingEvents ( ) ) . thenReturn ( java . util . Arrays . asList ( event1 , event2 ) ) ; org . kaaproject . kaa . client . channel . EventTransport transport = new org . kaaproject . kaa . client . channel . impl . transports . DefaultEventTransport ( clientState ) ; transport . createEventRequest ( 1 ) ; transport . setEventManager ( manager ) ; transport . createEventRequest ( 2 ) ; transport . onEventResponse ( new org . kaaproject . kaa . common . endpoint . gen . EventSyncResponse ( new org . kaaproject . kaa . common . endpoint . gen . EventSequenceNumberResponse ( 0 ) , null , null ) ) ; org . mockito . Mockito . verify ( manager , org . mockito . Mockito . times ( 1 ) ) . fillEventListenersSyncRequest ( org . mockito . Mockito . any ( org . kaaproject . kaa . common . endpoint . gen . EventSyncRequest . class ) ) ; transport . createEventRequest ( 3 ) ; org . kaaproject . kaa . common . endpoint . gen . EventSyncRequest request = transport . createEventRequest ( 4 ) ; "<AssertPlaceHolder>" ; } getEvents ( ) { return events ; }
org . junit . Assert . assertEquals ( 2 , request . getEvents ( ) . size ( ) )
testMetaData ( ) { org . pentaho . reporting . engine . classic . core . metadata . ExpressionMetaData [ ] m = org . pentaho . reporting . engine . classic . core . metadata . ExpressionRegistry . getInstance ( ) . getAllExpressionMetaDatas ( ) ; java . util . List list = super . performTest ( m ) ; "<AssertPlaceHolder>" ; } performTest ( M extends org . pentaho . reporting . engine . classic . core . metadata . MetaData [ ] ) { final java . util . ArrayList < M > retval = new java . util . ArrayList < M > ( ) ; for ( final M metaData : testData ) { if ( metaData == null ) { logger . warn ( "Null<sp>encountered" ) ; continue ; } clear ( ) ; performTestOnElement ( metaData ) ; System . err . flush ( ) ; try { java . lang . Thread . sleep ( 25 ) ; } catch ( final java . lang . InterruptedException e ) { } java . util . ArrayList < java . lang . String > missingProperties = getMissingProperties ( ) ; for ( int x = 0 ; x < ( missingProperties . size ( ) ) ; x ++ ) { final java . lang . String property = missingProperties . get ( x ) ; System . out . println ( property ) ; } if ( ( missingProperties . isEmpty ( ) ) == false ) { retval . add ( metaData ) ; missingProperties . clear ( ) ; } System . out . flush ( ) ; try { java . lang . Thread . sleep ( 25 ) ; } catch ( final java . lang . InterruptedException e ) { } } return retval ; }
org . junit . Assert . assertEquals ( new java . util . ArrayList ( ) , list )
testCreate_wrong_pattern ( ) { com . github . mygreen . supercsv . builder . FieldAccessor field = getFieldAccessor ( com . github . mygreen . supercsv . cellprocessor . conversion . RegexReplaceFactoryTest . ErrorCsv . class , "col_wrong_pattern" , comparator ) ; com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder builder = ( ( com . github . mygreen . supercsv . builder . standard . StringProcessorBuilder ) ( builderResolver . resolve ( java . lang . String . class ) ) ) ; com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < java . lang . String > formatter = builder . getFormatter ( field , config ) ; com . github . mygreen . supercsv . annotation . conversion . CsvRegexReplace anno = field . getAnnotationsByGroup ( com . github . mygreen . supercsv . annotation . conversion . CsvRegexReplace . class , groupEmpty ) . get ( 0 ) ; try { factory . create ( anno , java . util . Optional . empty ( ) , field , formatter , config ) ; org . junit . Assert . fail ( ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" . isInstanceOf ( com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException . class ) . hasMessage ( "'%s'<sp><sp>@CsvRegexReplace<sp><sp>'regex'<sp>test)test" , field . getNameWithClass ( ) ) ; } } create ( com . github . mygreen . supercsv . annotation . constraint . CsvNumberMax , java . util . Optional , com . github . mygreen . supercsv . builder . FieldAccessor , com . github . mygreen . supercsv . cellprocessor . format . TextFormatter , com . github . mygreen . supercsv . builder . Configuration ) { @ com . github . mygreen . supercsv . cellprocessor . constraint . SuppressWarnings ( "unchecked" ) final com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > typeFormatter = ( ( com . github . mygreen . supercsv . cellprocessor . format . TextFormatter < N > ) ( formatter ) ) ; final N max ; try { max = typeFormatter . parse ( anno . value ( ) ) ; } catch ( com . github . mygreen . supercsv . cellprocessor . format . TextParseException e ) { throw new com . github . mygreen . supercsv . exception . SuperCsvInvalidAnnotationException ( anno , com . github . mygreen . supercsv . localization . MessageBuilder . create ( "anno.attr.invalidType" ) . var ( "property" , field . getNameWithClass ( ) ) . varWithAnno ( "anno" , anno . annotationType ( ) ) . var ( "attrName" , "value" ) . var ( "attrValue" , anno . value ( ) ) . varWithClass ( "type" , field . getType ( ) ) . var ( "pattern" , typeFormatter . getPattern ( ) . orElseGet ( null ) ) . format ( true ) , e ) ; } final com . github . mygreen . supercsv . cellprocessor . constraint . NumberMax < N > processor = next . map ( ( n ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter , n ) ) . orElseGet ( ( ) -> new NumberMax < com . github . mygreen . supercsv . cellprocessor . constraint . N > ( max , anno . inclusive ( ) , typeFormatter ) ) ; processor . setValidationMessage ( anno . message ( ) ) ; return java . util . Optional . of ( processor ) ; }
org . junit . Assert . assertThat ( e )
testGetResourceName ( ) { final java . lang . String resourceName = "aplicacao" ; final br . eti . clairton . vraptor . crud . controller . CrudController < br . eti . clairton . vraptor . crud . model . Aplicacao > resourceable = new br . eti . clairton . vraptor . crud . controller . CrudController < br . eti . clairton . vraptor . crud . model . Aplicacao > ( br . eti . clairton . vraptor . crud . model . Aplicacao . class , null , null , br . eti . clairton . inflector . Inflector . getForLocale ( Locale . pt_BR ) , null , null ) { } ; "<AssertPlaceHolder>" ; } getResourceName ( ) { return resourceName ; }
org . junit . Assert . assertEquals ( resourceName , resourceable . getResourceName ( ) )
getBooleanFalse ( ) { final java . lang . Integer value = 0 ; final io . trane . ndbc . value . IntegerValue wrapper = new io . trane . ndbc . value . IntegerValue ( value ) ; "<AssertPlaceHolder>" ; } getBoolean ( ) { return ( get ( ) ) == 1 ; }
org . junit . Assert . assertEquals ( false , wrapper . getBoolean ( ) )
getGenreReturnsNegativeOneIfBothTagsDoNotExist ( ) { com . mpatric . mp3agic . ID3Wrapper wrapper = new com . mpatric . mp3agic . ID3Wrapper ( null , null ) ; "<AssertPlaceHolder>" ; } getGenre ( ) { if ( ( ( id3v2Tag ) != null ) && ( ( id3v2Tag . getGenre ( ) ) != ( - 1 ) ) ) { return id3v2Tag . getGenre ( ) ; } else if ( ( id3v1Tag ) != null ) { return id3v1Tag . getGenre ( ) ; } else { return - 1 ; } }
org . junit . Assert . assertEquals ( ( - 1 ) , wrapper . getGenre ( ) )
happyCase ( ) { final java . lang . String newNotes = "Lorem<sp>ipsum<sp>yada<sp>yada" ; toDoItem . setNotes ( newNotes ) ; "<AssertPlaceHolder>" ; } getNotes ( ) { return notes ; }
org . junit . Assert . assertThat ( toDoItem . getNotes ( ) , org . hamcrest . CoreMatchers . is ( newNotes ) )
testDoFilterReadInputStreamFromFilterChainWithNoPayloadNoDebugLevel ( ) { setLogLevel ( org . finra . herd . ui . RequestLoggingFilter . class , LogLevel . INFO ) ; javax . servlet . FilterChain filterChain = new org . springframework . mock . web . MockFilterChain ( ) { public void doFilter ( javax . servlet . ServletRequest request , javax . servlet . ServletResponse response ) throws java . io . IOException , javax . servlet . ServletException { java . lang . String payload = org . apache . commons . io . IOUtils . toString ( request . getInputStream ( ) ) ; "<AssertPlaceHolder>" ; } } ; org . springframework . mock . web . MockHttpServletRequest request = createServletRequest ( ) ; request . setContent ( null ) ; createFilter ( ) . doFilter ( request , createServletResponse ( ) , filterChain ) ; } getInputStream ( ) { if ( ( payload ) == null ) { return super . getInputStream ( ) ; } else { return new javax . servlet . ServletInputStream ( ) { final java . io . ByteArrayInputStream byteArrayInputStream = new java . io . ByteArrayInputStream ( payload ) ; public int read ( ) throws java . io . IOException { return byteArrayInputStream . read ( ) ; } public boolean isFinished ( ) { return true ; } public boolean isReady ( ) { return true ; } public void setReadListener ( final javax . servlet . ReadListener readListener ) { } } ; } }
org . junit . Assert . assertEquals ( "" , payload )
MustInCorrectPrepareWhenFieldOutThrowException ( ) { info . smart_tools . smartactors . iobject . iobject . IObject query = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject queryForNestedTask = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject filterObject = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . iobject . iobject . IObject eqKeyObject = mock ( info . smart_tools . smartactors . iobject . iobject . IObject . class ) ; info . smart_tools . smartactors . ioc . ikey . IKey iObjectKey = mock ( info . smart_tools . smartactors . ioc . ikey . IKey . class ) ; when ( info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.iobject.IObject" ) ) . thenReturn ( iObjectKey ) ; when ( info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( iObjectKey ) ) . thenReturn ( queryForNestedTask ) . thenReturn ( filterObject ) . thenReturn ( eqKeyObject ) ; java . lang . String token = "token" ; when ( tokenField . in ( query ) ) . thenReturn ( token ) ; doThrow ( new info . smart_tools . smartactors . iobject . iobject . exception . ChangeValueException ( ) ) . when ( equalsField ) . out ( eqKeyObject , token ) ; try { testTask . prepare ( query ) ; } catch ( info . smart_tools . smartactors . database . interfaces . idatabase_task . exception . TaskPrepareException e ) { verifyStatic ( times ( 3 ) ) ; info . smart_tools . smartactors . ioc . named_keys_storage . Keys . getOrAdd ( "info.smart_tools.smartactors.iobject.iobject.IObject" ) ; verifyStatic ( times ( 3 ) ) ; info . smart_tools . smartactors . ioc . ioc . IOC . resolve ( iObjectKey ) ; verify ( tokenField ) . in ( query ) ; verify ( equalsField ) . out ( eqKeyObject , token ) ; return ; } "<AssertPlaceHolder>" ; } out ( info . smart_tools . smartactors . iobject . iobject . IObject , T ) { if ( null == obj ) { throw new info . smart_tools . smartactors . base . exception . invalid_argument_exception . InvalidArgumentException ( "Argument<sp>should<sp>not<sp>be<sp>null." ) ; } obj . setValue ( fieldName , in ) ; }
org . junit . Assert . assertTrue ( false )
testDoCollectEmpty ( ) { doReturn ( eu . toolchain . concurrent . CoreAsyncTest . result ) . when ( collector ) . apply ( anyCollection ( ) ) ; doReturn ( future ) . when ( underTest ) . completed ( eu . toolchain . concurrent . CoreAsyncTest . result ) ; "<AssertPlaceHolder>" ; verify ( underTest ) . completed ( eu . toolchain . concurrent . CoreAsyncTest . result ) ; } doCollectEmpty ( java . util . function . Function ) { try { return this . completed ( collector . apply ( ( ( java . util . Collection < C > ) ( eu . toolchain . concurrent . CoreAsync . EMPTY_RESULTS ) ) ) ) ; } catch ( java . lang . Exception e ) { return failed ( e ) ; } }
org . junit . Assert . assertEquals ( future , underTest . doCollectEmpty ( collector ) )
deveObterAssinaturaComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFEventoCancelamento eventoCancelamento = new com . fincatto . documentofiscal . nfe400 . classes . evento . cancelamento . NFEventoCancelamento ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . nota . assinatura . NFSignature assinatura = new com . fincatto . documentofiscal . nfe400 . classes . nota . assinatura . NFSignature ( ) ; final java . lang . String signatureValue = "signature" ; assinatura . setSignatureValue ( signatureValue ) ; eventoCancelamento . setAssinatura ( assinatura ) ; "<AssertPlaceHolder>" ; } getAssinatura ( ) { return this . assinatura ; }
org . junit . Assert . assertEquals ( assinatura , eventoCancelamento . getAssinatura ( ) )
testSetManagedParentUnmanaged ( ) { flex . messaging . services . MessageService service = new flex . messaging . services . MessageService ( ) ; service . setId ( "dummy-service" ) ; service . setManaged ( false ) ; flex . messaging . MessageBroker broker = new flex . messaging . MessageBroker ( false ) ; broker . addService ( service ) ; destination . setService ( service ) ; destination . setManaged ( true ) ; boolean managed = destination . isManaged ( ) ; "<AssertPlaceHolder>" ; } isManaged ( ) { return false ; }
org . junit . Assert . assertFalse ( managed )
testReturnsEmptyWhenJmxPropertyWasNotFound ( ) { org . apache . ambari . server . state . alert . MetricSource . JmxInfo jmxInfo = new org . apache . ambari . server . state . alert . MetricSource . JmxInfo ( ) ; jmxInfo . setPropertyList ( asList ( "notfound/notfound" ) ) ; org . apache . ambari . server . controller . jmx . JMXMetricHolder metrics = metrics ( 1 , 2 ) ; "<AssertPlaceHolder>" ; } eval ( java . util . List ) { org . springframework . expression . spel . support . StandardEvaluationContext context = new org . springframework . expression . spel . support . StandardEvaluationContext ( ) ; context . setVariables ( range ( 0 , metrics . size ( ) ) . boxed ( ) . collect ( toMap ( ( i ) -> "var" + i , metrics :: get ) ) ) ; return new org . springframework . expression . spel . standard . SpelExpressionParser ( ) . parseExpression ( value . replaceAll ( "(\\{(\\d+)\\})" , "#var$2" ) ) . getValue ( context ) ; }
org . junit . Assert . assertThat ( jmxInfo . eval ( metrics ) , org . hamcrest . core . Is . is ( java . util . Optional . empty ( ) ) )
shouldGiveTheSameInstanceOfAnnotatedScenarioScopedClassWithinAScenario ( ) { factory = new cucumber . runtime . java . guice . impl . GuiceFactory ( injector ( cucumber . api . guice . CucumberModules . createScenarioModule ( ) ) ) ; instancesFromSameScenario = getInstancesFromSameScenario ( factory , cucumber . runtime . java . guice . impl . GuiceFactoryTest . AnnotatedScenarioScopedClass . class ) ; "<AssertPlaceHolder>" ; } elementsAreAllEqual ( ) { return new cucumber . runtime . java . guice . matcher . ElementsAreAllEqualMatcher < E > ( ) ; }
org . junit . Assert . assertThat ( instancesFromSameScenario , elementsAreAllEqual ( ) )
testMultibyteCodedReadWriteLongLine ( ) { final java . lang . String s1 = org . apache . hc . core5 . http . impl . io . TestSessionInOutBuffers . constructString ( org . apache . hc . core5 . http . impl . io . TestSessionInOutBuffers . SWISS_GERMAN_HELLO ) ; final java . lang . String s2 = org . apache . hc . core5 . http . impl . io . TestSessionInOutBuffers . constructString ( org . apache . hc . core5 . http . impl . io . TestSessionInOutBuffers . RUSSIAN_HELLO ) ; final java . lang . String s3 = "Like<sp>hello<sp>and<sp>stuff" ; final java . lang . StringBuilder buf = new java . lang . StringBuilder ( ) ; for ( int i = 0 ; i < 1024 ; i ++ ) { buf . append ( s1 ) . append ( s2 ) . append ( s3 ) ; } final java . lang . String s = buf . toString ( ) ; final org . apache . hc . core5 . http . io . SessionOutputBuffer outbuffer = new org . apache . hc . core5 . http . impl . io . SessionOutputBufferImpl ( 16 , StandardCharsets . UTF_8 . newEncoder ( ) ) ; final java . io . ByteArrayOutputStream outputStream = new java . io . ByteArrayOutputStream ( ) ; final org . apache . hc . core5 . util . CharArrayBuffer chbuffer = new org . apache . hc . core5 . util . CharArrayBuffer ( 16 ) ; chbuffer . append ( s ) ; outbuffer . writeLine ( chbuffer , outputStream ) ; outbuffer . flush ( outputStream ) ; final org . apache . hc . core5 . http . io . SessionInputBuffer inBuffer = new org . apache . hc . core5 . http . impl . io . SessionInputBufferImpl ( 16 , StandardCharsets . UTF_8 . newDecoder ( ) ) ; final java . io . ByteArrayInputStream inputStream = new java . io . ByteArrayInputStream ( outputStream . toByteArray ( ) ) ; chbuffer . clear ( ) ; inBuffer . readLine ( chbuffer , inputStream ) ; "<AssertPlaceHolder>" ; } toString ( ) { final java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "[headerTableSize=" ) . append ( this . headerTableSize ) . append ( ",<sp>pushEnabled=" ) . append ( this . pushEnabled ) . append ( ",<sp>maxConcurrentStreams=" ) . append ( this . maxConcurrentStreams ) . append ( ",<sp>initialWindowSize=" ) . append ( this . initialWindowSize ) . append ( ",<sp>maxFrameSize=" ) . append ( this . maxFrameSize ) . append ( ",<sp>maxHeaderListSize=" ) . append ( this . maxHeaderListSize ) . append ( "]" ) ; return builder . toString ( ) ; }
org . junit . Assert . assertEquals ( s , chbuffer . toString ( ) )
testUniqueAggregateNames ( ) { setServiceNameForCrossEntityAggregates ( "aggregate_for_service" ) ; addNameForCrossEntityAggregatesForRole ( "role1" , "aggregate_for_role1" ) ; addNameForCrossEntityAggregatesForRole ( "role2" , "aggregate_for_role2" ) ; addNameForCrossEntityAggregatesForEntity ( "entity1" , "aggregate_for_entity1" ) ; addNameForCrossEntityAggregatesForEntity ( "entity2" , "aggregate_for_entity2" ) ; "<AssertPlaceHolder>" ; } validate ( com . cloudera . csd . validation . monitoring . MonitoringValidationContext , com . cloudera . csd . descriptors . MetricEntityAttributeDescriptor , com . cloudera . csd . validation . references . components . DescriptorPathImpl ) { com . google . common . base . Preconditions . checkNotNull ( context ) ; com . google . common . base . Preconditions . checkNotNull ( attribute ) ; com . google . common . base . Preconditions . checkNotNull ( path ) ; path = constructPathFromProperty ( attribute , "name" , path ) ; java . lang . String attributeName = attribute . getName ( ) ; java . lang . String serviceName = context . serviceDescriptor . getName ( ) . toLowerCase ( ) ; if ( ( ! ( attributeName . startsWith ( serviceName ) ) ) && ( ! ( builtInAttributes . contains ( attributeName ) ) ) ) { java . lang . String msg = java . lang . String . format ( "Attribute<sp>'%s'<sp>does<sp>not<sp>start<sp>with<sp>the<sp>service<sp>name<sp>('%s')" , attributeName , serviceName ) ; return forViolation ( msg , attribute , attributeName , path ) ; } return noViolations ( ) ; }
org . junit . Assert . assertTrue ( validator . validate ( context , serviceDescriptor , root ) . isEmpty ( ) )
testPrepareBackupFileContent ( ) { java . lang . String expected = "43f9f0b1a04b5aac860081c4492ee829137ddf8185b85aa0e8211c82a7a5f002eb2b942ebfab08b063f188f959b2e25d" ; java . lang . String result ; java . lang . String pw = "password" ; java . lang . String mnemonic = "one<sp>two<sp>three<sp>four<sp>five<sp>six<sp>seven" ; byte [ ] bytes = org . bitcoin . authenticator . Backup . FileBackup . prepareBackupFileContent ( mnemonic , pw ) ; result = org . spongycastle . util . encoders . Hex . toHexString ( bytes ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( ( PassedObject . getClass ( ) ) != ( this . getClass ( ) ) ) || ( PassedObject == null ) ) return false ; else { org . bitcoin . authenticator . Events . Event . MethodClassPairing comparedPairing = ( ( org . bitcoin . authenticator . Events . Event . MethodClassPairing ) ( PassedObject ) ) ; return ( ( containingClassWeak . get ( ) ) == ( comparedPairing . containingClassWeak . get ( ) ) ) && ( method . equals ( comparedPairing . method ) ) ; } }
org . junit . Assert . assertTrue ( expected . equals ( result ) )
testStartBillingRun_withUnsuccesfullBrokerSharesCalculation ( ) { doReturn ( Boolean . FALSE ) . when ( sharesCalculator ) . performBrokerSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ; doReturn ( Boolean . TRUE ) . when ( sharesCalculator ) . performMarketplacesSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ; doReturn ( Boolean . TRUE ) . when ( sharesCalculator ) . performResellerSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ; doReturn ( Boolean . TRUE ) . when ( sharesCalculator ) . performSupplierSharesCalculationRun ( anyLong ( ) , anyLong ( ) ) ; doReturn ( validBillingData ) . when ( bdr ) . getSubscriptionsForBilling ( anyLong ( ) , anyLong ( ) , anyLong ( ) ) ; boolean billingRun = billingServiceBean . startBillingRun ( currentTime ) ; "<AssertPlaceHolder>" ; } startBillingRun ( long ) { throw new java . lang . UnsupportedOperationException ( ) ; }
org . junit . Assert . assertFalse ( billingRun )
shouldInstrumentStatementOnNewLineInSwitchCase ( ) { java . lang . String source = "<sp>switch(x){<sp>case<sp>10:<sp>\nx++;<sp>}" ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[1]++;\n" + ( ( ( ( "switch(x)<sp>{\n" + "<sp>case<sp>10:\n" ) + "<sp>_$jscoverage[\'test.js\'].lineData[2]++;\n" ) + "<sp>x++;\n" ) + "}\n" ) ; "<AssertPlaceHolder>" ; } instrumentSource ( java . lang . String ) { return instrumentSource ( uri , source ) ; }
org . junit . Assert . assertEquals ( expectedSource , instrumentedSource )
shouldReturnCorrectCallableType ( ) { com . oracle . bedrock . deferred . Deferred < java . lang . String > deferred = new com . oracle . bedrock . testsupport . deferred . DeferredRemoteExecution < java . lang . String > ( null , new com . oracle . bedrock . runtime . concurrent . RemoteCallable < java . lang . String > ( ) { @ com . oracle . bedrock . testsupport . deferred . Override public java . lang . String call ( ) throws com . oracle . bedrock . testsupport . deferred . Exception { return "hello<sp>world" ; } } ) ; "<AssertPlaceHolder>" ; } getDeferredClass ( ) { return classOfResult ; }
org . junit . Assert . assertEquals ( java . lang . String . class , deferred . getDeferredClass ( ) )
testDeadlock1DifferentGraphs ( ) { org . apache . tinkerpop . gremlin . structure . Vertex v1 = sqlgGraph . addVertex ( T . label , "t1" , "name" , "n1" ) ; org . apache . tinkerpop . gremlin . structure . Vertex v2 = sqlgGraph . addVertex ( T . label , "t1" , "name" , "n2" ) ; org . apache . tinkerpop . gremlin . structure . Vertex v3 = sqlgGraph . addVertex ( T . label , "t2" , "name" , "n3" ) ; v1 . addEdge ( "e1" , v2 ) ; sqlgGraph . tx ( ) . commit ( ) ; java . lang . Object o1 = new java . lang . Object ( ) ; java . lang . Object o2 = new java . lang . Object ( ) ; java . util . concurrent . atomic . AtomicInteger ok = new java . util . concurrent . atomic . AtomicInteger ( 0 ) ; java . lang . Thread t1 = new java . lang . Thread ( ( ) -> { try { synchronized ( o1 ) { o1 . wait ( ) ; } GraphTraversal < org . apache . tinkerpop . gremlin . structure . Vertex , org . apache . tinkerpop . gremlin . structure . Vertex > gt = org . umlg . sqlg . test . topology . sqlgGraph . traversal ( ) . V ( ) . hasLabel ( "t1" ) . out ( "e1" ) ; int cnt = 0 ; while ( gt . hasNext ( ) ) { gt . next ( ) ; synchronized ( o2 ) { o2 . notify ( ) ; } if ( cnt == 0 ) { synchronized ( o1 ) { o1 . wait ( 1000 ) ; } } cnt ++ ; } org . umlg . sqlg . test . topology . sqlgGraph . tx ( ) . commit ( ) ; ok . incrementAndGet ( ) ; } catch ( e ) { org . umlg . sqlg . test . topology . e . printStackTrace ( ) ; org . junit . Assert . fail ( org . umlg . sqlg . test . topology . e . getMessage ( ) ) ; } } , "thread-1" ) ; t1 . start ( ) ; java . lang . Thread t2 = new java . lang . Thread ( ( ) -> { try { try ( org . umlg . sqlg . structure . SqlgGraph sqlgGraph1 = org . umlg . sqlg . structure . SqlgGraph . open ( getConfigurationClone ( ) ) ) { org . apache . tinkerpop . gremlin . structure . Vertex v1b = sqlgGraph1 . vertices ( v1 . id ( ) ) . next ( ) ; org . apache . tinkerpop . gremlin . structure . Vertex v3b = sqlgGraph1 . vertices ( v3 . id ( ) ) . next ( ) ; synchronized ( o2 ) { o2 . wait ( ) ; } v1b . addEdge ( "e1" , v3b ) ; synchronized ( o1 ) { o1 . notify ( ) ; } sqlgGraph1 . tx ( ) . commit ( ) ; ok . incrementAndGet ( ) ; } } catch ( e ) { org . umlg . sqlg . test . topology . e . printStackTrace ( ) ; org . junit . Assert . fail ( org . umlg . sqlg . test . topology . e . getMessage ( ) ) ; } } , "thread-2" ) ; t2 . start ( ) ; java . lang . Thread . sleep ( 1000 ) ; synchronized ( o1 ) { o1 . notifyAll ( ) ; } t1 . join ( ) ; t2 . join ( ) ; "<AssertPlaceHolder>" ; } tx ( ) { return this . sqlgTransaction ; }
org . junit . Assert . assertEquals ( 2 , ok . get ( ) )
testGetNewBuilder ( ) { org . dataconservancy . packaging . tool . model . PackageGenerationParameters params = new org . dataconservancy . packaging . tool . model . PackageGenerationParameters ( ) ; params . addParam ( GeneralParameterNames . PACKAGE_FORMAT_ID , PackagingFormat . BOREM . toString ( ) ) ; org . dataconservancy . packaging . tool . api . generator . PackageModelBuilder builder = underTest . newBuilder ( params ) ; "<AssertPlaceHolder>" ; } newBuilder ( org . dataconservancy . packaging . tool . model . PackageGenerationParameters ) { if ( ( ( builders ) == null ) || ( ( builders . size ( ) ) == 0 ) ) { throw new java . lang . IllegalStateException ( "No<sp>builders<sp>have<sp>been<sp>set." ) ; } java . lang . String formatId = null ; if ( params . getKeys ( ) . contains ( GeneralParameterNames . PACKAGE_FORMAT_ID ) ) { formatId = params . getParam ( GeneralParameterNames . PACKAGE_FORMAT_ID , 0 ) ; } if ( formatId == null ) { throw new java . lang . IllegalArgumentException ( "The<sp>parameter<sp>list<sp>must<sp>contain<sp>a<sp>package<sp>format<sp>id" ) ; } if ( builders . containsKey ( formatId ) ) { return builders . get ( formatId ) . newInstance ( params ) ; } return null ; }
org . junit . Assert . assertNotNull ( builder )
refinementGroupNestedConjunctionDisjunction ( ) { generateDrugsWithGroups ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>[1..1]<sp>{(%s=%s<sp>AND<sp>%s=%s)<sp>OR<sp>%s=%s}" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT5 , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_BOSS , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT6 , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . HAS_ACTIVE_INGREDIENT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . INGREDIENT6 ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . ASPIRIN_TABLET ) ) ) ; "<AssertPlaceHolder>" ; } of ( com . b2international . commons . exceptions . ApiError ) { return new com . b2international . snowowl . snomed . api . rest . domain . RestApiError . Builder ( error ) ; }
org . junit . Assert . assertEquals ( expected , actual )
testBIMethod ( ) { org . evosuite . Properties . SEED_PROBABILITY = 10 ; org . evosuite . seeding . factories . BIMethodSeedingTestSuiteChromosomeFactory factory = new org . evosuite . seeding . factories . BIMethodSeedingTestSuiteChromosomeFactory ( defaultFactory , bestIndividual ) ; org . evosuite . testsuite . TestSuiteChromosome chromosome = factory . getChromosome ( ) ; boolean containsSeededMethod = false ; for ( org . evosuite . testcase . TestCase t : chromosome . getTests ( ) ) { for ( org . evosuite . testcase . TestCase t2 : bestIndividual . getTests ( ) ) { if ( t . equals ( t2 ) ) { containsSeededMethod = true ; } } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return super . equals ( obj ) ; }
org . junit . Assert . assertTrue ( containsSeededMethod )
testReplaceNestedExpressions ( ) { org . apache . camel . component . sql . DefaultSqlPrepareStatementStrategy strategy = new org . apache . camel . component . sql . DefaultSqlPrepareStatementStrategy ( ) ; java . lang . String sql = "INSERT<sp>INTO<sp>example<sp>VALUES<sp>(:?${array[${index}]})" ; java . lang . String expected = "INSERT<sp>INTO<sp>example<sp>VALUES<sp>(?)" ; java . lang . String query = strategy . prepareQuery ( sql , true , null ) ; "<AssertPlaceHolder>" ; } prepareQuery ( java . lang . String , boolean , org . apache . camel . Exchange ) { return query ; }
org . junit . Assert . assertEquals ( expected , query )
testMissingFieldShouldNotMatch ( ) { final org . graylog2 . plugin . streams . StreamRule rule = getSampleRule ( ) ; rule . setField ( "nonexistingfield" ) ; rule . setValue ( "^foo" ) ; final org . graylog2 . plugin . Message msg = getSampleMessage ( ) ; final org . graylog2 . streams . matchers . StreamRuleMatcher matcher = getMatcher ( rule ) ; "<AssertPlaceHolder>" ; } match ( org . graylog2 . plugin . Message , org . graylog2 . plugin . streams . StreamRule ) { java . lang . Double msgVal = getDouble ( msg . getField ( rule . getField ( ) ) ) ; if ( msgVal == null ) { return false ; } java . lang . Double ruleVal = getDouble ( rule . getValue ( ) ) ; if ( ruleVal == null ) { return false ; } return ( rule . getInverted ( ) ) ^ ( msgVal > ruleVal ) ; }
org . junit . Assert . assertFalse ( matcher . match ( msg , rule ) )
testCreateTableExecAsync ( ) { org . apache . hive . jdbc . HiveStatement stmt = ( ( org . apache . hive . jdbc . HiveStatement ) ( org . apache . hive . jdbc . TestJdbcDriver2 . con . createStatement ( ) ) ) ; java . lang . String tblName = "testCreateTableExecAsync" ; boolean isResulSet = stmt . executeAsync ( ( ( "create<sp>table<sp>" + tblName ) + "<sp>(col1<sp>int<sp>,<sp>col2<sp>string)" ) ) ; "<AssertPlaceHolder>" ; stmt . getUpdateCount ( ) ; java . sql . DatabaseMetaData metadata = org . apache . hive . jdbc . TestJdbcDriver2 . con . getMetaData ( ) ; java . sql . ResultSet tablesMetadata = metadata . getTables ( null , null , "%" , null ) ; boolean tblFound = false ; while ( tablesMetadata . next ( ) ) { java . lang . String tableName = tablesMetadata . getString ( 3 ) ; if ( tableName . equalsIgnoreCase ( tblName ) ) { tblFound = true ; } } if ( ! tblFound ) { org . junit . Assert . fail ( "Unable<sp>to<sp>create<sp>table<sp>using<sp>executeAsync" ) ; } stmt . execute ( ( "drop<sp>table<sp>" + tblName ) ) ; stmt . close ( ) ; } executeAsync ( java . lang . String ) { runAsyncOnServer ( sql ) ; org . apache . hive . service . rpc . thrift . TGetOperationStatusResp status = waitForResultSetStatus ( ) ; if ( ! ( status . isHasResultSet ( ) ) ) { return false ; } resultSet = new org . apache . hive . jdbc . HiveQueryResultSet . Builder ( this ) . setClient ( client ) . setStmtHandle ( stmtHandle ) . setMaxRows ( maxRows ) . setFetchSize ( fetchSize ) . setScrollable ( isScrollableResultset ) . build ( ) ; return true ; }
org . junit . Assert . assertFalse ( isResulSet )
testSetupComponentWhenConstraintTypeIsRangeAndValueIsEmpty ( ) { final org . kie . workbench . common . dmn . api . definition . v1_1 . ConstraintType type = RANGE ; final java . lang . String constraint = "" ; final java . lang . String constraintValueType = "number" ; doReturn ( constraint ) . when ( modal ) . getConstraintValue ( ) ; doReturn ( constraintValueType ) . when ( modal ) . getConstraintValueType ( ) ; when ( constraintRange . getElement ( ) ) . thenReturn ( element ) ; modal . setupComponent ( type ) ; "<AssertPlaceHolder>" ; verify ( constraintRange ) . setValue ( constraint ) ; verify ( constraintRange ) . setConstraintValueType ( constraintValueType ) ; verify ( modal , never ( ) ) . enableOkButton ( ) ; verify ( element ) . setAttribute ( "class" , "kie-number" ) ; } getCurrentComponent ( ) { return currentComponent ; }
org . junit . Assert . assertEquals ( constraintRange , modal . getCurrentComponent ( ) )
testSQLUntransformedWithNoFunctionCalls ( ) { com . liferay . portal . internal . dao . sql . transformer . SQLFunctionTransformer sqlFunctionTransformer = new com . liferay . portal . internal . dao . sql . transformer . SQLFunctionTransformer ( "TEST(" , "" , "<sp>DELIMITER<sp>" , "" ) ; java . lang . String transformedSQL = sqlFunctionTransformer . transform ( "TEST2(a,<sp>b,<sp>c)" ) ; "<AssertPlaceHolder>" ; } transform ( java . lang . String ) { if ( html == null ) { return null ; } if ( ( ! ( html . contains ( "<img" ) ) ) || ( ! ( html . contains ( "/documents/" ) ) ) ) { return html ; } return super . transform ( html ) ; }
org . junit . Assert . assertEquals ( "TEST2(a,<sp>b,<sp>c)" , transformedSQL )
testString2Boolean_1 ( ) { try { javax . jms . Message message = senderSession . createMessage ( ) ; message . setStringProperty ( "prop" , "true" ) ; "<AssertPlaceHolder>" ; } catch ( javax . jms . JMSException e ) { fail ( e ) ; } } getBooleanProperty ( java . lang . String ) { java . lang . Object prop = properties . get ( name ) ; if ( ! ( prop instanceof java . lang . Boolean ) ) { throw new javax . jms . JMSException ( "Not<sp>boolean" ) ; } return ( ( java . lang . Boolean ) ( properties . get ( name ) ) ) . booleanValue ( ) ; }
org . junit . Assert . assertEquals ( true , message . getBooleanProperty ( "prop" ) )
testIsValidWhenItIsFalse ( ) { final org . kie . workbench . common . dmn . client . editors . common . persistence . RecordEngine < org . kie . workbench . common . dmn . client . editors . common . persistence . ActiveRecordTest . Data > engine = makeRecordEngine ( ) ; final org . kie . workbench . common . dmn . client . editors . common . persistence . ActiveRecord < org . kie . workbench . common . dmn . client . editors . common . persistence . ActiveRecordTest . Data > activeRecord = activeRecord ( engine ) ; doReturn ( false ) . when ( engine ) . isValid ( any ( ) ) ; "<AssertPlaceHolder>" ; } isValid ( ) { return getRecordEngine ( ) . isValid ( getRecord ( ) ) ; }
org . junit . Assert . assertFalse ( activeRecord . isValid ( ) )
testGetIndexListingThrowsRuntimeException ( ) { final com . gemstone . gemfire . cache . Cache mockCache = mockContext . mock ( com . gemstone . gemfire . cache . Cache . class , "Cache" ) ; final com . gemstone . gemfire . cache . execute . Execution mockFunctionExecutor = mockContext . mock ( com . gemstone . gemfire . cache . execute . Execution . class , "Function<sp>Executor" ) ; mockContext . checking ( new org . jmock . Expectations ( ) { { oneOf ( mockFunctionExecutor ) . execute ( with ( aNonNull ( com . gemstone . gemfire . management . internal . cli . functions . ListIndexFunction . class ) ) ) ; will ( throwException ( new java . lang . RuntimeException ( "expected" ) ) ) ; } } ) ; final com . gemstone . gemfire . management . internal . cli . commands . IndexCommands commands = createIndexCommands ( mockCache , mockFunctionExecutor ) ; try { commands . getIndexListing ( ) ; } catch ( java . lang . RuntimeException expected ) { "<AssertPlaceHolder>" ; throw expected ; } } getMessage ( ) { return ( singleOptionMessage ( ) ) + "<sp>is<sp>not<sp>a<sp>recognized<sp>option" ; }
org . junit . Assert . assertEquals ( "expected" , expected . getMessage ( ) )
testCantConsolidate ( ) { java . lang . String query1 = "" + ( ( ( ( ( ( ( "SELECT<sp>?a<sp>?b<sp>?c" + "{" ) + "<sp>?a<sp><uri:p4><sp><uri:o1><sp>" 1 ) + "<sp>?a<sp><uri:p4><sp><uri:o1><sp>.<sp>" ) + "<sp>OPTIONAL{?a<sp><uri:p3><sp>?b}<sp>.<sp>" ) + "<sp>OPTIONAL{<uri:s2><sp><uri:p2><sp>?b}<sp>.<sp>" ) + "<sp><uri:s1><sp><uri:p1><sp>?b<sp>" ) + "}" ) ; java . lang . String query2 = "" + ( ( ( ( "SELECT<sp>?a<sp>?b" + "{" ) + "<sp>?a<sp><uri:p4><sp><uri:o1><sp>" 0 ) + "<sp>?a<sp><uri:p4><sp><uri:o1><sp>" ) + "}" ) ; org . eclipse . rdf4j . query . parser . sparql . SPARQLParser parser = new org . eclipse . rdf4j . query . parser . sparql . SPARQLParser ( ) ; org . eclipse . rdf4j . query . parser . ParsedQuery pq1 = parser . parseQuery ( query1 , null ) ; org . eclipse . rdf4j . query . parser . ParsedQuery pq2 = parser . parseQuery ( query2 , null ) ; org . eclipse . rdf4j . query . algebra . TupleExpr te1 = pq1 . getTupleExpr ( ) ; org . eclipse . rdf4j . query . algebra . TupleExpr te2 = pq2 . getTupleExpr ( ) ; org . eclipse . rdf4j . query . algebra . Join join1 = ( ( org . eclipse . rdf4j . query . algebra . Join ) ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( te1 ) ) . getArg ( ) ) ) ; org . eclipse . rdf4j . query . algebra . Join join2 = ( ( org . eclipse . rdf4j . query . algebra . Join ) ( ( ( org . eclipse . rdf4j . query . algebra . Projection ) ( te2 ) ) . getArg ( ) ) ) ; org . apache . rya . indexing . external . matching . QuerySegment < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > seg1 = qFactory . getQuerySegment ( join1 ) ; org . apache . rya . indexing . external . matching . QuerySegment < org . apache . rya . indexing . external . tupleSet . ExternalTupleSet > seg2 = qFactory . getQuerySegment ( join2 ) ; org . apache . rya . indexing . external . matching . QueryNodeConsolidator consolidator = new org . apache . rya . indexing . external . matching . QueryNodeConsolidator ( seg1 . getOrderedNodes ( ) , seg2 . getOrderedNodes ( ) ) ; "<AssertPlaceHolder>" ; } consolidateNodes ( ) { if ( consolidateCalled ) { return returnValConsolidate ; } consolidateCalled = true ; returnValConsolidate = ( consolidate ( ) ) && ( reOrderExtSetNodes ( ) ) ; return returnValConsolidate ; }
org . junit . Assert . assertTrue ( ( ! ( consolidator . consolidateNodes ( ) ) ) )
fileFactoryValidFile_doesntExist ( ) { when ( file . isFile ( ) ) . thenReturn ( Boolean . FALSE ) ; when ( file . exists ( ) ) . thenReturn ( Boolean . FALSE ) ; org . sejda . model . output . FileOrDirectoryTaskOutput instance = org . sejda . model . output . FileOrDirectoryTaskOutput . file ( file ) ; "<AssertPlaceHolder>" ; } file ( java . io . File ) { if ( ( file == null ) || ( ( file . exists ( ) ) && ( ! ( file . isFile ( ) ) ) ) ) { throw new java . lang . IllegalArgumentException ( "A<sp>valid<sp>instance<sp>is<sp>expected<sp>(not<sp>null<sp>or<sp>existing<sp>file)." ) ; } return new org . sejda . model . output . FileOrDirectoryTaskOutput ( file ) ; }
org . junit . Assert . assertNotNull ( instance )
testConvertAllocationsToReservationInfoEmptySet ( ) { java . util . List < org . apache . hadoop . yarn . api . records . ReservationAllocationState > infoList = org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationSystemUtil . convertAllocationsToReservationInfo ( java . util . Collections . < org . apache . hadoop . yarn . server . resourcemanager . reservation . ReservationAllocation > emptySet ( ) , false ) ; "<AssertPlaceHolder>" ; } size ( ) { return loggers . size ( ) ; }
org . junit . Assert . assertEquals ( infoList . size ( ) , 0 )
testGetValue_Gets_Value_From_Pattern ( ) { mmarquee . automation . AutomationElement element = org . mockito . Mockito . mock ( mmarquee . automation . AutomationElement . class ) ; mmarquee . automation . pattern . Value value = org . mockito . Mockito . mock ( mmarquee . automation . pattern . Value . class ) ; when ( value . isAvailable ( ) ) . thenReturn ( true ) ; when ( value . value ( ) ) . thenReturn ( "NAME" ) ; mmarquee . automation . uiautomation . IUIAutomation mocked_automation = org . mockito . Mockito . mock ( mmarquee . automation . uiautomation . IUIAutomation . class ) ; mmarquee . automation . UIAutomation instance = new mmarquee . automation . UIAutomation ( mocked_automation ) ; mmarquee . automation . controls . AutomationEditBox ctrl = new mmarquee . automation . controls . AutomationEditBox ( new mmarquee . automation . controls . ElementBuilder ( element ) . addPattern ( value ) . automation ( instance ) ) ; java . lang . String name = ctrl . getValue ( ) ; "<AssertPlaceHolder>" ; } getValue ( ) { return this . value ; }
org . junit . Assert . assertTrue ( name . equals ( "NAME" ) )
checkMessageMethod ( ) { java . lang . String str = "test" ; info . smart_tools . smartactors . base . interfaces . icacheable . exception . DropCacheException exception = new info . smart_tools . smartactors . base . interfaces . icacheable . exception . DropCacheException ( str ) ; "<AssertPlaceHolder>" ; throw exception ; } getMessage ( ) { return message ; }
org . junit . Assert . assertEquals ( exception . getMessage ( ) , str )
testCreateDummyInt ( ) { final org . dummycreator . dummyfactories . RandomArrayFactory < int [ ] > factory = new org . dummycreator . dummyfactories . RandomArrayFactory < int [ ] > ( int [ ] . class ) ; org . easymock . EasyMock . expect ( mock . getRandomInt ( 2 ) ) . andReturn ( 1 ) ; org . easymock . EasyMock . expect ( mock . getRandomInt ( ) ) . andReturn ( 12345 ) ; org . easymock . EasyMock . expect ( mock . getRandomInt ( ) ) . andReturn ( 54321 ) ; org . easymock . EasyMock . expect ( mock . getRandomInt ( ) ) . andReturn ( 678768 ) ; org . easymock . EasyMock . replay ( mock ) ; "<AssertPlaceHolder>" ; org . easymock . EasyMock . verify ( mock ) ; } createDummy ( org . dummycreator . ClassBindings ) { return createDummy ( null , new java . util . HashMap < java . lang . String , org . dummycreator . ClassUsageInfo < ? > > ( ) , classBindings , new java . util . ArrayList < java . lang . Exception > ( ) ) ; }
org . junit . Assert . assertArrayEquals ( new int [ ] { 12345 , 54321 , 678768 } , factory . createDummy ( new org . dummycreator . ClassBindings ( ) ) )
testSkipPropertyWithoutMetadata ( ) { nl . _42 . jarb . utils . bean . PropertyReference propertyReference = new nl . _42 . jarb . utils . bean . PropertyReference ( nl . _42 . jarb . constraint . domain . Wine . class , "unmappedProperty" ) ; nl . _42 . jarb . constraint . metadata . PropertyConstraintDescription unmappedPropertyDescription = new nl . _42 . jarb . constraint . metadata . PropertyConstraintDescription ( propertyReference , java . lang . String . class ) ; enhancer . enhance ( unmappedPropertyDescription ) ; "<AssertPlaceHolder>" ; } getMaximumLength ( ) { return maximumLength ; }
org . junit . Assert . assertNull ( unmappedPropertyDescription . getMaximumLength ( ) )
testExtractSecondTime ( ) { java . lang . String sqlText = ( "select<sp>t,<sp>EXTRACT(SECOND<sp>FROM<sp>t)<sp>as<sp>\"SECOND\"<sp>from<sp>" + ( com . splicemachine . derby . utils . SpliceDateFunctionsIT . tableWatcherI ) ) + "<sp>order<sp>by<sp>t" ; try ( com . splicemachine . derby . utils . ResultSet rs = methodWatcher . executeQuery ( sqlText ) ) { java . lang . String expected = "T<sp>|SECOND<sp>|\n" + ( ( ( ( ( ( "10:30:29<sp>|<sp>29<sp>|\n" 0 + "00:00:01<sp>|<sp>1<sp>|\n" ) + "10:30:29<sp>|<sp>29<sp>|\n" 1 ) + "10:30:29<sp>|<sp>29<sp>|\n" ) + "18:44:28<sp>|<sp>28<sp>|\n" ) + "20:38:40<sp>|<sp>40<sp>|\n" ) + "23:59:59<sp>|<sp>59<sp>|" ) ; "<AssertPlaceHolder>" ; } } 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 ) )
testMaakentityConvertorRubriek_8610 ( ) { nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . ConverterContext ctx = createContext ( nl . bzk . migratiebrp . test . brpnaarlo3 . adapter . entity . IstStapelVoorkomenConverterTest . MINIMAAL ) ; converter . convertInhoudelijk ( ctx , IstStapelVoorkomenConverter . HEADER_RUBRIEK_8610 , rubriek8610 . toString ( ) ) ; converter . maakEntity ( ctx ) ; nl . bzk . algemeenbrp . dal . domein . brp . entity . StapelVoorkomen stapelVoorkomen = ctx . getStapel ( java . lang . Integer . parseInt ( volgnummer ) ) . getStapelvoorkomens ( ) . iterator ( ) . next ( ) ; "<AssertPlaceHolder>" ; } getRubriek8610DatumVanOpneming ( ) { return rubriek8610DatumVanOpneming ; }
org . junit . Assert . assertEquals ( rubriek8610 , stapelVoorkomen . getRubriek8610DatumVanOpneming ( ) )
disallowsNullKey ( ) { "<AssertPlaceHolder>" ; } okToAdd ( java . lang . Object , java . lang . Object ) { return true ; }
org . junit . Assert . assertFalse ( generator . okToAdd ( null , new java . lang . Object ( ) ) )
testProject ( ) { final org . apache . calcite . tools . RelBuilder builder = org . apache . calcite . tools . RelBuilder . create ( org . apache . calcite . test . RelBuilderTest . config ( ) . build ( ) ) ; org . apache . calcite . rel . RelNode root = builder . scan ( "EMP" ) . project ( builder . field ( "DEPTNO" ) , builder . cast ( builder . field ( 6 ) , SqlTypeName . SMALLINT ) , builder . literal ( 20 ) , builder . field ( 6 ) , builder . alias ( builder . field ( 6 ) , "C" ) ) . build ( ) ; final java . lang . String expected = "" + ( "LogicalProject(DEPTNO=[$7],<sp>COMM=[CAST($6):SMALLINT<sp>NOT<sp>NULL],<sp>$f2=[20],<sp>COMM0=[$6],<sp>C=[$6])\n" + "<sp>LogicalTableScan(table=[[scott,<sp>EMP]])\n" ) ; "<AssertPlaceHolder>" ; } hasTree ( java . lang . String ) { return org . apache . calcite . test . Matchers . compose ( org . hamcrest . core . Is . is ( value ) , ( input ) -> { return org . apache . calcite . util . Util . toLinux ( org . apache . calcite . plan . RelOptUtil . toString ( input ) ) ; } ) ; }
org . junit . Assert . assertThat ( root , org . apache . calcite . test . Matchers . hasTree ( expected ) )
add_partitions ( ) { org . apache . hadoop . hive . metastore . api . Partition newPartition1 = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; newPartition1 . setDbName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; org . apache . hadoop . hive . metastore . api . Partition newPartition2 = new org . apache . hadoop . hive . metastore . api . Partition ( ) ; newPartition2 . setDbName ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; java . util . List < org . apache . hadoop . hive . metastore . api . Partition > inbound = com . google . common . collect . Lists . newArrayList ( new org . apache . hadoop . hive . metastore . api . Partition ( ) ) ; java . util . List < org . apache . hadoop . hive . metastore . api . Partition > partitions = com . google . common . collect . Lists . newArrayList ( newPartition1 , newPartition2 ) ; when ( primaryMapping . transformInboundPartitions ( partitions ) ) . thenReturn ( inbound ) ; when ( primaryClient . add_partitions ( inbound ) ) . thenReturn ( 2 ) ; int result = handler . add_partitions ( partitions ) ; "<AssertPlaceHolder>" ; verify ( primaryMapping , times ( 2 ) ) . checkWritePermissions ( com . hotels . bdp . waggledance . server . FederatedHMSHandlerTest . DB_P ) ; } add_partitions ( java . util . List ) { if ( ! ( new_parts . isEmpty ( ) ) ) { com . hotels . bdp . waggledance . mapping . model . DatabaseMapping mapping = databaseMappingService . databaseMapping ( new_parts . get ( 0 ) . getDbName ( ) ) ; for ( org . apache . hadoop . hive . metastore . api . Partition partition : new_parts ) { mapping . checkWritePermissions ( partition . getDbName ( ) ) ; } return mapping . getClient ( ) . add_partitions ( mapping . transformInboundPartitions ( new_parts ) ) ; } return 0 ; }
org . junit . Assert . assertThat ( result , org . hamcrest . CoreMatchers . is ( 2 ) )
testFindMinimumDomainValue ( ) { org . jfree . data . xy . XYDataset dataset = createXYDataset1 ( ) ; java . lang . Number minimum = org . jfree . data . general . DatasetUtilities . findMinimumDomainValue ( dataset ) ; "<AssertPlaceHolder>" ; } findMinimumDomainValue ( org . jfree . data . xy . XYDataset ) { org . jfree . chart . util . ParamChecks . nullNotPermitted ( dataset , "dataset" ) ; java . lang . Number result ; if ( dataset instanceof org . jfree . data . DomainInfo ) { org . jfree . data . DomainInfo info = ( ( org . jfree . data . DomainInfo ) ( dataset ) ) ; return new java . lang . Double ( info . getDomainLowerBound ( true ) ) ; } else { double minimum = Double . POSITIVE_INFINITY ; int seriesCount = dataset . getSeriesCount ( ) ; for ( int series = 0 ; series < seriesCount ; series ++ ) { int itemCount = dataset . getItemCount ( series ) ; for ( int item = 0 ; item < itemCount ; item ++ ) { double value ; if ( dataset instanceof org . jfree . data . xy . IntervalXYDataset ) { org . jfree . data . xy . IntervalXYDataset intervalXYData = ( ( org . jfree . data . xy . IntervalXYDataset ) ( dataset ) ) ; value = intervalXYData . getStartXValue ( series , item ) ; } else { value = dataset . getXValue ( series , item ) ; } if ( ! ( java . lang . Double . isNaN ( value ) ) ) { minimum = java . lang . Math . min ( minimum , value ) ; } } } if ( minimum == ( Double . POSITIVE_INFINITY ) ) { result = null ; } else { result = new java . lang . Double ( minimum ) ; } } return result ; }
org . junit . Assert . assertEquals ( new java . lang . Double ( 1.0 ) , minimum )
should_use_build_name_if_its_known ( ) { view = a ( jobView ( ) . which ( new com . smartcodeltd . jenkinsci . plugins . buildmonitor . viewmodel . features . KnowsCurrentBuildsDetails ( ) ) . of ( a ( job ( ) . whereTheLast ( build ( ) . isStillBuilding ( ) . and ( ) . hasName ( "1.3.4+build.15" ) ) ) ) ) ; "<AssertPlaceHolder>" ; } currentBuildsOf ( com . smartcodeltd . jenkinsci . plugins . buildmonitor . viewmodel . JobView ) { return job . which ( com . smartcodeltd . jenkinsci . plugins . buildmonitor . viewmodel . features . KnowsCurrentBuildsDetails . class ) . asJson ( ) . value ( ) ; }
org . junit . Assert . assertThat ( currentBuildsOf ( view ) . get ( 0 ) . name ( ) , org . hamcrest . core . Is . is ( "1.3.4+build.15" ) )
testUpdateNodesWithoutModifyOperation ( ) { expect ( mockOpenstackNodeService . node ( anyString ( ) ) ) . andReturn ( openstackNode ) . once ( ) ; replay ( mockOpenstackNodeService ) ; mockOpenstackNodeAdminService . updateNode ( anyObject ( ) ) ; replay ( mockOpenstackNodeAdminService ) ; final javax . ws . rs . client . WebTarget wt = target ( ) ; java . io . InputStream jsonStream = org . onosproject . openstacknode . web . OpenstackNodeWebResourceTest . class . getResourceAsStream ( "openstack-node-gateway-config.json" ) ; javax . ws . rs . core . Response response = wt . path ( org . onosproject . openstacknode . web . OpenstackNodeWebResourceTest . PATH ) . request ( MediaType . APPLICATION_JSON_TYPE ) . put ( javax . ws . rs . client . Entity . json ( jsonStream ) ) ; final int status = response . getStatus ( ) ; "<AssertPlaceHolder>" ; verify ( mockOpenstackNodeService ) ; verify ( mockOpenstackNodeAdminService ) ; } is ( java . lang . Class ) { return true ; }
org . junit . Assert . assertThat ( status , org . hamcrest . Matchers . is ( 200 ) )
testGenerateIntegerKeys_whenLocal_client ( ) { java . lang . Integer [ ] keys = com . hazelcast . simulator . tests . helpers . KeyUtils . generateIntegerKeys ( 2 , KeyLocality . LOCAL , com . hazelcast . simulator . tests . helpers . KeyUtilsTest . client ) ; "<AssertPlaceHolder>" ; } generateIntegerKeys ( int , com . hazelcast . simulator . tests . helpers . KeyLocality , com . hazelcast . core . HazelcastInstance ) { com . hazelcast . simulator . tests . helpers . KeyUtils . KeyGenerator < java . lang . Integer > keyGenerator = com . hazelcast . simulator . tests . helpers . KeyUtils . newIntKeyGenerator ( hz , keyLocality , keyCount ) ; java . lang . Integer [ ] keys = new java . lang . Integer [ keyCount ] ; for ( int i = 0 ; i < ( keys . length ) ; i ++ ) { keys [ i ] = keyGenerator . next ( ) ; } return keys ; }
org . junit . Assert . assertEquals ( 2 , keys . length )
bothFailed ( ) { initReg . remove ( ) ; initPair ( jetbrains . jetpad . base . Asyncs . < java . lang . Integer > failure ( new java . lang . Throwable ( ) ) , jetbrains . jetpad . base . Asyncs . < java . lang . String > failure ( new java . lang . Throwable ( ) ) ) ; "<AssertPlaceHolder>" ; } initPair ( jetbrains . jetpad . base . Async , jetbrains . jetpad . base . Async ) { jetbrains . jetpad . base . Async < jetbrains . jetpad . base . Pair < java . lang . Integer , java . lang . String > > pair = jetbrains . jetpad . base . Asyncs . pair ( first , second ) ; initReg = pair . onResult ( new jetbrains . jetpad . base . function . Consumer < jetbrains . jetpad . base . Pair < java . lang . Integer , java . lang . String > > ( ) { @ jetbrains . jetpad . base . Override public void accept ( jetbrains . jetpad . base . Pair < java . lang . Integer , java . lang . String > item ) { result = item ; } } , new jetbrains . jetpad . base . function . Consumer < java . lang . Throwable > ( ) { @ jetbrains . jetpad . base . Override public void accept ( java . lang . Throwable item ) { error = item ; } } ) ; }
org . junit . Assert . assertNotNull ( error )
testGetRequestURI ( ) { new mockit . Expectations ( ) { { clientRequest . path ( ) ; result = "/path" ; } } ; "<AssertPlaceHolder>" ; } getRequestURI ( ) { return "/path" ; }
org . junit . Assert . assertEquals ( "/path" , request . getRequestURI ( ) )
jsonLiteralStringsWithEscapedNewlineAreAllowed ( ) { io . burt . jmespath . Expression < java . lang . Object > expected = JsonLiteral ( "\"hello\\nworld\"" ) ; io . burt . jmespath . Expression < java . lang . Object > actual = compile ( "`\"hello\\nworld\"`" ) ; "<AssertPlaceHolder>" ; } compile ( java . lang . String ) { return runtime . compile ( str ) ; }
org . junit . Assert . assertThat ( actual , org . hamcrest . Matchers . is ( expected ) )
isPlatformInitialized ( ) { "<AssertPlaceHolder>" ; } isPlatformInitialized ( ) { org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) ) ; }
org . junit . Assert . assertTrue ( org . bonitasoft . engine . platform . PlatformIT . platformAPI . isPlatformInitialized ( ) )
testNonMatchCertificateAndSelectionAttributesMissingAttribute ( ) { com . intel . mtwilson . tag . model . X509AttributeCertificate certificate = createCertificate ( ) ; com . intel . mtwilson . tag . selection . xml . SelectionType differentSelection = createSelectionSame ( ) ; differentSelection . getAttribute ( ) . remove ( 0 ) ; com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate provisioner = new com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate ( ) ; "<AssertPlaceHolder>" ; } certificateAttributesEqual ( com . intel . mtwilson . tag . model . X509AttributeCertificate , com . intel . mtwilson . tag . selection . xml . SelectionType ) { java . util . List < org . bouncycastle . asn1 . x509 . Attribute > certAttributes = certificate . getAttribute ( ) ; boolean [ ] certAttrMatch = new boolean [ certAttributes . size ( ) ] ; for ( com . intel . mtwilson . tag . selection . xml . AttributeType xmlAttribute : selection . getAttribute ( ) ) { com . intel . mtwilson . tag . common . X509AttrBuilder . Attribute oidAndValue = com . intel . mtwilson . tag . Util . toAttributeOidValue ( xmlAttribute ) ; boolean found = false ; for ( int i = 0 ; i < ( certAttrMatch . length ) ; i ++ ) { if ( java . util . Arrays . equals ( certAttributes . get ( i ) . getAttrType ( ) . getDEREncoded ( ) , oidAndValue . oid . getDEREncoded ( ) ) ) { if ( java . util . Arrays . equals ( certAttributes . get ( i ) . getAttributeValues ( ) [ 0 ] . getDEREncoded ( ) , oidAndValue . value . getDEREncoded ( ) ) ) { certAttrMatch [ i ] = true ; found = true ; } } } if ( ! found ) { com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate . log . debug ( "Certificate<sp>does<sp>not<sp>have<sp>attribute<sp>oid<sp>{}<sp>and<sp>value<sp>{}" , org . apache . commons . codec . binary . Hex . encodeHexString ( oidAndValue . oid . getDEREncoded ( ) ) , org . apache . commons . codec . binary . Hex . encodeHexString ( oidAndValue . value . getDEREncoded ( ) ) ) ; return false ; } } for ( int i = 0 ; i < ( certAttrMatch . length ) ; i ++ ) { if ( ! ( certAttrMatch [ i ] ) ) { com . intel . mtwilson . tag . rest . v2 . rpc . ProvisionTagCertificate . log . debug ( "Selection<sp>does<sp>not<sp>have<sp>attribute<sp>oid<sp>{}<sp>and<sp>value<sp>{}" , org . apache . commons . codec . binary . Hex . encodeHexString ( certAttributes . get ( i ) . getAttrType ( ) . getDEREncoded ( ) ) , org . apache . commons . codec . binary . Hex . encodeHexString ( certAttributes . get ( i ) . getAttributeValues ( ) [ 0 ] . getDEREncoded ( ) ) ) ; return false ; } } return true ; }
org . junit . Assert . assertFalse ( provisioner . certificateAttributesEqual ( certificate , differentSelection ) )
testForVarCharArrayForOneElementArrayWithIndex ( ) { java . lang . String [ ] strArr = new java . lang . String [ 1 ] ; strArr [ 0 ] = "abx" ; com . salesforce . phoenix . schema . PhoenixArray arr = com . salesforce . phoenix . schema . PArrayDataType . instantiatePhoenixArray ( PDataType . VARCHAR , strArr ) ; byte [ ] bytes = PDataType . VARCHAR_ARRAY . toBytes ( arr ) ; org . apache . hadoop . hbase . io . ImmutableBytesWritable ptr = new org . apache . hadoop . hbase . io . ImmutableBytesWritable ( bytes ) ; com . salesforce . phoenix . schema . PArrayDataType . positionAtArrayElement ( ptr , 0 , PDataType . VARCHAR ) ; int offset = ptr . getOffset ( ) ; int length = ptr . getLength ( ) ; byte [ ] bs = ptr . get ( ) ; byte [ ] res = new byte [ length ] ; java . lang . System . arraycopy ( bs , offset , res , 0 , length ) ; "<AssertPlaceHolder>" ; } toString ( org . apache . hadoop . hbase . KeyValue ) { return ( ( kv . toString ( ) ) + "/value=" ) + ( org . apache . hadoop . hbase . util . Bytes . toString ( kv . getValue ( ) ) ) ; }
org . junit . Assert . assertEquals ( "abx" , org . apache . hadoop . hbase . util . Bytes . toString ( res ) )
testPutAttribute ( ) { java . util . jar . Manifest manifest = new java . util . jar . Manifest ( ) ; manifest . getMainAttributes ( ) . put ( new java . util . jar . Attributes . Name ( "Manifest-Version" ) , "1.0" ) ; manifest . getMainAttributes ( ) . put ( new java . util . jar . Attributes . Name ( "Bundle-Name" ) , "Test" ) ; manifest . getMainAttributes ( ) . put ( new java . util . jar . Attributes . Name ( "Bundle-ManifestVersion" ) , "1" ) ; java . util . jar . Manifest actualManifest = org . arquillian . container . osgi . remote . deploy . processor . test . ManifestManagerTest . _manifestManager . putAttributeValue ( manifest , "Import-Package" , "com.import.example" ) ; java . util . jar . Attributes mainAttributes = actualManifest . getMainAttributes ( ) ; "<AssertPlaceHolder>" ; } putAttributeValue ( java . util . jar . Manifest , java . lang . String , java . lang . String [ ] ) { java . util . jar . Attributes mainAttributes = manifest . getMainAttributes ( ) ; java . lang . String attributeValues = mainAttributes . getValue ( attributeName ) ; java . util . Set < java . lang . String > attributeValueSet = new java . util . HashSet ( ) ; if ( attributeValues != null ) { attributeValueSet . addAll ( java . util . Arrays . asList ( attributeValues . split ( "," ) ) ) ; } attributeValueSet . addAll ( java . util . Arrays . asList ( attributeValue ) ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( java . lang . String value : attributeValueSet ) { sb . append ( value ) ; sb . append ( "," ) ; } if ( ! ( attributeValueSet . isEmpty ( ) ) ) { sb . setLength ( ( ( sb . length ( ) ) - 1 ) ) ; } attributeValues = sb . toString ( ) ; mainAttributes . putValue ( attributeName , attributeValues ) ; return manifest ; }
org . junit . Assert . assertEquals ( mainAttributes . get ( new java . util . jar . Attributes . Name ( "Import-Package" ) ) , "com.import.example" )
testMin ( ) { System . out . println ( "min" ) ; jsat . distributions . ChiSquared dist = new jsat . distributions . ChiSquared ( 0.5 ) ; "<AssertPlaceHolder>" ; } min ( ) { return Double . NEGATIVE_INFINITY ; }
org . junit . Assert . assertTrue ( ( 0 == ( dist . min ( ) ) ) )
testSetFile ( ) { java . lang . String myFile = "my-file" ; entry . setFile ( myFile ) ; "<AssertPlaceHolder>" ; } getFile ( ) { return file ; }
org . junit . Assert . assertEquals ( myFile , entry . getFile ( ) )
getFieldValueViaGetter ( ) { class MyClass { @ com . vaadin . flow . internal . SuppressWarnings ( "unused" ) public int field = 1 ; } MyClass myInstance = new MyClass ( ) ; java . lang . reflect . Field memberField ; java . lang . Object fieldValue = Boolean . FALSE ; try { memberField = myInstance . getClass ( ) . getField ( "field" ) ; fieldValue = com . vaadin . flow . internal . ReflectTools . getJavaFieldValue ( myInstance , memberField ) ; } catch ( java . lang . Exception e ) { } "<AssertPlaceHolder>" ; } getJavaFieldValue ( java . lang . Object , java . lang . reflect . Field ) { java . beans . PropertyDescriptor pd ; try { pd = new java . beans . PropertyDescriptor ( field . getName ( ) , object . getClass ( ) ) ; java . lang . reflect . Method getter = pd . getReadMethod ( ) ; if ( getter != null ) { return getter . invoke ( object , ( ( java . lang . Object [ ] ) ( null ) ) ) ; } } catch ( java . beans . IntrospectionException e1 ) { } if ( ! ( field . isAccessible ( ) ) ) { field . setAccessible ( true ) ; } return field . get ( object ) ; }
org . junit . Assert . assertFalse ( ( fieldValue instanceof java . lang . Boolean ) )
mockFileOutputStreamInstantiation ( ) { final java . lang . String fileName = "test.txt" ; new mockit . Expectations ( mockit . FileOutputStream . class ) { { mockit . OutputStream os = new mockit . FileOutputStream ( fileName ) ; os . write ( ( ( byte [ ] ) ( any ) ) ) ; os . close ( ) ; } } ; mockit . FileOutputStream output = new mockit . FileOutputStream ( fileName ) ; output . write ( new byte [ ] { 123 } ) ; output . close ( ) ; "<AssertPlaceHolder>" ; } exists ( ) { return true ; }
org . junit . Assert . assertFalse ( new mockit . File ( fileName ) . exists ( ) )
shouldConvertIterableOfElementsAndElementIdsToArray ( ) { final uk . gov . gchq . gaffer . data . element . id . ElementId [ ] originalArray = new uk . gov . gchq . gaffer . data . element . id . ElementId [ ] { new uk . gov . gchq . gaffer . data . element . Entity . Builder ( ) . group ( "entity" ) . build ( ) , new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( "edge" ) . build ( ) , new uk . gov . gchq . gaffer . operation . data . EntitySeed ( "vertex" ) , new uk . gov . gchq . gaffer . operation . data . EdgeSeed ( "src" , "dest" , true ) } ; final java . lang . Iterable < uk . gov . gchq . gaffer . data . element . id . ElementId > originalResults = new uk . gov . gchq . gaffer . commonutil . iterable . WrappedCloseableIterable ( java . util . Arrays . asList ( originalArray ) ) ; final uk . gov . gchq . gaffer . store . operation . handler . output . ToArrayHandler < uk . gov . gchq . gaffer . data . element . id . ElementId > handler = new uk . gov . gchq . gaffer . store . operation . handler . output . ToArrayHandler ( ) ; final uk . gov . gchq . gaffer . operation . impl . output . ToArray operation = mock ( uk . gov . gchq . gaffer . operation . impl . output . ToArray . class ) ; given ( operation . getInput ( ) ) . willReturn ( originalResults ) ; final uk . gov . gchq . gaffer . data . element . id . ElementId [ ] results = handler . doOperation ( operation , new uk . gov . gchq . gaffer . store . Context ( ) , null ) ; "<AssertPlaceHolder>" ; } doOperation ( uk . gov . gchq . gaffer . operation . impl . ForEach , uk . gov . gchq . gaffer . store . Context , uk . gov . gchq . gaffer . store . Store ) { if ( null == ( forEach . getOperation ( ) ) ) { throw new uk . gov . gchq . gaffer . operation . OperationException ( "Operation<sp>cannot<sp>be<sp>null" ) ; } if ( null == ( forEach . getInput ( ) ) ) { throw new uk . gov . gchq . gaffer . operation . OperationException ( "Inputs<sp>cannot<sp>be<sp>null" ) ; } final java . util . List < O > results = new java . util . ArrayList ( ) ; for ( final I input : forEach . getInput ( ) ) { final uk . gov . gchq . gaffer . operation . Operation clonedOperation = forEach . getOperation ( ) . shallowClone ( ) ; uk . gov . gchq . gaffer . store . operation . handler . util . OperationHandlerUtil . updateOperationInput ( clonedOperation , input ) ; results . add ( executeOperation ( clonedOperation , context , store ) ) ; } return results ; }
org . junit . Assert . assertArrayEquals ( originalArray , results )
testParseDlVlanErr ( ) { params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "dl_vlan" , "dl_vlan" ) ; } } ; target = new org . o3project . odenos . core . component . network . flow . query . OFPFlowMatchQuery ( params ) ; "<AssertPlaceHolder>" ; } parse ( ) { if ( ! ( super . parse ( ) ) ) { return false ; } if ( ! ( org . o3project . odenos . core . component . network . BasicQuery . checkMapExactly ( this . actions , new java . lang . String [ ] { } ) ) ) { return false ; } return true ; }
org . junit . Assert . assertThat ( target . parse ( ) , org . hamcrest . CoreMatchers . is ( false ) )
testToMapWithMismatchSeparator ( ) { java . lang . String [ ] values = new java . lang . String [ ] { "key1:value1" , "key2-value2" , "key3:value3" } ; java . lang . String separator = ":" ; java . util . Map < java . lang . String , java . lang . String > expResult = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; expResult . put ( "key1" , "value1" ) ; expResult . put ( "key3" , "value3" ) ; java . util . Map < java . lang . String , java . lang . String > result = com . adobe . acs . commons . util . ParameterUtil . toMap ( values , separator ) ; "<AssertPlaceHolder>" ; } toMap ( java . lang . String [ ] , java . lang . String ) { return com . adobe . acs . commons . util . ParameterUtil . toMap ( values , separator , false , null ) ; }
org . junit . Assert . assertEquals ( expResult , result )
metadataExtractionTest ( ) { pl . edu . icm . cermine . bibref . InputStream expStream = pl . edu . icm . cermine . bibref . AbstractBibReferenceExtractorTest . class . getResourceAsStream ( pl . edu . icm . cermine . bibref . AbstractBibReferenceExtractorTest . EXP_FILE ) ; pl . edu . icm . cermine . bibref . BufferedReader expReader = null ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; try { expReader = new pl . edu . icm . cermine . bibref . BufferedReader ( new pl . edu . icm . cermine . bibref . InputStreamReader ( expStream , "UTF-8" ) ) ; java . lang . String line ; while ( ( line = expReader . readLine ( ) ) != null ) { sb . append ( line ) ; sb . append ( "\n" ) ; } } finally { expStream . close ( ) ; if ( expReader != null ) { expReader . close ( ) ; } } java . net . URL url = pl . edu . icm . cermine . bibref . AbstractBibReferenceExtractorTest . class . getResource ( pl . edu . icm . cermine . bibref . AbstractBibReferenceExtractorTest . TEST_FILE ) ; java . util . zip . ZipFile zipFile = null ; pl . edu . icm . cermine . bibref . InputStream inputStream = null ; java . lang . String [ ] references = new java . lang . String [ ] { } ; try { zipFile = new java . util . zip . ZipFile ( new pl . edu . icm . cermine . bibref . File ( url . toURI ( ) ) ) ; inputStream = zipFile . getInputStream ( zipFile . getEntry ( "out.xml" ) ) ; pl . edu . icm . cermine . structure . model . BxDocument expDocument = new pl . edu . icm . cermine . structure . model . BxDocument ( ) . setPages ( bxReader . read ( new pl . edu . icm . cermine . bibref . InputStreamReader ( inputStream , "UTF-8" ) ) ) ; references = getExtractor ( ) . extractBibReferences ( expDocument ) ; } finally { if ( zipFile != null ) { zipFile . close ( ) ; } if ( inputStream != null ) { inputStream . close ( ) ; } } "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( ( ( ( "Result{" + "totalOrig=" ) + ( totalOrig ) ) + ",<sp>totalExtr=" ) + ( totalExtr ) ) + ",<sp>success=" ) + ( success ) ) + '}' ; }
org . junit . Assert . assertEquals ( org . apache . commons . lang . StringUtils . join ( references , "\n" ) , sb . toString ( ) . trim ( ) )
testEmptyConstructor ( ) { org . apacheextras . camel . component . rcode . RCodeEndpoint endpoint = new org . apacheextras . camel . component . rcode . RCodeEndpoint ( ) ; "<AssertPlaceHolder>" ; endpoint . createConsumer ( new org . apache . camel . Processor ( ) { @ org . apacheextras . camel . component . rcode . Override public void process ( org . apache . camel . Exchange exchange ) throws org . apacheextras . camel . component . rcode . Exception { } } ) ; }
org . junit . Assert . assertNotNull ( endpoint )
test_appendCurrencySymbolLocalized_parse ( ) { iBuilder . appendCurrencySymbolLocalized ( ) ; org . joda . money . format . MoneyFormatter test = iBuilder . toFormatter ( ) ; "<AssertPlaceHolder>" ; } isParser ( ) { return ( java . util . Arrays . asList ( parsers ) . contains ( null ) ) == false ; }
org . junit . Assert . assertEquals ( false , test . isParser ( ) )
getVersion ( ) { java . lang . System . setProperty ( AppEngineUtil . VERSION_KEY , "x.x.x" ) ; "<AssertPlaceHolder>" ; } getVersion ( ) { java . lang . System . setProperty ( AppEngineUtil . VERSION_KEY , "x.x.x" ) ; org . junit . Assert . assertThat ( org . slim3 . util . AppEngineUtil . getVersion ( ) , org . hamcrest . CoreMatchers . is ( "x.x.x" ) ) ; }
org . junit . Assert . assertThat ( org . slim3 . util . AppEngineUtil . getVersion ( ) , org . hamcrest . CoreMatchers . is ( "x.x.x" ) )
runTest ( ) { boolean result = checkNoError ( "Social_Profiles_Get_Pronunciation_Url" ) ; "<AssertPlaceHolder>" ; } getExpectedErrorMsg ( ) { return expectedErrorMsg ; }
org . junit . Assert . assertTrue ( getExpectedErrorMsg ( ) , result )
givenText_whenMatchesWithDotMetach_thenCorrect ( ) { int matches = com . baeldung . java . regex . RegexUnitTest . runTest ( "." , "foo" ) ; "<AssertPlaceHolder>" ; } runTest ( java . lang . String , java . lang . String ) { com . baeldung . java . regex . RegexUnitTest . pattern = java . util . regex . Pattern . compile ( regex ) ; com . baeldung . java . regex . RegexUnitTest . matcher = com . baeldung . java . regex . RegexUnitTest . pattern . matcher ( text ) ; int matches = 0 ; while ( com . baeldung . java . regex . RegexUnitTest . matcher . find ( ) ) matches ++ ; return matches ; }
org . junit . Assert . assertTrue ( ( matches > 0 ) )
testScriptFunction2 ( ) { com . bj58 . oceanus . core . shard . Script script = new com . bj58 . oceanus . core . shard . Script ( ) ; script . setContent ( "return<sp>mod($age)" ) ; com . bj58 . oceanus . core . shard . ScriptFunction function = new com . bj58 . oceanus . core . shard . ScriptFunction ( script ) ; int size = 256 ; java . util . Map parameters = new java . util . HashMap ( ) ; parameters . put ( "age" , 1 ) ; int result = function . execute ( size , parameters ) ; "<AssertPlaceHolder>" ; } execute ( int , java . util . Map ) { int count = 0 ; for ( java . util . Map . Entry < java . lang . String , java . lang . Object > parameter : parameters . entrySet ( ) ) { java . lang . Object objValue = parameter . getValue ( ) ; count += objValue . hashCode ( ) ; } return ( java . lang . Math . abs ( count ) ) % size ; }
org . junit . Assert . assertEquals ( 1 , result )
testGetFrameCount ( ) { doAnswer ( new org . mockito . stubbing . Answer < java . lang . Object > ( ) { @ com . eclipsesource . v8 . debug . Override public java . lang . Object answer ( final org . mockito . invocation . InvocationOnMock invocation ) throws java . lang . Throwable { com . eclipsesource . v8 . debug . ExecutionState state = ( ( com . eclipsesource . v8 . debug . ExecutionState ) ( invocation . getArguments ( ) [ 1 ] ) ) ; result = state . getFrameCount ( ) ; return null ; } } ) . when ( breakHandler ) . onBreak ( eq ( DebugEvent . Break ) , any ( com . eclipsesource . v8 . debug . ExecutionState . class ) , any ( com . eclipsesource . v8 . debug . EventData . class ) , any ( com . eclipsesource . v8 . V8Object . class ) ) ; v8 . executeScript ( com . eclipsesource . v8 . debug . ExecutionStateTest . script , "script" , 0 ) ; "<AssertPlaceHolder>" ; } executeScript ( java . lang . String , java . lang . String , int ) { checkThread ( ) ; com . eclipsesource . v8 . V8 . checkScript ( script ) ; return executeScript ( getV8RuntimePtr ( ) , com . eclipsesource . v8 . UNKNOWN , script , scriptName , lineNumber ) ; }
org . junit . Assert . assertEquals ( 2 , result )
shouldBeRepeatable ( ) { com . navercorp . volleyextensions . volleyer . multipart . HttpEntityWrapper wrapper = com . navercorp . volleyextensions . volleyer . multipart . HttpEntityWrapperTest . given ( ) ; "<AssertPlaceHolder>" ; } isRepeatable ( ) { return true ; }
org . junit . Assert . assertTrue ( wrapper . isRepeatable ( ) )
writesResponse ( ) { java . lang . String writtenResponseContent = mockResponse . writeResponse ( result , originalResponseContent ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertThat ( writtenResponseContent , org . hamcrest . core . Is . is ( originalResponseContent ) )
getTaskunConfig_A$ ( ) { com . github . seratch . taskun . inject . GuiceTaskunInjector target = new com . github . seratch . taskun . inject . GuiceTaskunInjector ( new com . google . inject . AbstractModule ( ) { @ com . github . seratch . taskun . inject . Override protected void configure ( ) { } } ) ; com . github . seratch . taskun . scheduler . config . TaskunConfig actual = target . getTaskunConfig ( ) ; "<AssertPlaceHolder>" ; } getTaskunConfig ( ) { return ( ( com . github . seratch . taskun . scheduler . config . TaskunConfig ) ( s2Container . getComponent ( com . github . seratch . taskun . scheduler . config . TaskunConfig . class ) ) ) ; }
org . junit . Assert . assertNotNull ( actual )
testBrpPersoonslijstGetterZonderInhoud ( ) { final nl . moderniseringgba . isc . esb . message . brp . generated . GeslachtsnaamwijzigingVerzoekType geslachtsnaamwijzigingVerzoekType = new nl . moderniseringgba . isc . esb . message . brp . generated . GeslachtsnaamwijzigingVerzoekType ( ) ; final nl . moderniseringgba . isc . esb . message . brp . impl . GeslachtsnaamwijzigingVerzoekBericht geslachtsnaamwijzigingVerzoekBericht = new nl . moderniseringgba . isc . esb . message . brp . impl . GeslachtsnaamwijzigingVerzoekBericht ( geslachtsnaamwijzigingVerzoekType ) ; "<AssertPlaceHolder>" ; } getBrpPersoonslijst ( ) { return asBrpPersoonslijst ( leesUitBrpAntwoordType . getBrpPl ( ) ) ; }
org . junit . Assert . assertNull ( geslachtsnaamwijzigingVerzoekBericht . getBrpPersoonslijst ( ) )
testBooleanArray2 ( ) { for ( int i = 0 ; i < 1000 ; i ++ ) { boolean [ ] b = new boolean [ i ] ; for ( int j = 0 ; j < i ; j ++ ) b [ j ] = ( java . lang . Math . random ( ) ) < 0.5 ; boolean [ ] b2 = ( ( boolean [ ] ) ( org . mapdb . elsa . ElsaSerializerBaseTest . clone ( b ) ) ) ; for ( int j = 0 ; j < i ; j ++ ) "<AssertPlaceHolder>" ; } } clone ( E ) { return org . mapdb . elsa . ElsaSerializerBaseTest . clonePojo ( value ) ; }
org . junit . Assert . assertEquals ( b [ j ] , b2 [ j ] )
testStagedCombinationOfDot3 ( ) { org . apache . taverna . scufl2 . api . core . Processor p = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyStack iss = new org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyStack ( p ) ; iss . add ( getDot ( 1 , 1 ) ) ; iss . add ( getDot ( 0 , 0 ) ) ; org . apache . taverna . scufl2 . validation . structural . StructuralValidator sv = new org . apache . taverna . scufl2 . validation . structural . StructuralValidator ( ) ; sv . getValidatorState ( ) . setProcessor ( p ) ; java . util . Map < org . apache . taverna . scufl2 . api . port . InputProcessorPort , java . lang . Integer > tempDepths = new java . util . HashMap < org . apache . taverna . scufl2 . api . port . InputProcessorPort , java . lang . Integer > ( ) ; tempDepths . put ( a , 1 ) ; tempDepths . put ( b , 0 ) ; "<AssertPlaceHolder>" ; } calculateResultWrappingDepth ( java . util . Map ) { org . apache . taverna . scufl2 . api . core . Processor p = validatorState . get ( ) . getProcessor ( ) ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyStack iss = p . getIterationStrategyStack ( ) ; if ( iss == null ) { validatorState . get ( ) . getEventListener ( ) . missingIterationStrategyStack ( p ) ; validatorState . get ( ) . getEventListener ( ) . failedProcessorAdded ( p ) ; return null ; } if ( iss . isEmpty ( ) ) return 0 ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyTopNode iterationStrategyTopNode = iss . get ( 0 ) ; java . lang . Integer depth = getIterationDepth ( iterationStrategyTopNode , inputDepths ) ; if ( depth == null ) return null ; org . apache . taverna . scufl2 . api . iterationstrategy . IterationStrategyTopNode previousNode = iterationStrategyTopNode ; for ( int index = 1 ; index < ( iss . size ( ) ) ; index ++ ) { java . util . Map < org . apache . taverna . scufl2 . api . port . InputProcessorPort , java . lang . Integer > stagedInputDepths = getDesiredCardinalities ( previousNode ) ; iterationStrategyTopNode = iss . get ( index ) ; java . lang . Integer nodeDepth = getIterationDepth ( iterationStrategyTopNode , stagedInputDepths ) ; if ( nodeDepth == null ) return null ; depth += nodeDepth ; previousNode = iterationStrategyTopNode ; } return depth ; }
org . junit . Assert . assertEquals ( java . lang . Integer . valueOf ( 1 ) , sv . calculateResultWrappingDepth ( tempDepths ) )
testLexerUnicodeSMPSetSerializedAfterBMPSet ( ) { org . antlr . v4 . tool . LexerGrammar lg = new org . antlr . v4 . tool . LexerGrammar ( ( "mode<sp>0:0\n" 5 + ( "mode<sp>0:0\n" 0 + "1:RULE_START<sp>0\n" 0 ) ) ) ; java . lang . String expecting = "max<sp>type<sp>2\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "mode<sp>0:0\n" 7 + "1:RULE_START<sp>0\n" ) + "2:RULE_STOP<sp>0\n" ) + "3:RULE_START<sp>1\n" ) + "4:RULE_STOP<sp>1\n" ) + "1:RULE_START<sp>0\n" 1 ) + "1:RULE_START<sp>0\n" 4 ) + "mode<sp>0:0\n" 4 ) + "8:BASIC<sp>1\n" ) + "rule<sp>0:1<sp>1\n" ) + "mode<sp>0:0\n" 9 ) + "mode<sp>0:0\n" ) + "0:\'a\'..\'a\',<sp>\'x\'..\'x\'\n" ) + "1:RULE_START<sp>0\n" 6 ) + "mode<sp>0:0\n" 8 ) + "mode<sp>0:0\n" 1 ) + "1:RULE_START<sp>0\n" 5 ) + "1:RULE_START<sp>0\n" 2 ) + "mode<sp>0:0\n" 6 ) + "6->2<sp>EPSILON<sp>0,0,0\n" ) + "mode<sp>0:0\n" 3 ) + "1:RULE_START<sp>0\n" 3 ) + "mode<sp>0:0\n" 2 ) ; org . antlr . v4 . runtime . atn . ATN atn = createATN ( lg , true ) ; java . lang . String result = org . antlr . v4 . runtime . atn . ATNSerializer . getDecoded ( atn , java . util . Arrays . asList ( lg . getTokenNames ( ) ) ) ; "<AssertPlaceHolder>" ; } getTokenNames ( ) { int numTokens = getMaxTokenType ( ) ; java . lang . String [ ] tokenNames = new java . lang . String [ numTokens + 1 ] ; for ( int i = 0 ; i < ( tokenNames . length ) ; i ++ ) { tokenNames [ i ] = getTokenName ( i ) ; } return tokenNames ; }
org . junit . Assert . assertEquals ( expecting , result )
testIsolation ( ) { org . apache . druid . indexing . overlord . setup . FillCapacityWorkerSelectStrategy strategy = new org . apache . druid . indexing . overlord . setup . FillCapacityWithAffinityWorkerSelectStrategy ( new org . apache . druid . indexing . overlord . setup . AffinityConfig ( com . google . common . collect . ImmutableMap . of ( "foo" , com . google . common . collect . ImmutableSet . of ( "localhost" ) ) , false ) ) ; org . apache . druid . indexing . overlord . ImmutableWorkerInfo worker = strategy . findWorkerForTask ( new org . apache . druid . indexing . overlord . config . RemoteTaskRunnerConfig ( ) , com . google . common . collect . ImmutableMap . of ( "localhost" , new org . apache . druid . indexing . overlord . ImmutableWorkerInfo ( new org . apache . druid . indexing . worker . Worker ( "http" , "localhost" , "localhost" , 1 , "v1" ) , 0 , new java . util . HashSet ( ) , new java . util . HashSet ( ) , org . apache . druid . java . util . common . DateTimes . nowUtc ( ) ) ) , new org . apache . druid . indexing . common . task . NoopTask ( null , null , 1 , 0 , null , null , null ) ) ; "<AssertPlaceHolder>" ; } nowUtc ( ) { return org . joda . time . DateTime . now ( org . joda . time . chrono . ISOChronology . getInstanceUTC ( ) ) ; }
org . junit . Assert . assertNull ( worker )
testDoseUpdatesIfChanged ( ) { org . drugis . addis . presentation . StudyCharacteristicHolder model = d_model . getCharacteristicModel ( DerivedStudyCharacteristic . DOSING ) ; java . beans . PropertyChangeListener mock = org . drugis . common . JUnitUtil . mockListener ( model , "value" , null , DerivedStudyCharacteristic . Dosing . FLEXIBLE ) ; model . addPropertyChangeListener ( mock ) ; d_study . createAndAddArm ( "A" , 0 , null , new org . drugis . addis . entities . FlexibleDose ( new org . drugis . common . Interval < java . lang . Double > ( 1.0 , 10.0 ) , org . drugis . addis . entities . DoseUnit . createMilliGramsPerDay ( ) ) ) ; verify ( mock ) ; "<AssertPlaceHolder>" ; } getValue ( ) { if ( ( super . getValue ( ) ) == null ) { return initializePlaceholder ( ) ; } return super . getValue ( ) ; }
org . junit . Assert . assertEquals ( DerivedStudyCharacteristic . Dosing . FLEXIBLE , model . getValue ( ) )
testAddingOfSchema ( ) { final de . hpi . isg . mdms . model . MetadataStore store1 = de . hpi . isg . mdms . domain . RDBMSMetadataStore . createNewInstance ( new de . hpi . isg . mdms . rdbms . SQLiteInterface ( connection ) ) ; final de . hpi . isg . mdms . model . targets . Schema schema1 = store1 . addSchema ( "pdb" , "foobar" , new de . hpi . isg . mdms . model . location . DefaultLocation ( ) ) ; "<AssertPlaceHolder>" ; } getSchemas ( ) { return null ; }
org . junit . Assert . assertTrue ( store1 . getSchemas ( ) . contains ( schema1 ) )
testGetInstance ( ) { "<AssertPlaceHolder>" ; } getInstance ( ) { return org . opendaylight . yangtools . yang . parser . spi . meta . QNameCacheNamespace . INSTANCE ; }
org . junit . Assert . assertNotNull ( org . opendaylight . yangtools . yang . parser . spi . meta . QNameCacheNamespace . getInstance ( ) )
testShouldFindBooksByEmptySearchCriteria ( ) { final com . capgemini . techday . rest . BookSearchCriteria searchCriteria = new com . capgemini . techday . rest . BookSearchCriteria ( ) ; java . util . List < com . capgemini . techday . model . to . Book > books = bookService . findBooksBySearchCriteria ( searchCriteria ) ; "<AssertPlaceHolder>" ; } findBooksBySearchCriteria ( com . capgemini . techday . rest . BookSearchCriteria ) { final com . mysema . query . types . Predicate searchPredicate = createSearchParameterPredicate ( bookSearchCriteria ) ; final java . util . List < com . capgemini . techday . model . entity . BookEntity > books = convertIterableToList ( bookRepository . findAll ( searchPredicate ) ) ; return mapBookEntityToBook ( books ) ; }
org . junit . Assert . assertFalse ( books . isEmpty ( ) )
testGetIntervalFromTenantSyncSet ( ) { com . emc . storageos . api . service . impl . resource . utils . StringSet synchronizationOptions = new com . emc . storageos . api . service . impl . resource . utils . StringSet ( ) ; java . lang . String returnedInterval = _synchronizationTask . getIntervalFromTenantSyncSet ( synchronizationOptions ) ; "<AssertPlaceHolder>" ; synchronizationOptions . add ( com . emc . storageos . api . service . impl . resource . utils . OpenStackSynchronizationTaskTest . INTERVAL ) ; checkInterval ( synchronizationOptions ) ; synchronizationOptions . add ( AuthnProvider . TenantsSynchronizationOptions . ADDITION . toString ( ) ) ; checkInterval ( synchronizationOptions ) ; synchronizationOptions . add ( AuthnProvider . TenantsSynchronizationOptions . DELETION . toString ( ) ) ; checkInterval ( synchronizationOptions ) ; } getIntervalFromTenantSyncSet ( com . emc . storageos . api . service . impl . resource . utils . StringSet ) { for ( java . lang . String option : tenantsSynchronizationOptions ) { if ( ( ! ( AuthnProvider . TenantsSynchronizationOptions . ADDITION . toString ( ) . equals ( option ) ) ) && ( ! ( AuthnProvider . TenantsSynchronizationOptions . DELETION . toString ( ) . equals ( option ) ) ) ) { return option ; } } return null ; }
org . junit . Assert . assertNull ( returnedInterval )
shouldAddUsingVarArgs ( ) { com . oracle . bedrock . runtime . options . Arguments arguments = com . oracle . bedrock . runtime . options . Arguments . empty ( ) . with ( "foo" , "bar" ) ; "<AssertPlaceHolder>" ; } resolve ( com . oracle . bedrock . runtime . Platform , com . oracle . bedrock . OptionsByType ) { com . oracle . bedrock . lang . ExpressionEvaluator evaluator = new com . oracle . bedrock . lang . ExpressionEvaluator ( optionsByType ) ; java . util . Properties properties = new java . util . Properties ( ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty property : this . properties . values ( ) ) { java . lang . String name = property . getName ( ) ; java . lang . Object value = property . getValue ( ) ; if ( value != null ) { if ( value instanceof com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) { com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue contextSensitiveValue = ( ( com . oracle . bedrock . runtime . java . options . SystemProperty . ContextSensitiveValue ) ( value ) ) ; value = contextSensitiveValue . resolve ( name , platform , optionsByType ) ; } if ( value instanceof java . util . Iterator < ? > ) { java . util . Iterator < ? > iterator = ( ( java . util . Iterator < ? > ) ( value ) ) ; if ( iterator . hasNext ( ) ) { value = iterator . next ( ) . toString ( ) ; } else { throw new java . lang . IndexOutOfBoundsException ( java . lang . String . format ( "No<sp>more<sp>values<sp>available<sp>for<sp>the<sp>property<sp>[%s]" , name ) ) ; } } if ( value != null ) { java . lang . String expression = value . toString ( ) . trim ( ) ; if ( ! ( expression . isEmpty ( ) ) ) { java . lang . Object result = evaluator . evaluate ( expression , java . lang . Object . class ) ; expression = ( result == null ) ? "" : result . toString ( ) ; } com . oracle . bedrock . OptionsByType propertyOptions = property . getOptions ( ) ; java . lang . Iterable < com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler > handlers = propertyOptions . getInstancesOf ( SystemProperty . ResolveHandler . class ) ; for ( com . oracle . bedrock . runtime . java . options . SystemProperty . ResolveHandler handler : handlers ) { try { handler . onResolve ( name , expression , optionsByType ) ; } catch ( java . lang . Throwable t ) { t . printStackTrace ( ) ; } } properties . put ( name , expression ) ; } } } return properties ; }
org . junit . Assert . assertThat ( arguments . resolve ( null , null ) , contains ( "foo" , "bar" ) )
servicePoll_NonBlocking_different_Operations_timeout ( ) { org . ebayopensource . turmeric . runtime . tests . service1 . sample . types1 . MyMessage msg = org . ebayopensource . turmeric . runtime . tests . common . util . TestUtils . createTestMessage ( ) ; org . ebayopensource . turmeric . runtime . sif . service . Service service = org . ebayopensource . turmeric . runtime . sif . service . ServiceFactory . create ( "test1" , "remote" , serverUri . toURL ( ) ) ; service . createDispatch ( "echoString" ) . invokeAsync ( ECHO_STRING ) ; msg . setBody ( msg . getBody ( ) ) ; service . createDispatch ( "myTestOperation" ) . invokeAsync ( msg ) ; java . util . List < javax . xml . ws . Response < ? > > responseList = service . poll ( false , true , 0 ) ; for ( javax . xml . ws . Response element : responseList ) { System . out . println ( ( "element.get()=" + ( element . get ( ) ) ) ) ; } "<AssertPlaceHolder>" ; } get ( ) { synchronized ( responses ) { if ( ! ( isDone ( ) ) ) responses . wait ( ) ; if ( ( m_interruptedException ) != null ) { throw m_interruptedException ; } return responses ; } }
org . junit . Assert . assertTrue ( ( ( responseList . size ( ) ) < 2 ) )
test1AutorisatieEnAllePersonenWegfilteren ( ) { final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatiebundel = maakAutorisatiebundel ( true ) ; org . mockito . Mockito . when ( leveringsAutorisatieCache . geefAutorisatieBundelsVoorMutatielevering ( ) ) . thenReturn ( com . google . common . collect . Lists . newArrayList ( autorisatiebundel ) ) ; final long PERSOON_A = 1L ; final long PERSOON_B = 2L ; final java . util . HashMap < java . lang . Long , nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst > persoonsLijstMap = com . google . common . collect . Maps . newHashMap ( ) ; final nl . bzk . brp . domain . leveringmodel . AdministratieveHandeling administratieveHandeling = nl . bzk . brp . domain . leveringmodel . TestVerantwoording . maakAdministratieveHandeling ( 1 ) ; persoonsLijstMap . put ( PERSOON_A , nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . maakBasisPersoon ( PERSOON_A , administratieveHandeling . getActie ( 1 ) ) ) ; persoonsLijstMap . put ( PERSOON_B , nl . bzk . brp . domain . leveringmodel . helper . TestBuilders . maakBasisPersoon ( PERSOON_B , administratieveHandeling . getActie ( 1 ) ) ) ; final nl . bzk . brp . service . mutatielevering . dto . Mutatiehandeling mutatiehandeling = new nl . bzk . brp . service . mutatielevering . dto . Mutatiehandeling ( administratieveHandeling . getId ( ) , persoonsLijstMap ) ; final java . util . HashMap < nl . bzk . brp . domain . leveringmodel . persoon . Persoonslijst , nl . bzk . brp . domain . algemeen . Populatie > populatieMap = com . google . common . collect . Maps . newHashMap ( ) ; populatieMap . put ( persoonsLijstMap . get ( PERSOON_A ) , Populatie . BINNEN ) ; populatieMap . put ( persoonsLijstMap . get ( PERSOON_B ) , Populatie . BUITEN ) ; org . mockito . Mockito . when ( populatieBepalingService . bepaalPersoonPopulatieCorrelatie ( mutatiehandeling , autorisatiebundel ) ) . thenReturn ( populatieMap ) ; org . mockito . Mockito . when ( leveringFilterService . bepaalTeLeverenPersonen ( autorisatiebundel , populatieMap ) ) . thenReturn ( com . google . common . collect . Sets . newHashSet ( ) ) ; final java . util . List < nl . bzk . brp . service . mutatielevering . dto . Mutatielevering > mutatieleveringList = service . bepaalLeveringen ( mutatiehandeling ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
org . junit . Assert . assertTrue ( mutatieleveringList . isEmpty ( ) )
testFetch ( ) { org . ds . chronos . metrics . MetricStore store = new org . ds . chronos . metrics . MetricStore ( chronicle ) ; java . util . List < org . ds . chronos . metrics . Metric > metrics = new java . util . ArrayList < org . ds . chronos . metrics . Metric > ( ) ; for ( int i = 0 ; i < 128 ; i ++ ) { metrics . add ( new org . ds . chronos . metrics . Metric ( ( i * 1000 ) , 10.0F ) ) ; } store . add ( metrics ) ; java . util . List < org . ds . chronos . metrics . Metric > set = store . query ( 0 , 128000 ) . toList ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return source . size ( ) ; }
org . junit . Assert . assertEquals ( 128 , set . size ( ) )
testJsonToJava_nestedArray ( ) { org . eclipse . rap . json . JsonArray array = new org . eclipse . rap . json . JsonArray ( ) . add ( true ) . add ( new org . eclipse . rap . json . JsonArray ( ) . add ( 5 ) . add ( "foo" ) ) ; java . lang . Object [ ] result = ( ( java . lang . Object [ ] ) ( org . eclipse . swt . internal . browser . browserkit . BrowserOperationHandler . jsonToJava ( array ) ) ) ; java . lang . Object [ ] expected = new java . lang . Object [ ] { Boolean . TRUE , new java . lang . Object [ ] { java . lang . Double . valueOf ( 5 ) , "foo" } } ; "<AssertPlaceHolder>" ; } valueOf ( boolean ) { return result ? Boolean . TRUE : Boolean . FALSE ; }
org . junit . Assert . assertArrayEquals ( expected , result )
serialize_map_to_xml ( ) { com . thoughtworks . xstream . XStream xStream = new com . thoughtworks . xstream . XStream ( ) ; xStream . alias ( "map" , java . util . Map . class ) ; java . lang . String xml = xStream . toXML ( restaurantByKey ) ; com . levelup . java . xml . XMLToMapXstream . logger . info ( xml ) ; "<AssertPlaceHolder>" ; }
org . junit . Assert . assertNotNull ( xml )
testIPv6CorrectAddress ( ) { try { new org . jboss . netty . handler . codec . socks . SocksCmdRequest ( SocksMessage . CmdType . BIND , SocksMessage . AddressType . IPv6 , "xxx:xxx:xxx" , 0 ) ; } catch ( java . lang . Exception e ) { "<AssertPlaceHolder>" ; } }
org . junit . Assert . assertTrue ( ( e instanceof java . lang . IllegalArgumentException ) )
initializeWhenFormatIdAlreadyInContext ( ) { org . xwiki . context . ExecutionContext ec = new org . xwiki . context . ExecutionContext ( ) ; ec . setProperty ( "urlscheme" , "existing" ) ; this . mocker . getComponentUnderTest ( ) . initialize ( ec ) ; "<AssertPlaceHolder>" ; } getProperty ( java . lang . String ) { try { com . xpn . xwiki . objects . PropertyInterface prop = getCollection ( ) . get ( name ) ; if ( prop == null ) { return null ; } return new com . xpn . xwiki . api . Property ( ( ( com . xpn . xwiki . objects . BaseProperty ) ( prop ) ) , getXWikiContext ( ) ) ; } catch ( java . lang . Exception e ) { return null ; } }
org . junit . Assert . assertEquals ( "existing" , ec . getProperty ( "urlscheme" ) )
updateOKProperties ( ) { testedStore . createProperty ( new org . ff4j . property . PropertyLogLevel ( "logX" , org . ff4j . property . PropertyLogLevel . LogLevel . ERROR ) ) ; org . ff4j . property . PropertyLogLevel pll = new org . ff4j . property . PropertyLogLevel ( "logX" , org . ff4j . property . PropertyLogLevel . LogLevel . INFO ) ; testedStore . updateProperty ( pll ) ; "<AssertPlaceHolder>" ; } readProperty ( java . lang . String ) { return ( ( org . ff4j . property . Property < ? > ) ( propertySource . getProperty ( name ) ) ) ; }
org . junit . Assert . assertEquals ( LogLevel . INFO , testedStore . readProperty ( "logX" ) . getValue ( ) )