input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testToBuilder ( ) { com . google . cloud . datastore . DoubleValue value = com . google . cloud . datastore . DoubleValue . of ( com . google . cloud . datastore . DoubleValueTest . CONTENT ) ; "<AssertPlaceHolder>" ; } toBuilder ( ) { return ( this ) == ( com . google . firestore . admin . v1 . DeleteIndexRequest . DEFAULT_INSTANCE ) ? new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) : new com . google . firestore . admin . v1 . DeleteIndexRequest . Builder ( ) . mergeFrom ( this ) ; }
|
org . junit . Assert . assertEquals ( value , value . toBuilder ( ) . build ( ) )
|
actionInActionList ( ) { java . lang . String action = generateText ( ) ; actionEvaluator . setAction ( action ) ; org . json . simple . JSONObject json = ( ( org . json . simple . JSONObject ) ( new org . json . simple . parser . JSONParser ( ) . parse ( ( ( "{\"node\":{\"rmNode\":{\"actions\":[\"" + action ) + "\"]}}}" ) ) ) ) ; "<AssertPlaceHolder>" ; } evaluate ( org . alfresco . service . cmr . repository . NodeRef ) { int result = net . sf . acegisecurity . vote . AccessDecisionVoter . ACCESS_ABSTAIN ; java . util . Map < java . lang . String , java . lang . Integer > map = org . alfresco . repo . transaction . TransactionalResourceHelper . getMap ( "rm.declarativeCapability" ) ; java . lang . String key = ( ( ( ( getName ( ) ) + "|" ) + ( nodeRef . toString ( ) ) ) + "|" ) + ( org . alfresco . repo . security . authentication . AuthenticationUtil . getRunAsUser ( ) ) ; if ( map . containsKey ( key ) ) { result = map . get ( key ) ; } else { if ( getFilePlanService ( ) . isFilePlanComponent ( nodeRef ) ) { if ( ( ( checkKinds ( nodeRef ) ) && ( checkPermissions ( nodeRef ) ) ) && ( checkConditions ( nodeRef ) ) ) { result = evaluateImpl ( nodeRef ) ; } else { result = net . sf . acegisecurity . vote . AccessDecisionVoter . ACCESS_DENIED ; } } result = onEvaluate ( nodeRef , result ) ; if ( ( org . alfresco . module . org_alfresco_module_rm . capability . declarative . DeclarativeCapability . LOGGER . isDebugEnabled ( ) ) && ( ( net . sf . acegisecurity . vote . AccessDecisionVoter . ACCESS_DENIED ) == result ) ) { org . alfresco . module . org_alfresco_module_rm . capability . declarative . DeclarativeCapability . LOGGER . debug ( ( ( ( "Capability<sp>" + ( getName ( ) ) ) + "<sp>returned<sp>an<sp>Access<sp>Denied<sp>result<sp>during<sp>evaluation<sp>of<sp>node<sp>" ) + ( nodeRef . toString ( ) ) ) ) ; } map . put ( key , result ) ; } return result ; }
|
org . junit . Assert . assertTrue ( actionEvaluator . evaluate ( json ) )
|
testGeenRedenVerkrijging ( ) { java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > meldingen ; nl . bzk . brp . model . bericht . kern . PersoonBericht persoon = bouwPersoon ( bouwRedenVerkrijging ( nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . nationaliteit . BRBY0176Test . GELDIGE_REDEN_VERKRIJGING_CODE , null , null ) ) ; org . springframework . test . util . ReflectionTestUtils . setField ( persoon . getNationaliteiten ( ) . iterator ( ) . next ( ) . getStandaard ( ) , "redenVerkrijging" , null ) ; meldingen = bedrijfsregel . voerRegelUit ( null , persoon , null , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
|
testMoreMethods ( ) { jetbrick . bean . asm . AsmBigClassTest . BigClass a = new jetbrick . bean . asm . AsmBigClassTest . BigClass ( ) ; jetbrick . bean . KlassInfo klass = jetbrick . bean . KlassInfo . create ( jetbrick . bean . asm . AsmBigClassTest . BigClass . class ) ; jetbrick . bean . MethodInfo method = klass . getDeclaredMethod ( "a150" ) ; "<AssertPlaceHolder>" ; } getDeclaredMethod ( java . lang . reflect . Method ) { for ( jetbrick . bean . MethodInfo info : declaredMethodsGetter . get ( ) ) { if ( ( info . getMethod ( ) ) == method ) { return info ; } } return null ; }
|
org . junit . Assert . assertEquals ( 0 , method . invoke ( a ) )
|
testMetdataPreviewSqlBooleanToPentahoBoolean ( ) { doReturn ( Types . BOOLEAN ) . when ( resultSet ) . getInt ( "DATA_TYPE" ) ; org . pentaho . di . core . row . ValueMetaInterface valueMeta = valueMetaBase . getMetadataPreview ( dbMeta , resultSet ) ; "<AssertPlaceHolder>" ; } isBoolean ( ) { return ( type ) == ( TYPE_BOOLEAN ) ; }
|
org . junit . Assert . assertTrue ( valueMeta . isBoolean ( ) )
|
setWritableEmulation ( ) { org . apache . hadoop . io . MapWritable src = new org . apache . hadoop . io . MapWritable ( ) ; src . put ( new org . apache . hadoop . io . IntWritable ( 1 ) , org . apache . hadoop . io . NullWritable . get ( ) ) ; src . put ( new org . apache . hadoop . io . IntWritable ( 2 ) , org . apache . hadoop . io . NullWritable . get ( ) ) ; org . apache . hadoop . io . MapWritable dest = new org . apache . hadoop . io . MapWritable ( ) ; org . apache . hadoop . util . ReflectionUtils . copy ( new org . apache . hadoop . conf . Configuration ( ) , src , dest ) ; "<AssertPlaceHolder>" ; } get ( ) { return new cc . pp . hadoop . io . MyWritableComparator ( org . apache . hadoop . io . IntWritable . class ) ; }
|
org . junit . Assert . assertThat ( dest . containsKey ( new org . apache . hadoop . io . IntWritable ( 1 ) ) , org . hamcrest . CoreMatchers . is ( true ) )
|
testHistorischZoekBereikMaterieelGeenAutorisatieMaarGeenHistorieGroep ( ) { final nl . bzk . brp . domain . element . AttribuutElement attribuutElement = getAttribuutElement ( Element . PERSOON_GEBOORTE_DATUM . getId ( ) ) ; final nl . bzk . brp . service . bevraging . zoekpersoongeneriek . AbstractZoekPersoonVerzoek bevragingVerzoek = maakBevragingVerzoek ( attribuutElement , "1900-10-10" , Zoekoptie . EXACT ) ; bevragingVerzoek . getParameters ( ) . setZoekBereik ( Zoekbereik . MATERIELE_PERIODE ) ; final nl . bzk . brp . domain . algemeen . Autorisatiebundel autorisatieBundel = maakAutorisatiebundel ( false , attribuutElement ) ; final java . util . Set < nl . bzk . brp . domain . algemeen . Melding > meldingen = valideerZoekCriteriaService . valideerZoekCriteria ( bevragingVerzoek , autorisatieBundel ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
|
testIsCheckerDisabledWhenSettingForbiddenGroupToUser ( ) { long forbiddenGroupId = addForbiddenGroups ( ) [ 0 ] ; com . liferay . portal . kernel . model . Group forbiddenGroup = com . liferay . portal . kernel . service . GroupLocalServiceUtil . getGroup ( forbiddenGroupId ) ; com . liferay . portlet . sitesadmin . search . SiteMembershipChecker siteMembershipChecker = new com . liferay . portlet . sitesadmin . search . SiteMembershipChecker ( com . liferay . portal . security . membership . policy . site . test . SiteMembershipPolicyRowCheckerTest . _renderResponse , forbiddenGroup ) ; com . liferay . portal . kernel . model . User user = com . liferay . portal . kernel . test . util . UserTestUtil . addUser ( ) ; "<AssertPlaceHolder>" ; } isDisabled ( java . lang . Object ) { com . liferay . portal . kernel . model . UserNotificationEvent userNotificationEvent = ( ( com . liferay . portal . kernel . model . UserNotificationEvent ) ( obj ) ) ; if ( userNotificationEvent . isActionRequired ( ) ) { return true ; } return super . isDisabled ( obj ) ; }
|
org . junit . Assert . assertTrue ( siteMembershipChecker . isDisabled ( user ) )
|
testBuildWithParametersAndDisabledDefaultConstraint ( ) { unit . setActive ( false ) ; unit . setSecurity ( false ) ; java . lang . String name = "fsdfds" ; java . lang . String abbrName = "dog" ; org . lnu . is . domain . optype . OperationType context = new org . lnu . is . domain . optype . OperationType ( ) ; context . setAbbrName ( abbrName ) ; context . setName ( name ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>OperationType<sp>e<sp>WHERE<sp>(<sp>e.name<sp>LIKE<sp>CONCAT('%',:name,'%')<sp>AND<sp>e.abbrName<sp>LIKE<sp>CONCAT('%',:abbrName,'%')<sp>)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . optype . OperationType > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
getReportByMultipleProcessDefinitionIdByMonthNoAuthenticatedTenants ( ) { testRule . deployForTenant ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_ONE , org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . BPMN_PROCESS ) ; testRule . deployForTenant ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_TWO , org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . BPMN_PROCESS ) ; startAndCompleteProcessInstance ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_ONE ) ; startAndCompleteProcessInstance ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_TWO ) ; java . lang . String processDefinitionIdOne = repositoryService . createProcessDefinitionQuery ( ) . tenantIdIn ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_ONE ) . singleResult ( ) . getId ( ) ; java . lang . String processDefinitionIdTwo = repositoryService . createProcessDefinitionQuery ( ) . tenantIdIn ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MultiTenancyHistoricProcessInstanceReportCmdTenantCheckTest . TENANT_TWO ) . singleResult ( ) . getId ( ) ; identityService . setAuthentication ( "user" , null , null ) ; java . util . List < org . camunda . bpm . engine . history . DurationReportResult > result = historyService . createHistoricProcessInstanceReport ( ) . processDefinitionIdIn ( processDefinitionIdOne , processDefinitionIdTwo ) . duration ( org . camunda . bpm . engine . test . api . multitenancy . tenantcheck . MONTH ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( ( historicProcessInstanceIds . size ( ) ) + ( historicDecisionInstanceIds . size ( ) ) ) + ( historicCaseInstanceIds . size ( ) ) ) + ( historicBatchIds . size ( ) ) ; }
|
org . junit . Assert . assertThat ( result . size ( ) , org . hamcrest . CoreMatchers . is ( 0 ) )
|
testPreGenMovesIteratorSkipMoves ( ) { barrysw19 . calculon . engine . PreGeneratedMoves . PreGeneratedMoveIterator iter = new barrysw19 . calculon . engine . PreGeneratedMoves . PreGeneratedMoveIterator ( PreGeneratedMoves . SLIDE_MOVES [ 15 ] ) ; iter . next ( ) ; iter . nextDirection ( ) ; int count = 0 ; while ( ( iter . next ( ) ) != 0 ) { count ++ ; } "<AssertPlaceHolder>" ; } next ( ) { if ( ! ( hasNext ( ) ) ) { throw new java . util . NoSuchElementException ( ) ; } return iterators [ index ] . next ( ) ; }
|
org . junit . Assert . assertEquals ( 15 , count )
|
testFindPersonWithQueryAnnotation ( ) { final org . springframework . data . neo4j . support . TestTeam testTeam = new org . springframework . data . neo4j . support . TestTeam ( ) ; testTeam . createSDGTeam ( ) ; org . springframework . data . neo4j . support . Person boss = personRepository . findBoss ( testTeam . michael ) ; "<AssertPlaceHolder>" ; } createSDGTeam ( ) { michael = org . springframework . data . neo4j . Person . persistedPerson ( "Michael" , 36 ) ; emil = org . springframework . data . neo4j . Person . persistedPerson ( "Emil" , 30 ) ; michael . setBoss ( emil ) ; michael . setPersonality ( Personality . EXTROVERT ) ; david = org . springframework . data . neo4j . Person . persistedPerson ( "David" , 25 ) ; david . setBoss ( emil ) ; sdg = new org . springframework . data . neo4j . Group ( ) . persist ( ) ; sdg . setName ( "SDG" ) ; sdg . addPerson ( michael ) ; sdg . addPerson ( emil ) ; sdg . addPerson ( david ) ; }
|
org . junit . Assert . assertThat ( boss , org . hamcrest . CoreMatchers . is ( testTeam . emil ) )
|
testSetTBarSizeNumListKONotSameSize ( ) { final java . util . List < java . util . Optional < java . lang . Double > > vals = java . util . Arrays . asList ( java . util . Optional . of ( arr1 . getTBarSizeNum ( ) ) , java . util . Optional . of ( arr2 . getTBarSizeNum ( ) ) ) ; group . setTBarSizeNumList ( java . util . Arrays . asList ( java . util . Optional . of ( 34.0 ) , java . util . Optional . of ( 22.0 ) ) ) ; "<AssertPlaceHolder>" ; } getTBarSizeNum ( ) { return firstIArrowable ( ) . map ( ( sh ) -> sh . getTBarSizeNum ( ) ) . orElse ( Double . NaN ) ; }
|
org . junit . Assert . assertEquals ( vals , java . util . Arrays . asList ( java . util . Optional . of ( arr1 . getTBarSizeNum ( ) ) , java . util . Optional . of ( arr2 . getTBarSizeNum ( ) ) ) )
|
testPersoonMetWijzigingGeslachtsnaamMaarNietIngeschrevene ( ) { final nl . bzk . brp . model . bericht . kern . PersoonBericht persoonBericht = maakPersoon ( "van" , "-" , "Brom" , null , null ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . PersoonHisVolledigImpl persoonHisVolledig = maakHuidigePersoon ( SoortPersoon . NIET_INGESCHREVENE , null ) ; final nl . bzk . brp . model . hisvolledig . impl . kern . OuderHisVolledigImpl ouderBetr = new nl . bzk . brp . util . hisvolledig . kern . OuderHisVolledigImplBuilder ( null , persoonHisVolledig ) . nieuwOuderschapRecord ( 20120101 , null , 20120101 ) . eindeRecord ( ) . build ( ) ; persoonHisVolledig . getBetrokkenheden ( ) . add ( ouderBetr ) ; final java . util . List < nl . bzk . brp . model . basis . BerichtEntiteit > berichtEntiteiten = new nl . bzk . brp . bijhouding . business . regels . impl . gegevenset . persoon . geslachtsnaamcomponent . BRBY0183 ( ) . voerRegelUit ( new nl . bzk . brp . model . hisvolledig . momentview . kern . PersoonView ( persoonHisVolledig ) , persoonBericht , null , null ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return elementen . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( berichtEntiteiten . isEmpty ( ) )
|
test_GetSlider_By_Name ( ) { when ( element . findFirst ( mmarquee . automation . BaseAutomationTest . isTreeScope ( TreeScope . Descendants ) , any ( ) ) ) . thenReturn ( targetElement ) ; mmarquee . automation . controls . AutomationSlider slider = spyWndw . getSlider ( mmarquee . automation . controls . Search . getBuilder ( "myName" ) . build ( ) ) ; "<AssertPlaceHolder>" ; verify ( spyWndw ) . createNamePropertyCondition ( "myName" ) ; verify ( spyWndw ) . createControlTypeCondition ( ControlType . Slider ) ; verify ( element , atLeastOnce ( ) ) . findFirst ( any ( ) , any ( ) ) ; } getElement ( ) { return this . element ; }
|
org . junit . Assert . assertEquals ( targetElement , slider . getElement ( ) )
|
testCodesAreUnique ( ) { final java . util . Set < java . lang . Object > codes = new java . util . HashSet < java . lang . Object > ( ) ; for ( final org . springframework . roo . support . util . AnsiEscapeCode escapeCode : org . springframework . roo . support . util . AnsiEscapeCode . values ( ) ) { codes . add ( escapeCode . code ) ; } "<AssertPlaceHolder>" ; } values ( ) { return customData . values ( ) ; }
|
org . junit . Assert . assertEquals ( org . springframework . roo . support . util . AnsiEscapeCode . values ( ) . length , codes . size ( ) )
|
testXmlReaderMLAlgorithm ( ) { java . util . List < org . aksw . limes . core . ml . algorithm . LearningParameter > mlParameters = new java . util . ArrayList ( ) ; org . aksw . limes . core . ml . algorithm . LearningParameter lp = new org . aksw . limes . core . ml . algorithm . LearningParameter ( ) ; lp . setName ( "max<sp>execution<sp>time<sp>in<sp>minutes" ) ; lp . setValue ( 60 ) ; mlParameters . add ( lp ) ; lp = new org . aksw . limes . core . ml . algorithm . LearningParameter ( ) ; lp . setName ( "beta" ) ; lp . setValue ( 5.0 ) ; mlParameters . add ( lp ) ; testConf . setMlAlgorithmName ( "wombat<sp>simple" ) ; testConf . setMlImplementationType ( MLImplementationType . UNSUPERVISED ) ; testConf . setMlAlgorithmParameters ( mlParameters ) ; java . lang . String file = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResource ( "lgd-lgd-ml.xml" ) . getPath ( ) ; org . aksw . limes . core . io . config . reader . xml . XMLConfigurationReader c = new org . aksw . limes . core . io . config . reader . xml . XMLConfigurationReader ( file ) ; org . aksw . limes . core . io . config . Configuration fileConf = c . read ( ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return true ; if ( obj == null ) return false ; if ( ( org . aksw . limes . core . datastrutures . PairDissimilar . getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; org . aksw . limes . core . datastrutures . PairSimilar < ? > other = ( ( org . aksw . limes . core . datastrutures . PairSimilar < ? > ) ( obj ) ) ; if ( ( a ) == null ) { if ( ( other . a ) != null ) return false ; } else if ( ! ( a . equals ( other . a ) ) ) return false ; if ( ( b ) == null ) { if ( ( other . b ) != null ) return false ; } else if ( ! ( b . equals ( other . b ) ) ) return false ; return true ; }
|
org . junit . Assert . assertTrue ( testConf . equals ( fileConf ) )
|
testMolecularFormula ( ) { org . openscience . cdk . interfaces . IMolecularFormula mf = getBuilder ( ) . newInstance ( org . openscience . cdk . interfaces . IMolecularFormula . class ) ; "<AssertPlaceHolder>" ; } getBuilder ( ) { return null ; }
|
org . junit . Assert . assertNotNull ( mf )
|
testEmptyTemplate ( ) { info . smart_tools . smartactors . http_endpoint . deserialize_strategy_get . parse_tree . IParseTree tree = new info . smart_tools . smartactors . http_endpoint . deserialize_strategy_get . parse_tree . ParseTree ( ) ; tree . addTemplate ( "/" ) ; java . util . Map < java . lang . String , java . lang . String > resultMap = tree . match ( "/" ) ; "<AssertPlaceHolder>" ; } size ( ) { return template . size ( ) ; }
|
org . junit . Assert . assertEquals ( resultMap . size ( ) , 0 )
|
testSetRegex ( ) { java . lang . String regex = ">\"*%<>\'\\" ; org . apache . accumulo . core . client . IteratorSetting is = new org . apache . accumulo . core . client . IteratorSetting ( 50 , regex , org . apache . accumulo . core . iterators . user . RegExFilter . class ) ; org . apache . accumulo . core . iterators . user . RegExFilter . setRegexs ( is , regex , null , null , null , false ) ; org . apache . accumulo . core . client . mapred . AccumuloInputFormat . addIterator ( job , is ) ; "<AssertPlaceHolder>" ; } getIterators ( org . apache . hadoop . mapred . JobConf ) { return org . apache . accumulo . core . clientImpl . mapreduce . lib . InputConfigurator . getIterators ( org . apache . accumulo . core . client . mapred . CLASS , job ) ; }
|
org . junit . Assert . assertEquals ( regex , org . apache . accumulo . core . client . mapred . AccumuloInputFormat . getIterators ( job ) . get ( 0 ) . getName ( ) )
|
writeCertificate2 ( ) { org . apache . hadoop . hdds . security . x509 . keys . HDDSKeyGenerator keyGenerator = new org . apache . hadoop . hdds . security . x509 . keys . HDDSKeyGenerator ( org . apache . hadoop . hdds . security . x509 . certificate . utils . TestCertificateCodec . conf ) ; org . bouncycastle . cert . X509CertificateHolder cert = org . apache . hadoop . hdds . security . x509 . certificates . utils . SelfSignedCertificate . newBuilder ( ) . setSubject ( org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 4 ) ) . setClusterID ( org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 4 ) ) . setScmID ( org . apache . commons . lang3 . RandomStringUtils . randomAlphabetic ( 4 ) ) . setBeginDate ( java . time . LocalDate . now ( ) ) . setEndDate ( java . time . LocalDate . now ( ) . plus ( 1 , ChronoUnit . DAYS ) ) . setConfiguration ( keyGenerator . getSecurityConfig ( ) . getConfiguration ( ) ) . setKey ( keyGenerator . generateKey ( ) ) . makeCA ( ) . build ( ) ; org . apache . hadoop . hdds . security . x509 . certificate . utils . CertificateCodec codec = new org . apache . hadoop . hdds . security . x509 . certificate . utils . CertificateCodec ( keyGenerator . getSecurityConfig ( ) , "ca" ) ; codec . writeCertificate ( cert , "newcert.crt" , false ) ; codec . writeCertificate ( cert , "newcert.crt" , true ) ; org . bouncycastle . cert . X509CertificateHolder x509CertificateHolder = codec . readCertificate ( codec . getLocation ( ) , "newcert.crt" ) ; "<AssertPlaceHolder>" ; } getLocation ( ) { return location ; }
|
org . junit . Assert . assertNotNull ( x509CertificateHolder )
|
testSetAdapterNull ( ) { destination . setAdapter ( null ) ; flex . messaging . services . ServiceAdapter actual = destination . getAdapter ( ) ; "<AssertPlaceHolder>" ; } getAdapter ( ) { return adapter ; }
|
org . junit . Assert . assertNull ( actual )
|
testSingletonCreation ( ) { org . pentaho . reporting . libraries . base . boot . ObjectFactorySingleton objectFactorySingleton1 = objectFactory . get ( org . pentaho . reporting . libraries . base . boot . ObjectFactorySingleton . class ) ; org . pentaho . reporting . libraries . base . boot . ObjectFactorySingleton objectFactorySingleton2 = objectFactory . get ( org . pentaho . reporting . libraries . base . boot . ObjectFactorySingleton . class ) ; "<AssertPlaceHolder>" ; } get ( java . lang . String ) { return backend . get ( dsName ) ; }
|
org . junit . Assert . assertTrue ( ( objectFactorySingleton1 == objectFactorySingleton2 ) )
|
should_return_this ( ) { org . fest . assertions . api . CharacterAssert returned = assertions . isLowerCase ( ) ; "<AssertPlaceHolder>" ; } isLowerCase ( ) { characters . assertLowerCase ( description , actual ) ; return this ; }
|
org . junit . Assert . assertSame ( assertions , returned )
|
construct_withFilledCause ( ) { final net . sf . qualitycheck . exception . IllegalNullElementsException e = new net . sf . qualitycheck . exception . IllegalNullElementsException ( new java . lang . NumberFormatException ( ) ) ; final java . lang . String expected = IllegalNullElementsException . DEFAULT_MESSAGE ; "<AssertPlaceHolder>" ; } getMessage ( ) { final java . lang . String message = super . getMessage ( ) ; if ( ( session ) != null ) { final java . lang . String context = session . getContext ( ) ; if ( ! ( context . isEmpty ( ) ) ) { return ( message + "<sp>" ) + context ; } else { return message ; } } else { return message ; } }
|
org . junit . Assert . assertEquals ( expected , e . getMessage ( ) )
|
testProcessSong ( ) { int testLength = 1 ; org . bff . javampd . processor . TimeTagProcessor timeTagProcessor = new org . bff . javampd . processor . TimeTagProcessor ( ) ; org . bff . javampd . song . MPDSong song = new org . bff . javampd . song . MPDSong ( "testFile" , "testName" ) ; java . lang . String line = "Time:" + testLength ; timeTagProcessor . processTag ( song , line ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return length ; }
|
org . junit . Assert . assertEquals ( testLength , song . getLength ( ) )
|
test1 ( ) { java . util . prefs . Preferences prefs = java . util . prefs . Preferences . userNodeForPackage ( com . planet57 . gshell . util . pref . NameTest . Simple . class ) ; prefs . put ( "bar" , "foo" ) ; processor . process ( ) ; "<AssertPlaceHolder>" ; } process ( ) { com . planet57 . gshell . util . pref . PreferenceProcessor . log . trace ( "Processing<sp>preference<sp>descriptors" ) ; for ( com . planet57 . gshell . util . pref . PreferenceDescriptor desc : descriptors ) { com . planet57 . gshell . util . pref . PreferenceProcessor . log . trace ( "Descriptor:<sp>{}" , desc ) ; java . util . prefs . Preferences prefs = desc . getPreferences ( ) ; com . planet57 . gshell . util . pref . PreferenceProcessor . log . trace ( "Using<sp>preferences:<sp>{}" , prefs ) ; java . lang . String key = desc . getId ( ) ; java . lang . String value = prefs . get ( key , null ) ; com . planet57 . gshell . util . pref . PreferenceProcessor . log . trace ( "<sp>{}={}" , key , value ) ; if ( value != null ) { com . planet57 . gshell . util . setter . Setter setter = desc . getSetter ( ) ; setter . set ( com . planet57 . gshell . util . converter . Converters . getValue ( setter . getType ( ) , value ) ) ; } } }
|
org . junit . Assert . assertEquals ( "foo" , bean . name )
|
testAddServerString ( ) { final com . allanbank . mongodb . MongoDbConfiguration config = new com . allanbank . mongodb . MongoDbConfiguration ( ) ; config . addServer ( "foo:1234" ) ; config . addServer ( "bar:1234" ) ; "<AssertPlaceHolder>" ; } getServers ( ) { return new java . util . ArrayList < com . allanbank . mongodb . client . state . Server > ( myServers . values ( ) ) ; }
|
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "foo:1234" , "bar:1234" ) , config . getServers ( ) )
|
testConcurrentBagForLeaks ( ) { org . junit . Assume . assumeTrue ( ( ! ( isJava9 ( ) ) ) ) ; java . lang . ClassLoader cl = new com . zaxxer . hikari . pool . TestElf . FauxWebClassLoader ( ) ; java . lang . Class < ? > clazz = cl . loadClass ( ( ( this . getClass ( ) . getName ( ) ) + "$FauxWebContext" ) ) ; java . lang . Object fauxWebContext = clazz . newInstance ( ) ; java . lang . reflect . Method createConcurrentBag = clazz . getDeclaredMethod ( "createConcurrentBag" ) ; createConcurrentBag . invoke ( fauxWebContext ) ; java . lang . reflect . Field failureException = clazz . getDeclaredField ( "failureException" ) ; java . lang . Exception ex = ( ( java . lang . Exception ) ( failureException . get ( fauxWebContext ) ) ) ; "<AssertPlaceHolder>" ; } get ( int ) { return elementData [ index ] ; }
|
org . junit . Assert . assertNull ( ex )
|
hasPostCreateDomainPermissions_succeedsAsSystemResource ( ) { authenticateSystemResource ( ) ; final java . util . Set < com . acciente . oacc . DomainCreatePermission > allDomainCreatePermissions = accessControlContext . getEffectiveDomainCreatePermissions ( com . acciente . oacc . SYS_RESOURCE ) ; "<AssertPlaceHolder>" ; if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . CREATE_CHILD_DOMAIN ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . CREATE_CHILD_DOMAIN ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . DELETE ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . DELETE ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . SUPER_USER ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . SUPER_USER ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . CREATE_CHILD_DOMAIN ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . CREATE_CHILD_DOMAIN ) , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . DELETE ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . DELETE ) , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . SUPER_USER ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . SUPER_USER ) ) ) ) { org . junit . Assert . fail ( "checking<sp>all<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . CREATE_CHILD_DOMAIN ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . CREATE_CHILD_DOMAIN ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . DELETE ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . DELETE ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . SUPER_USER ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . SUPER_USER ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } if ( ! ( accessControlContext . hasPostCreateDomainPermissions ( com . acciente . oacc . SYS_RESOURCE , setOf ( com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . CREATE_CHILD_DOMAIN ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . CREATE_CHILD_DOMAIN ) , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . DELETE ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . DELETE ) , com . acciente . oacc . DomainPermissions . getInstance ( DomainPermissions . SUPER_USER ) , com . acciente . oacc . DomainPermissions . getInstanceWithGrantOption ( DomainPermissions . SUPER_USER ) ) ) ) ) { org . junit . Assert . fail ( "checking<sp>all<sp>implicit<sp>post-create<sp>domain<sp>permission<sp>with<sp>grant<sp>should<sp>have<sp>succeeded<sp>as<sp>system<sp>resource" ) ; } } getEffectiveDomainCreatePermissions ( com . acciente . oacc . Resource ) { com . acciente . oacc . sql . internal . persister . SQLConnection connection = null ; __assertAuthenticated ( ) ; __assertResourceSpecified ( accessorResource ) ; try { connection = __getConnection ( ) ; accessorResource = __resolveResource ( connection , accessorResource ) ; __assertQueryAuthorization ( connection , accessorResource ) ; return __getEffectiveDomainCreatePermissions ( connection , accessorResource ) ; } finally { __closeConnection ( connection ) ; } }
|
org . junit . Assert . assertThat ( allDomainCreatePermissions . isEmpty ( ) , org . hamcrest . CoreMatchers . is ( false ) )
|
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . site . model . SiteFriendlyURL . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "siteFriendlyURLId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "siteFriendlyURLId" , new java . lang . Object [ ] { com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) } ) ) ; java . util . List < java . lang . Object > result = _persistence . findWithDynamicQuery ( dynamicQuery ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( _workflowTaskAssignees ) != null ) { return _workflowTaskAssignees . size ( ) ; } return _kaleoTaskAssignmentInstanceLocalService . getKaleoTaskAssignmentInstancesCount ( _kaleoTaskInstanceToken . getKaleoTaskInstanceTokenId ( ) ) ; }
|
org . junit . Assert . assertEquals ( 0 , result . size ( ) )
|
testFetchByPrimaryKeysWithNoPrimaryKeys ( ) { java . util . Set < java . io . Serializable > primaryKeys = new java . util . HashSet < java . io . Serializable > ( ) ; java . util . Map < java . io . Serializable , com . liferay . social . kernel . model . SocialActivityAchievement > socialActivityAchievements = _persistence . fetchByPrimaryKeys ( primaryKeys ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return _portalCacheListeners . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( socialActivityAchievements . isEmpty ( ) )
|
testExtraAttributesMultipleDependenciesNoHang ( ) { org . apache . ivy . Ivy ivy = new org . apache . ivy . Ivy ( ) ; ivy . configure ( new java . io . File ( "test/repositories/extra-attributes-multipledependencies/ivysettings-filerepo-noattribs.xml" ) ) ; ivy . getSettings ( ) . setDefaultCache ( cache ) ; org . apache . ivy . core . report . ResolveReport report = ivy . resolve ( org . apache . ivy . core . resolve . ResolveTest . class . getResource ( "ivy-extra-att-multipledependencies.xml" ) , getResolveOptions ( ivy . getSettings ( ) , new java . lang . String [ ] { "*" } ) . setValidate ( false ) ) ; "<AssertPlaceHolder>" ; } hasError ( ) { return ( ( getUnresolvedDependencies ( ) . length ) > 0 ) || ( ( getFailedArtifactsReports ( ) . length ) > 0 ) ; }
|
org . junit . Assert . assertFalse ( report . hasError ( ) )
|
shouldGetEmailByCode_ifNotFound ( ) { com . codenjoy . dojo . services . dao . RegistrationTest . service . register ( "user" , "email" , "name" , "pass" , "data" ) ; java . lang . String email = com . codenjoy . dojo . services . dao . RegistrationTest . service . getIdByCode ( "bad_code" ) ; "<AssertPlaceHolder>" ; } getIdByCode ( java . lang . String ) { return pool . select ( "SELECT<sp>id<sp>FROM<sp>users<sp>WHERE<sp>code<sp>=<sp>?;" , new java . lang . Object [ ] { code } , ( rs ) -> rs . next ( ) ? rs . getString ( "id" ) : null ) ; }
|
org . junit . Assert . assertNull ( email )
|
testResponse405OnDelete ( ) { com . liferay . petra . json . web . service . client . internal . JSONWebServiceClientImpl jsonWebServiceClientImpl = new com . liferay . petra . json . web . service . client . internal . JSONWebServiceClientImpl ( ) ; java . util . Map < java . lang . String , java . lang . Object > properties = getBaseProperties ( ) ; properties . put ( "headers" , "Accept=application/json;headerKey1=headerValue1" ) ; properties . put ( "protocol" , "http" ) ; jsonWebServiceClientImpl . activate ( properties ) ; java . util . Map < java . lang . String , java . lang . String > params = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; params . put ( SimulatorConstants . HTTP_PARAMETER_RESPOND_WITH_STATUS , "405" ) ; params . put ( SimulatorConstants . HTTP_PARAMETER_RETURN_PARMS_IN_JSON , "true" ) ; java . lang . String json = jsonWebServiceClientImpl . doDelete ( "/testDelete/" , params ) ; "<AssertPlaceHolder>" ; } doDelete ( java . lang . String , java . lang . String [ ] ) { java . util . Map < java . lang . String , java . lang . String > parameters = new java . util . HashMap < java . lang . String , java . lang . String > ( ) ; for ( int i = 0 ; i < ( parametersArray . length ) ; i += 2 ) { parameters . put ( parametersArray [ i ] , parametersArray [ ( i + 1 ) ] ) ; } return doDelete ( url , _toNameValuePairs ( parametersArray ) , java . util . Collections . < org . apache . http . NameValuePair > emptyList ( ) ) ; }
|
org . junit . Assert . assertNull ( json )
|
testSetSha1sum ( ) { java . lang . String sha1sum = "test" ; org . owasp . dependencycheck . dependency . Dependency instance = new org . owasp . dependencycheck . dependency . Dependency ( ) ; instance . setSha1sum ( sha1sum ) ; "<AssertPlaceHolder>" ; } getSha1sum ( ) { if ( ( sha1sum ) == null ) { this . sha1sum = determineHashes ( org . owasp . dependencycheck . dependency . Dependency . SHA1_HASHING_FUNCTION ) ; } return this . sha1sum ; }
|
org . junit . Assert . assertEquals ( sha1sum , instance . getSha1sum ( ) )
|
deveObterInfoCancelamentoComoFoiSetado ( ) { final com . fincatto . documentofiscal . nfe400 . classes . evento . manifestacaodestinatario . NFInfoEventoManifestacaoDestinatario infoEventoManifestacaoDestinatario = new com . fincatto . documentofiscal . nfe400 . classes . evento . manifestacaodestinatario . NFInfoEventoManifestacaoDestinatario ( ) ; final com . fincatto . documentofiscal . nfe400 . classes . evento . manifestacaodestinatario . NFInfoManifestacaoDestinatario infoManifestacaoDestinatario = com . fincatto . documentofiscal . nfe400 . FabricaDeObjetosFake . getNFInfoManifestacaoDestinatario ( ) ; infoEventoManifestacaoDestinatario . setManifestacaoDestinatario ( infoManifestacaoDestinatario ) ; "<AssertPlaceHolder>" ; } getManifestacaoDestinatario ( ) { return this . manifestacaoDestinatario ; }
|
org . junit . Assert . assertEquals ( infoManifestacaoDestinatario , infoEventoManifestacaoDestinatario . getManifestacaoDestinatario ( ) )
|
manageModificationVDiskDeletion_VSDISKDELETING_VDisksDestroyed ( ) { org . oscm . app . iaas . data . FlowState flowState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETING ; org . oscm . app . iaas . data . FlowState newState = null ; paramHandler . getIaasContext ( ) . setVSystemStatus ( "NORMAL" ) ; doReturn ( Boolean . TRUE ) . when ( vServerProcessor . vdiskInfo ) . areVDisksDestroyed ( paramHandler ) ; newState = vServerProcessor . manageModificationVDiskDeletion ( "controllerId" , "instanceId" , paramHandler , flowState , newState ) ; "<AssertPlaceHolder>" ; } manageModificationVDiskDeletion ( java . lang . String , java . lang . String , org . oscm . app . iaas . PropertyHandler , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . data . FlowState ) { org . oscm . app . iaas . data . FlowState newState = newStateParam ; boolean vSysInNormalState = VSystemStatus . NORMAL . equals ( paramHandler . getIaasContext ( ) . getVSystemStatus ( ) ) ; switch ( flowState ) { case VSERVER_MODIFICATION_REQUESTED : if ( ( paramHandler . getControllerWaitTime ( ) ) != 0 ) { paramHandler . suspendProcessInstanceFor ( paramHandler . getControllerWaitTime ( ) ) ; newState = org . oscm . app . iaas . data . FlowState . WAITING_BEFORE_STOP ; break ; } case WAITING_BEFORE_STOP : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STOPPED_FOR_MODIFICATION , paramHandler ) ) { java . lang . String status = vserverComm . getVServerStatus ( paramHandler ) ; if ( VServerStatus . RUNNING . equals ( status ) ) { vserverComm . stopVServer ( paramHandler ) ; } else if ( VServerStatus . STOPPED . equals ( status ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STOPPED_FOR_MODIFICATION ; } } break ; case VSERVER_STOPPED_FOR_MODIFICATION : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATING , paramHandler ) ) ) { vserverComm . modifyVServerAttributes ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; if ( vdiskInfo . isAttachedVDisksFound ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETION_REQUESTED ; } } break ; case VSDISK_DELETION_REQUESTED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHING , paramHandler ) ) ) { vdiskInfo . detachVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHING ; } break ; case VSDISK_DETACHING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DETACHED , paramHandler ) ) { if ( vdiskInfo . areVDisksDetached ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSDISK_DETACHED ; } } break ; case VSDISK_DETACHED : if ( vSysInNormalState && ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DELETING , paramHandler ) ) ) { vdiskInfo . destroyVDisks ( paramHandler ) ; newState = org . oscm . app . iaas . data . FlowState . VSDISK_DELETING ; } break ; case VSDISK_DELETING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSDISK_DESTROYED , paramHandler ) ) { if ( vdiskInfo . areVDisksDestroyed ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATING ; } } break ; case VSERVER_UPDATING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_UPDATED , paramHandler ) ) { if ( VServerStatus . STOPPED . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_UPDATED ; } } break ; case VSERVER_UPDATED : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTING , paramHandler ) ) { if ( vserverComm . startVServer ( paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTING ; } } break ; case VSERVER_STARTING : if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_STARTED , paramHandler ) ) { if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_STARTED ; } } break ; case VSERVER_STARTED : if ( VServerStatus . RUNNING . equals ( vserverComm . getVServerStatus ( paramHandler ) ) ) { if ( ( paramHandler . getMailForCompletion ( ) ) != null ) { if ( checkNextStatus ( controllerId , instanceId , FlowState . VSERVER_RETRIEVEGUEST , paramHandler ) ) { newState = org . oscm . app . iaas . data . FlowState . VSERVER_RETRIEVEGUEST ; } } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } } break ; case VSERVER_RETRIEVEGUEST : java . lang . String mail = paramHandler . getMailForCompletion ( ) ; if ( mail != null ) { newState = dispatchVServerManualOperation ( controllerId , instanceId , paramHandler , mail ) ; } else { newState = org . oscm . app . iaas . data . FlowState . FINISHED ; } break ; default : } return newState ; }
|
org . junit . Assert . assertEquals ( FlowState . VSERVER_UPDATING , newState )
|
testIncreasingRobustnessItersIncreasesSmoothnessWithOutliers ( ) { int numPoints = 100 ; double [ ] xval = new double [ numPoints ] ; double [ ] yval = new double [ numPoints ] ; double xnoise = 0.1 ; double ynoise = 0.1 ; generateSineData ( xval , yval , xnoise , ynoise ) ; yval [ ( numPoints / 3 ) ] *= 100 ; yval [ ( ( 2 * numPoints ) / 3 ) ] *= - 100 ; double [ ] variances = new double [ 4 ] ; for ( int i = 0 ; i < 4 ; i ++ ) { org . hipparchus . analysis . interpolation . LoessInterpolator li = new org . hipparchus . analysis . interpolation . LoessInterpolator ( 0.3 , i , 1.0E-12 ) ; double [ ] res = li . smooth ( xval , yval ) ; for ( int j = 1 ; j < ( res . length ) ; ++ j ) { variances [ i ] += org . hipparchus . util . FastMath . abs ( ( ( res [ j ] ) - ( res [ ( j - 1 ) ] ) ) ) ; } } for ( int i = 1 ; i < ( variances . length ) ; ++ i ) { "<AssertPlaceHolder>" ; } } abs ( int ) { final int i = x > > > 31 ; return ( x ^ ( ( ~ i ) + 1 ) ) + i ; }
|
org . junit . Assert . assertTrue ( ( ( variances [ i ] ) < ( variances [ ( i - 1 ) ] ) ) )
|
getActiveClusterNodeWithExcludePredicate_predicate_is_null ( ) { java . util . List < com . behase . relumin . service . ClusterNode > nodes = com . google . common . collect . Lists . newArrayList ( com . behase . relumin . service . ClusterNode . builder ( ) . nodeId ( "PONG" 2 ) . hostAndPort ( "localhost:10000" ) . flags ( com . google . common . collect . Sets . newHashSet ( "master" ) ) . masterNodeId ( "" ) . pingSent ( java . lang . System . currentTimeMillis ( ) ) . pongReceived ( java . lang . System . currentTimeMillis ( ) ) . configEpoch ( 1 ) . connect ( true ) . migrating ( com . google . common . collect . Maps . newHashMap ( ) ) . importing ( com . google . common . collect . Maps . newHashMap ( ) ) . servedSlotsSet ( java . util . stream . IntStream . rangeClosed ( 0 , 16382 ) . mapToObj ( ( i ) -> i ) . collect ( java . util . stream . Collectors . toSet ( ) ) ) . build ( ) , com . behase . relumin . service . ClusterNode . builder ( ) . nodeId ( "nodeId2" ) . hostAndPort ( "localhost:10001" ) . flags ( com . google . common . collect . Sets . newHashSet ( "slave" ) ) . masterNodeId ( "PONG" 2 ) . pingSent ( java . lang . System . currentTimeMillis ( ) ) . pongReceived ( java . lang . System . currentTimeMillis ( ) ) . configEpoch ( 1 ) . connect ( true ) . migrating ( com . google . common . collect . Maps . newHashMap ( ) ) . importing ( com . google . common . collect . Maps . newHashMap ( ) ) . servedSlotsSet ( com . google . common . collect . Sets . newHashSet ( ) ) . build ( ) , com . behase . relumin . service . ClusterNode . builder ( ) . nodeId ( "PONG" 1 ) . hostAndPort ( "localhost:10002" ) . flags ( com . google . common . collect . Sets . newHashSet ( "master" ) ) . masterNodeId ( "" ) . pingSent ( java . lang . System . currentTimeMillis ( ) ) . pongReceived ( java . lang . System . currentTimeMillis ( ) ) . configEpoch ( 1 ) . connect ( true ) . migrating ( com . google . common . collect . Maps . newHashMap ( ) ) . importing ( com . google . common . collect . Maps . newHashMap ( ) ) . servedSlotsSet ( com . google . common . collect . Sets . newHashSet ( 16383 ) ) . build ( ) , com . behase . relumin . service . ClusterNode . builder ( ) . nodeId ( "nodeId4" ) . hostAndPort ( "localhost:10003" ) . flags ( com . google . common . collect . Sets . newHashSet ( "slave" ) ) . masterNodeId ( "PONG" 1 ) . pingSent ( java . lang . System . currentTimeMillis ( ) ) . pongReceived ( java . lang . System . currentTimeMillis ( ) ) . configEpoch ( 1 ) . connect ( true ) . migrating ( com . google . common . collect . Maps . newHashMap ( ) ) . importing ( com . google . common . collect . Maps . newHashMap ( ) ) . servedSlotsSet ( com . google . common . collect . Sets . newHashSet ( ) ) . build ( ) ) ; redis . clients . jedis . Jedis upJedis = mock ( redis . clients . jedis . Jedis . class ) ; redis . clients . jedis . Jedis downJedis = mock ( redis . clients . jedis . Jedis . class ) ; doReturn ( mapper . writeValueAsString ( nodes ) ) . when ( dataStoreJedis ) . get ( anyString ( ) ) ; doReturn ( upJedis ) . when ( jedisSupport ) . getJedisByHostAndPort ( "localhost:10000" ) ; doReturn ( downJedis ) . when ( jedisSupport ) . getJedisByHostAndPort ( "localhost:10001" ) ; doReturn ( downJedis ) . when ( jedisSupport ) . getJedisByHostAndPort ( "localhost:10002" ) ; doReturn ( downJedis ) . when ( jedisSupport ) . getJedisByHostAndPort ( "localhost:10003" ) ; doReturn ( "PONG" ) . when ( upJedis ) . ping ( ) ; doThrow ( redis . clients . jedis . exceptions . JedisException . class ) . when ( downJedis ) . ping ( ) ; com . behase . relumin . service . ClusterNode result = service . getActiveClusterNodeWithExcludePredicate ( "PONG" 3 , null ) ; log . info ( "PONG" 0 , result . getNodeId ( ) ) ; "<AssertPlaceHolder>" ; } getActiveClusterNodeWithExcludePredicate ( java . lang . String , java . util . function . Predicate ) { try ( redis . clients . jedis . Jedis dataStoreJedis = dataStoreJedisPool . getResource ( ) ) { java . lang . String result = dataStoreJedis . get ( com . behase . relumin . Constants . getClusterRedisKey ( redisPrefixKey , clusterName ) ) ; if ( org . apache . commons . lang3 . StringUtils . isBlank ( result ) ) { throw new com . behase . relumin . exception . InvalidParameterException ( "Not<sp>exists<sp>this<sp>cluster<sp>name." ) ; } java . util . List < com . behase . relumin . service . ClusterNode > existClusterNodes = mapper . readValue ( result , new com . fasterxml . jackson . core . type . TypeReference < java . util . List < com . behase . relumin . service . ClusterNode > > ( ) { } ) ; java . util . Collections . shuffle ( existClusterNodes ) ; for ( com . behase . relumin . service . ClusterNode clusterNode : existClusterNodes
|
org . junit . Assert . assertThat ( result . getNodeId ( ) , is ( "PONG" 2 ) )
|
testWelOverlapTweeActiesZonderDegAndersom ( ) { final java . util . List < nl . bzk . brp . model . basis . BerichtIdentificeerbaar > overtreders = brby0024 . voerRegelUit ( maakBericht ( 2003 , null , 2001 , 2005 ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , overtreders . size ( ) )
|
testPageBlobHFlush ( ) { org . apache . hadoop . fs . Path path = getBlobPathWithTestName ( org . apache . hadoop . fs . azure . ITestOutputStreamSemantics . PAGE_BLOB_DIR ) ; try ( org . apache . hadoop . fs . FSDataOutputStream stream = fs . create ( path ) ) { "<AssertPlaceHolder>" ; byte [ ] buffer = getRandomBytes ( ) ; stream . write ( buffer ) ; stream . hflush ( ) ; validate ( path , buffer , true ) ; } } isPageBlobStreamWrapper ( org . apache . hadoop . fs . FSDataOutputStream ) { return ( ( ( org . apache . hadoop . fs . azure . SyncableDataOutputStream ) ( stream . getWrappedStream ( ) ) ) . getOutStream ( ) ) instanceof org . apache . hadoop . fs . azure . PageBlobOutputStream ; }
|
org . junit . Assert . assertTrue ( isPageBlobStreamWrapper ( stream ) )
|
testGetJobXml ( ) { final java . lang . String jobName = "pr" ; java . lang . String xmlReturned = server . getJobXml ( jobName ) ; "<AssertPlaceHolder>" ; } getJobXml ( java . lang . String ) { return client . get ( ( ( "/job/" + ( encode ( jobName ) ) ) + "/config.xml" ) ) ; }
|
org . junit . Assert . assertTrue ( ( ( xmlReturned . length ( ) ) > 0 ) )
|
testOneExistingAuthorizerProfileMatch ( ) { profile . setId ( org . pac4j . core . authorization . checker . VALUE ) ; final org . pac4j . core . authorization . checker . Map < java . lang . String , org . pac4j . core . authorization . authorizer . Authorizer > authorizers = new org . pac4j . core . authorization . checker . HashMap ( ) ; authorizers . put ( org . pac4j . core . authorization . checker . NAME , new org . pac4j . core . authorization . checker . DefaultAuthorizationCheckerTests . IdAuthorizer ( ) ) ; "<AssertPlaceHolder>" ; } isAuthorized ( org . pac4j . core . context . WebContext , org . pac4j . core . authorization . checker . List , java . lang . String , org . pac4j . core . authorization . checker . Map ) { final org . pac4j . core . authorization . checker . List < org . pac4j . core . authorization . checker . Authorizer > authorizers = new org . pac4j . core . authorization . checker . ArrayList ( ) ; java . lang . String authorizerNames = authorizersValue ; if ( authorizerNames == null ) { authorizerNames = ( ( org . pac4j . core . context . DefaultAuthorizers . CSRF ) + ( org . pac4j . core . context . Pac4jConstants . ELEMENT_SEPARATOR ) ) + ( org . pac4j . core . context . DefaultAuthorizers . SECURITYHEADERS ) ; } if ( isNotBlank ( authorizerNames ) ) { final java . lang . String [ ] names = authorizerNames . split ( Pac4jConstants . ELEMENT_SEPARATOR ) ; final int nb = names . length ; for ( int i = 0 ; i < nb ; i ++ ) { final java . lang . String name = names [ i ] . trim ( ) ; if ( DefaultAuthorizers . HSTS . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . STRICT_TRANSPORT_SECURITY_HEADER ) ; } else if ( DefaultAuthorizers . NOSNIFF . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . X_CONTENT_TYPE_OPTIONS_HEADER ) ; } else if ( DefaultAuthorizers . NOFRAME . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . X_FRAME_OPTIONS_HEADER ) ; } else if ( DefaultAuthorizers . XSSPROTECTION . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . XSS_PROTECTION_HEADER ) ; } else if ( DefaultAuthorizers . NOCACHE . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CACHE_CONTROL_HEADER ) ; } else if ( DefaultAuthorizers . SECURITYHEADERS . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CACHE_CONTROL_HEADER ) ; authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . X_CONTENT_TYPE_OPTIONS_HEADER ) ; authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . STRICT_TRANSPORT_SECURITY_HEADER ) ; authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . X_FRAME_OPTIONS_HEADER ) ; authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . XSS_PROTECTION_HEADER ) ; } else if ( DefaultAuthorizers . CSRF_TOKEN . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CSRF_TOKEN_GENERATOR_AUTHORIZER ) ; } else if ( DefaultAuthorizers . CSRF_CHECK . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CSRF_AUTHORIZER ) ; } else if ( DefaultAuthorizers . CSRF . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CSRF_TOKEN_GENERATOR_AUTHORIZER ) ; authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CSRF_AUTHORIZER ) ; } else if ( DefaultAuthorizers . ALLOW_AJAX_REQUESTS . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . CORS_AUTHORIZER ) ; } else if ( DefaultAuthorizers . IS_ANONYMOUS . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . IS_ANONYMOUS_AUTHORIZER ) ; } else if ( DefaultAuthorizers . IS_AUTHENTICATED . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . IS_AUTHENTICATED_AUTHORIZER ) ; } else if ( DefaultAuthorizers . IS_FULLY_AUTHENTICATED . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . IS_FULLY_AUTHENTICATED_AUTHORIZER ) ; } else if ( DefaultAuthorizers . IS_REMEMBERED . equalsIgnoreCase ( name ) ) { authorizers . add ( org . pac4j . core . authorization . checker . DefaultAuthorizationChecker . IS_REMEMBERED_AUTHORIZER ) ; } else { assertNotNull ( "authorizersMap" , authorizersMap ) ; org . pac4j . core . authorization . checker . Authorizer result = null ; for ( final Map . Entry < java . lang . String , org . pac4j . core . authorization . checker . Authorizer > entry : authorizersMap . entrySet ( ) ) { if ( areEqualsIgnoreCaseAndTrim ( entry . getKey ( ) , name ) ) { result = entry . getValue ( ) ; break ; } } assertNotNull ( ( ( "authorizersMap['" + name ) + "']" ) , result ) ; authorizers . add ( result ) ; } } } return isAuthorized ( context , profiles , authorizers ) ; }
|
org . junit . Assert . assertTrue ( checker . isAuthorized ( null , profiles , org . pac4j . core . authorization . checker . NAME , authorizers ) )
|
testTruncTimestampValues_Year ( ) { java . lang . String sqlText = "values<sp>truncate(timestamp('2011-12-26',<sp>'17:13:30'),<sp>'YEAR')" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "-----------------------\n" + "2011-01-01<sp>00:00:00.0<sp>|" ) ; "<AssertPlaceHolder>" ; rs . close ( ) ; } toStringUnsorted ( com . splicemachine . homeless . ResultSet ) { return com . splicemachine . homeless . TestUtils . FormattedResult . ResultFactory . convert ( "" , rs , false ) . toString ( ) . trim ( ) ; }
|
org . junit . Assert . assertEquals ( ( ( "\n" + sqlText ) + "\n" ) , expected , TestUtils . FormattedResult . ResultFactory . toStringUnsorted ( rs ) )
|
streamsAnyMatch ( ) { java . util . List < com . insightfullogic . java8 . examples . chapter1 . Track > tracksOnColtrane = asList ( new com . insightfullogic . java8 . examples . chapter1 . Track ( "Bakai" , 524 ) , new com . insightfullogic . java8 . examples . chapter1 . Track ( "Violets<sp>for<sp>Your<sp>Furs" , 378 ) , new com . insightfullogic . java8 . examples . chapter1 . Track ( "Time<sp>Was" , 451 ) ) ; boolean matchLength = tracksOnColtrane . stream ( ) . anyMatch ( ( track ) -> ( track . getLength ( ) ) > 500 ) ; "<AssertPlaceHolder>" ; } getLength ( ) { return length ; }
|
org . junit . Assert . assertTrue ( matchLength )
|
testParseHandlesBlanksCells ( ) { org . apache . poi . ss . usermodel . Workbook workbook = createWorkbook ( "/excel/TestBlankCells.xlsx" ) ; com . streamsets . pipeline . lib . parser . excel . WorkbookParser parser = new com . streamsets . pipeline . lib . parser . excel . WorkbookParser ( settingsWithHeader , getContext ( ) , workbook , "Sheet1::0" ) ; com . streamsets . pipeline . api . Record recordFirstRow = parser . parse ( ) ; java . util . LinkedHashMap < java . lang . String , com . streamsets . pipeline . api . Field > firstContentMap = new java . util . LinkedHashMap ( ) ; firstContentMap . put ( "column1" , com . streamsets . pipeline . api . Field . create ( java . math . BigDecimal . valueOf ( 11 ) ) ) ; firstContentMap . put ( "column2" , com . streamsets . pipeline . api . Field . create ( "" ) ) ; firstContentMap . put ( "column3" , com . streamsets . pipeline . api . Field . create ( "" ) ) ; firstContentMap . put ( "column4" , com . streamsets . pipeline . api . Field . create ( java . math . BigDecimal . valueOf ( 44 ) ) ) ; com . streamsets . pipeline . api . Field expectedFirstRow = com . streamsets . pipeline . api . Field . createListMap ( firstContentMap ) ; "<AssertPlaceHolder>" ; } get ( ) { return this . root ; }
|
org . junit . Assert . assertEquals ( expectedFirstRow , recordFirstRow . get ( ) )
|
testUnmappedGuestRevocation ( ) { org . candlepin . model . Owner owner1 = new org . candlepin . model . Owner ( "o1" ) ; owner1 . setId ( "o1-id" ) ; org . candlepin . model . Owner owner2 = new org . candlepin . model . Owner ( "o2" ) ; owner2 . setId ( "o2-id" ) ; org . candlepin . model . Product product1 = org . candlepin . test . TestUtil . createProduct ( ) ; org . candlepin . model . Product product2 = org . candlepin . test . TestUtil . createProduct ( ) ; org . candlepin . model . Pool p1 = org . candlepin . test . TestUtil . createPool ( owner1 , product1 ) ; org . candlepin . model . Pool p2 = org . candlepin . test . TestUtil . createPool ( owner2 , product2 ) ; p1 . setAttribute ( Pool . Attributes . UNMAPPED_GUESTS_ONLY , "true" ) ; p2 . setAttribute ( Pool . Attributes . UNMAPPED_GUESTS_ONLY , "true" ) ; java . util . Date thirtySixHoursAgo = new java . util . Date ( ( ( new java . util . Date ( ) . getTime ( ) ) - ( ( ( 36L * 60L ) * 60L ) * 1000L ) ) ) ; java . util . Date twelveHoursAgo = new java . util . Date ( ( ( new java . util . Date ( ) . getTime ( ) ) - ( ( ( 12L * 60L ) * 60L ) * 1000L ) ) ) ; org . candlepin . model . Consumer c ; c = org . candlepin . test . TestUtil . createConsumer ( owner1 ) ; c . setCreated ( twelveHoursAgo ) ; org . candlepin . model . Entitlement e1 = org . candlepin . test . TestUtil . createEntitlement ( owner1 , c , p1 , null ) ; e1 . setEndDateOverride ( new java . util . Date ( ( ( new java . util . Date ( ) . getTime ( ) ) + ( ( ( 1L * 60L ) * 60L ) * 1000L ) ) ) ) ; java . util . Set < org . candlepin . model . Entitlement > entitlementSet1 = new java . util . HashSet ( ) ; entitlementSet1 . add ( e1 ) ; p1 . setEntitlements ( entitlementSet1 ) ; c = org . candlepin . test . TestUtil . createConsumer ( owner2 ) ; c . setCreated ( twelveHoursAgo ) ; org . candlepin . model . Entitlement e2 = org . candlepin . test . TestUtil . createEntitlement ( owner2 , c , p2 , null ) ; e2 . setEndDateOverride ( thirtySixHoursAgo ) ; java . util . Set < org . candlepin . model . Entitlement > entitlementSet2 = new java . util . HashSet ( ) ; entitlementSet2 . add ( e2 ) ; p2 . setEntitlements ( entitlementSet2 ) ; org . candlepin . model . CandlepinQuery cqmock = mock ( org . candlepin . model . CandlepinQuery . class ) ; when ( cqmock . iterator ( ) ) . thenReturn ( java . util . Arrays . asList ( e1 , e2 ) . iterator ( ) ) ; when ( entitlementCurator . findByPoolAttribute ( eq ( "unmapped_guests_only" ) , eq ( "true" ) ) ) . thenReturn ( cqmock ) ; int total = entitler . revokeUnmappedGuestEntitlements ( ) ; "<AssertPlaceHolder>" ; verify ( pm ) . revokeEntitlements ( java . util . Arrays . asList ( e2 ) ) ; } revokeUnmappedGuestEntitlements ( ) { return revokeUnmappedGuestEntitlements ( null ) ; }
|
org . junit . Assert . assertEquals ( 1 , total )
|
should_set_breakend_unanchored ( ) { for ( au . edu . wehi . idsv . BreakendSummary bs : com . google . common . collect . ImmutableList . of ( new au . edu . wehi . idsv . BreakendSummary ( 0 , FWD , 2 , 1 , 2 ) , new au . edu . wehi . idsv . BreakendSummary ( 0 , BWD , 1 , 1 , 2 ) ) ) { au . edu . wehi . idsv . SingleReadEvidence e = asAssemblyEvidence ( au . edu . wehi . idsv . AssemblyFactory . createUnanchoredBreakend ( getContext ( ) , AES ( ) , new au . edu . wehi . idsv . SequentialIdGenerator ( "asm" ) , bs , null , null , B ( "AAAAA" ) , B ( "AAAAA" ) ) ) ; "<AssertPlaceHolder>" ; } } getBreakendSummary ( ) { return breakend ; }
|
org . junit . Assert . assertEquals ( bs , e . getBreakendSummary ( ) )
|
testReferenceSize ( ) { org . apache . hadoop . hbase . io . TestHeapSize . LOG . info ( ( "ClassSize.REFERENCE<sp>is<sp>" + ( org . apache . hadoop . hbase . util . ClassSize . REFERENCE ) ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( ( ( ( org . apache . hadoop . hbase . util . ClassSize . REFERENCE ) == 4 ) || ( ( org . apache . hadoop . hbase . util . ClassSize . REFERENCE ) == 8 ) ) )
|
testReadToGap ( ) { int expected = 2 ; int actual = de . nx42 . maps4cim . header . HeaderParser . readToGap ( de . nx42 . maps4cim . header . HeaderParserTest . inputGap , 0 , 2 ) ; "<AssertPlaceHolder>" ; } readToGap ( byte [ ] , int , int ) { return de . nx42 . maps4cim . util . math . KMPMatch . indexOf ( header , new byte [ len ] , off ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testModifyWithLockOnActive ( ) { final org . kie . api . KieBase kbase = org . drools . compiler . integrationtests . SerializationHelper . serializeObject ( loadKnowledgeBase ( "test_ModifyWithLockOnActive.drl" ) ) ; final org . kie . api . runtime . KieSession session = createKnowledgeSession ( kbase ) ; final java . util . List results = new java . util . ArrayList ( ) ; session . setGlobal ( "results" , results ) ; final org . drools . compiler . Person bob = new org . drools . compiler . Person ( "Bob" , 15 ) ; final org . drools . compiler . Person mark = new org . drools . compiler . Person ( "Mark" , 16 ) ; final org . drools . compiler . Person michael = new org . drools . compiler . Person ( "Michael" , 14 ) ; session . insert ( bob ) ; session . insert ( mark ) ; session . insert ( michael ) ; session . getAgenda ( ) . getAgendaGroup ( "feeding" ) . setFocus ( ) ; session . fireAllRules ( 5 ) ; "<AssertPlaceHolder>" ; } getGlobal ( java . lang . String ) { return null ; }
|
org . junit . Assert . assertEquals ( 2 , ( ( java . util . List ) ( session . getGlobal ( "results" ) ) ) . size ( ) )
|
testNoTypeSystemMerge ( ) { org . apache . uima . jcas . JCas jcas = org . apache . uima . fit . factory . JCasFactory . createJCas ( ) ; org . apache . uima . collection . CollectionReader reader = createReader ( de . tudarmstadt . ukp . dkpro . core . io . xmi . XmiReader . class , XmiReader . PARAM_SOURCE_LOCATION , "src/test/resources/xmi/english.xmi" ) ; reader . getNext ( jcas . getCas ( ) ) ; org . apache . uima . cas . Type spanType = jcas . getTypeSystem ( ) . getType ( "de.tudarmstadt.ukp.dkpro.core.io.xmi.Span" ) ; "<AssertPlaceHolder>" ; } getNext ( int ) { if ( ( de . tudarmstadt . ukp . dkpro . core . api . coref . type . CoreferenceLink_Type . featOkTst ) && ( ( casFeat_next ) == null ) ) { jcas . throwFeatMissing ( "next" , "de.tudarmstadt.ukp.dkpro.core.api.coref.type.CoreferenceLink" ) ; } return ll_cas . ll_getRefValue ( addr , casFeatCode_next ) ; }
|
org . junit . Assert . assertNull ( spanType )
|
zrevrange ( ) { redis . zadd ( key , 1.0 , "a" , 2.0 , "b" , 3.0 , "c" ) ; "<AssertPlaceHolder>" ; } zrevrange ( K , long , long ) { com . lambdaworks . redis . CommandArgs < K , V > args = new com . lambdaworks . redis . CommandArgs < K , V > ( codec ) . addKey ( key ) . add ( start ) . add ( stop ) ; return dispatch ( com . lambdaworks . redis . ZREVRANGE , new com . lambdaworks . redis . ValueListOutput < K , V > ( codec ) , args ) ; }
|
org . junit . Assert . assertEquals ( list ( "c" , "b" , "a" ) , redis . zrevrange ( key , 0 , ( - 1 ) ) )
|
testRegisterInValidExternalSession ( ) { org . openqa . selenium . server . BrowserSessionFactory factory = getTestSessionFactory ( ) ; org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo info = new org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo ( org . openqa . selenium . server . BrowserSessionFactoryUnitTest . SESSION_ID_1 , "*firefox" , null , null , null ) ; factory . registerExternalSession ( info ) ; "<AssertPlaceHolder>" ; } hasActiveSession ( java . lang . String ) { org . openqa . selenium . server . BrowserSessionFactory . BrowserSessionInfo info = lookupInfoBySessionId ( sessionId , activeSessions ) ; return null != info ; }
|
org . junit . Assert . assertFalse ( factory . hasActiveSession ( info . sessionId ) )
|
testMultiNormalizerStandardizeFitLabels ( ) { org . nd4j . linalg . dataset . MultiNormalizerStandardize original = new org . nd4j . linalg . dataset . MultiNormalizerStandardize ( ) ; original . setFeatureStats ( java . util . Arrays . asList ( new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 1.5 } ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2.5 , 3.5 } ) ) , new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 4.5 , 5.5 , 6.5 } ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.5 , 8.5 , 9.5 } ) ) ) ) ; original . setLabelStats ( java . util . Arrays . asList ( new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 0.5 , 1.5 } ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 2.5 , 3.5 } ) ) , new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 4.5 } ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.5 } ) ) , new org . nd4j . linalg . dataset . api . preprocessor . stats . DistributionStats ( org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 4.5 , 5.5 , 6.5 } ) , org . nd4j . linalg . factory . Nd4j . create ( new double [ ] { 7.5 , 8.5 , 9.5 } ) ) ) ) ; original . fitLabel ( true ) ; SUT . write ( original , tmpFile ) ; org . nd4j . linalg . dataset . MultiNormalizerStandardize restored = SUT . restore ( tmpFile ) ; "<AssertPlaceHolder>" ; } restore ( org . nd4j . linalg . dataset . api . preprocessor . serializer . InputStream ) { org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream dis = new org . nd4j . linalg . dataset . api . preprocessor . serializer . DataInputStream ( stream ) ; boolean fitLabels = dis . readBoolean ( ) ; double targetMin = dis . readDouble ( ) ; double targetMax = dis . readDouble ( ) ; org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler result = new org . nd4j . linalg . dataset . api . preprocessor . NormalizerMinMaxScaler ( targetMin , targetMax ) ; result . fitLabel ( fitLabels ) ; result . setFeatureStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; if ( fitLabels ) { result . setLabelStats ( org . nd4j . linalg . factory . Nd4j . read ( dis ) , org . nd4j . linalg . factory . Nd4j . read ( dis ) ) ; } return result ; }
|
org . junit . Assert . assertEquals ( original , restored )
|
testCanDeleteDirWithOpenDirStraem ( ) { java . nio . file . Path dir = root . resolve ( "dir" ) ; java . nio . file . Files . createDirectories ( dir ) ; java . nio . file . Path child = dir . resolve ( "child" ) ; java . nio . file . Files . createDirectories ( child ) ; try ( java . nio . file . DirectoryStream < java . nio . file . Path > stream = java . nio . file . Files . newDirectoryStream ( dir ) ) { java . nio . file . Files . delete ( child ) ; "<AssertPlaceHolder>" ; java . nio . file . Files . delete ( dir ) ; } } delete ( java . nio . file . Path ) { getFs ( path ) . delete ( toEfsPath ( path ) ) ; }
|
org . junit . Assert . assertFalse ( java . nio . file . Files . exists ( child ) )
|
testInverse ( ) { javax . measure . Unit < ? > result = one . inverse ( ) ; "<AssertPlaceHolder>" ; } inverse ( ) { return ( ( tec . units . ri . AbstractQuantity < Q > ) ( tec . units . ri . quantity . NumberQuantity . of ( ( 1.0 / ( value . doubleValue ( ) ) ) , tec . units . ri . quantity . NumberQuantity . getUnit ( ) . inverse ( ) ) ) ) ; }
|
org . junit . Assert . assertEquals ( result , one )
|
testCreateContexts ( ) { org . osgi . service . component . ComponentContext cc = mockery . mock ( org . osgi . service . component . ComponentContext . class ) ; com . ibm . ws . serialization . internal . SerializationServiceImpl service = new com . ibm . ws . serialization . internal . SerializationServiceImpl ( ) ; service . activate ( cc ) ; final com . ibm . ws . serialization . SerializationObjectReplacer replacer = mockery . mock ( com . ibm . ws . serialization . SerializationObjectReplacer . class ) ; final com . ibm . ws . serialization . DeserializationObjectResolver resolver = mockery . mock ( com . ibm . ws . serialization . DeserializationObjectResolver . class ) ; mockery . checking ( new org . jmock . Expectations ( ) { { allowing ( replacer ) . replaceObject ( 0 ) ; will ( returnValue ( 1 ) ) ; allowing ( resolver ) . resolveObject ( 1 ) ; will ( returnValue ( 2 ) ) ; } } ) ; service . addReplacer ( ccMockery . mockService ( cc , com . ibm . ws . serialization . internal . SerializationServiceImplTest . REF_REPLACERS , replacer ) ) ; service . addResolver ( ccMockery . mockService ( cc , com . ibm . ws . serialization . internal . SerializationServiceImplTest . REF_RESOLVERS , resolver ) ) ; java . io . ByteArrayOutputStream baos = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutputStream oos = service . createSerializationContext ( ) . createObjectOutputStream ( baos ) ; oos . writeObject ( 0 ) ; oos . close ( ) ; java . io . ObjectInputStream ois = service . createDeserializationContext ( ) . createObjectInputStream ( new java . io . ByteArrayInputStream ( baos . toByteArray ( ) ) , getClass ( ) . getClassLoader ( ) ) ; "<AssertPlaceHolder>" ; } readObject ( ) { if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . sib . api . jms . impl . JmsStreamMessageImpl . tc . isEntryEnabled ( ) ) ) com . ibm . ws . sib . utils . ras . SibTr . entry ( this , com . ibm . ws . sib . api . jms . impl . JmsStreamMessageImpl . tc , "readObject" ) ; java . lang . Object result ; java . lang . Object obj = getNextField ( "readObject" ) ; if ( obj instanceof byte [ ] ) { int len = ( ( byte [ ] ) ( obj ) ) . length ; result = new byte [ len ] ; java . lang . System . arraycopy ( obj , 0 , result , 0 , len ) ; } else { result = obj ; } if ( ( com . ibm . websphere . ras . TraceComponent . isAnyTracingEnabled ( ) ) && ( com . ibm . ws . sib . api . jms . impl . JmsStreamMessageImpl . tc . isEntryEnabled ( ) ) ) com . ibm . ws . sib . utils . ras . SibTr . exit ( this , com . ibm . ws . sib . api . jms . impl . JmsStreamMessageImpl . tc , "readObject" , result ) ; return result ; }
|
org . junit . Assert . assertEquals ( 2 , ois . readObject ( ) )
|
isReady_zeroResponseStatus ( ) { final uk . co . flax . biosolr . ontology . config . SolrConfiguration config = mock ( uk . co . flax . biosolr . ontology . config . SolrConfiguration . class ) ; org . apache . solr . client . solrj . response . SolrPingResponse response = mock ( org . apache . solr . client . solrj . response . SolrPingResponse . class ) ; when ( response . getStatus ( ) ) . thenReturn ( SolrStorageEngine . STATUS_OK ) ; org . apache . solr . client . solrj . SolrClient server = mock ( org . apache . solr . client . solrj . SolrClient . class ) ; when ( server . ping ( ) ) . thenReturn ( response ) ; uk . co . flax . biosolr . ontology . storage . StorageEngine engine = new uk . co . flax . biosolr . ontology . storage . solr . SolrStorageEngine ( config , server ) ; "<AssertPlaceHolder>" ; verify ( server ) . ping ( ) ; } isReady ( ) { uk . co . flax . biosolr . ontology . documents . storage . elasticsearch . ClusterHealthResponse response = client . admin ( ) . cluster ( ) . health ( new uk . co . flax . biosolr . ontology . documents . storage . elasticsearch . ClusterHealthRequestBuilder ( client , ClusterHealthAction . INSTANCE ) . request ( ) ) . actionGet ( ) ; return ( ! ( response . isTimedOut ( ) ) ) && ( ( ( response . getStatus ( ) ) == ( ClusterHealthStatus . GREEN ) ) || ( ( response . getStatus ( ) ) == ( ClusterHealthStatus . YELLOW ) ) ) ; }
|
org . junit . Assert . assertTrue ( engine . isReady ( ) )
|
testSerializability ( ) { final org . apache . flink . api . common . serialization . SimpleStringSchema schema = new org . apache . flink . api . common . serialization . SimpleStringSchema ( java . nio . charset . StandardCharsets . UTF_16LE ) ; final org . apache . flink . api . common . serialization . SimpleStringSchema copy = org . apache . flink . core . testutils . CommonTestUtils . createCopySerializable ( schema ) ; "<AssertPlaceHolder>" ; } getCharset ( ) { return this . charset ; }
|
org . junit . Assert . assertEquals ( schema . getCharset ( ) , copy . getCharset ( ) )
|
testGetHeight ( ) { org . eclipse . swt . widgets . Display display = new org . eclipse . swt . widgets . Display ( ) ; org . eclipse . swt . graphics . GC gc = new org . eclipse . swt . graphics . GC ( display ) ; gc . setFont ( new org . eclipse . swt . graphics . Font ( display , "Arial" , 10 , org . eclipse . swt . SWT . NORMAL ) ) ; org . eclipse . swt . graphics . FontMetrics fontMetrics10 = gc . getFontMetrics ( ) ; int height10 = fontMetrics10 . getHeight ( ) ; gc . setFont ( new org . eclipse . swt . graphics . Font ( display , "Arial" , 30 , org . eclipse . swt . SWT . NORMAL ) ) ; org . eclipse . swt . graphics . FontMetrics fontMetrics30 = gc . getFontMetrics ( ) ; int height30 = fontMetrics30 . getHeight ( ) ; "<AssertPlaceHolder>" ; } getHeight ( ) { checkWidget ( ) ; int customHeight = getItemData ( ) . customHeight ; return customHeight != ( - 1 ) ? customHeight : parent . getItemHeight ( ) ; }
|
org . junit . Assert . assertTrue ( ( height30 > height10 ) )
|
testOptionalImport ( ) { changeLocationSettings ( "default" ) ; com . ibm . ws . config . xml . internal . ServerConfiguration clientConfig = com . ibm . ws . config . xml . internal . XMLClientConfigParserTest . configParser . parseServerConfiguration ( new java . io . StringReader ( "<client><include<sp>optional=\"true\"<sp>location=\"doesNotExist.xml\"/><foo<sp>bar=\"test\"/></client>" ) ) ; com . ibm . ws . config . xml . internal . ConfigElement applied = clientConfig . getSingleton ( "foo" , null ) ; java . util . Dictionary < java . lang . String , java . lang . Object > map = evaluateToDictionary ( applied ) ; "<AssertPlaceHolder>" ; } get ( java . lang . Object ) { if ( com . ibm . ws . install . map . InstallMap . INSTALL_KERNEL_INIT_CODE . equals ( key ) ) return initValidate ( ) ; if ( ( com . ibm . ws . install . map . InstallMap . INSTALL_KERNEL_INIT_ERROR_MESSAGE . equals ( key ) ) || ( com . ibm . ws . install . map . InstallMap . RUNTIME_INSTALL_DIR . equals ( key ) ) ) return data . get ( key ) ; if ( ( installKernelMap ) == null ) { throw new java . lang . RuntimeException ( getMessage ( "MAPBASED_ERROR_KERNEL_NOT_INIT" ) ) ; } return installKernelMap . get ( key ) ; }
|
org . junit . Assert . assertEquals ( "test" , map . get ( "bar" ) )
|
canRegisterBuilder ( ) { scriptBuilderResolver . registerBuilder ( ".foo" , "org.example.FooBar" ) ; "<AssertPlaceHolder>" ; } getBuilderClassName ( java . lang . String ) { java . lang . String resultingBuilderClassName = extensionToBuilders . get ( extension ) ; if ( resultingBuilderClassName == null ) { throw new com . picocontainer . script . UnsupportedScriptTypeException ( extension , this . getAllSupportedExtensions ( ) ) ; } return resultingBuilderClassName ; }
|
org . junit . Assert . assertEquals ( "org.example.FooBar" , scriptBuilderResolver . getBuilderClassName ( ".foo" ) )
|
runnableFailure ( ) { final java . lang . RuntimeException ex = new java . lang . RuntimeException ( ) ; try { txnService ( ) . run ( session ( ) , new java . lang . Runnable ( ) { @ com . foundationdb . server . store . Override public void run ( ) { writeRow ( tid , 1 ) ; throw ex ; } } ) ; org . junit . Assert . fail ( "Expected<sp>exception" ) ; } catch ( java . lang . RuntimeException e ) { "<AssertPlaceHolder>" ; } expectRowCount ( tid , 0 ) ; } writeRow ( com . foundationdb . server . service . session . Session , com . foundationdb . server . test . it . keyupdate . KeyUpdateRow ) { realStore . writeRow ( session , row , null , null ) ; map . put ( row . keyUpdateHKey ( ) , row ) ; }
|
org . junit . Assert . assertEquals ( ex , e )
|
getParentRegardlessOfScheme_root ( ) { org . apache . hadoop . fs . Path path = new org . apache . hadoop . fs . Path ( "proto://host1/foo" ) ; java . util . ArrayList < org . apache . hadoop . fs . Path > candidates = new java . util . ArrayList ( ) ; org . apache . hadoop . fs . Path expectedPath ; candidates . add ( ( expectedPath = new org . apache . hadoop . fs . Path ( "proto://host1/foo" ) ) ) ; org . apache . hadoop . fs . Path res = org . apache . hadoop . hive . common . FileUtils . getParentRegardlessOfScheme ( path , candidates ) ; "<AssertPlaceHolder>" ; } getParentRegardlessOfScheme ( org . apache . hadoop . fs . Path , java . util . Collection ) { org . apache . hadoop . fs . Path schemalessPath = org . apache . hadoop . fs . Path . getPathWithoutSchemeAndAuthority ( path ) ; for ( ; ( path != null ) && ( schemalessPath != null ) ; path = path . getParent ( ) , schemalessPath = schemalessPath . getParent ( ) ) { if ( candidates . contains ( path ) ) return path ; if ( candidates . contains ( schemalessPath ) ) return schemalessPath ; } return null ; }
|
org . junit . Assert . assertEquals ( expectedPath , res )
|
testBuildWithParameters ( ) { org . lnu . is . domain . person . Person person = new org . lnu . is . domain . person . Person ( ) ; org . lnu . is . domain . address . type . AddressType addressType = new org . lnu . is . domain . address . type . AddressType ( ) ; org . lnu . is . domain . admin . unit . AdminUnit adminUnit = new org . lnu . is . domain . admin . unit . AdminUnit ( ) ; org . lnu . is . domain . street . type . StreetType streetType = new org . lnu . is . domain . street . type . StreetType ( ) ; java . util . Date begDate = new java . util . Date ( ) ; java . util . Date endDate = new java . util . Date ( ) ; org . lnu . is . domain . person . address . PersonAddress context = new org . lnu . is . domain . person . address . PersonAddress ( ) ; context . setPerson ( person ) ; context . setAddressType ( addressType ) ; context . setAdminUnit ( adminUnit ) ; context . setStreetType ( streetType ) ; context . setBegDate ( begDate ) ; context . setEndDate ( endDate ) ; java . lang . String expectedQuery = "SELECT<sp>e<sp>FROM<sp>PersonAddress<sp>e<sp>WHERE<sp>(<sp>e.person<sp>=<sp>:person<sp>AND<sp>e.addressType<sp>=<sp>:addressType<sp>AND<sp>e.adminUnit<sp>=<sp>:adminUnit<sp>AND<sp>e.streetType<sp>=:streetType<sp>AND<sp>e.begDate<sp><=<sp>:begDate<sp>AND<sp>e.endDate<sp>>=<sp>:endDate<sp>)<sp>AND<sp>e.status=:status<sp>AND<sp>e.crtUserGroup<sp>IN<sp>(:userGroups)<sp>" ; org . lnu . is . pagination . MultiplePagedSearch < org . lnu . is . domain . person . address . PersonAddress > pagedSearch = new org . lnu . is . pagination . MultiplePagedSearch ( ) ; pagedSearch . setEntity ( context ) ; java . lang . String actualQuery = unit . build ( pagedSearch ) ; "<AssertPlaceHolder>" ; } setEntity ( T ) { this . entity = entity ; }
|
org . junit . Assert . assertEquals ( expectedQuery , actualQuery )
|
testGetPipelineByName ( ) { verifyPipelineIsNotRegistered ( pipeline ) ; pipelineRegistry . registerPipeline ( pipeline ) ; org . guvnor . ala . pipeline . Pipeline result = pipelineRegistry . getPipelineByName ( org . guvnor . ala . registry . inmemory . InMemoryPipelineRegistryTest . PIPELINE_ID ) ; "<AssertPlaceHolder>" ; } getPipelineByName ( java . lang . String ) { checkNotNull ( "pipelineId" , pipelineId ) ; return pipelineByName . get ( pipelineId ) . getPipeline ( ) ; }
|
org . junit . Assert . assertEquals ( pipeline , result )
|
testM70MethodInvocation ( ) { fr . inria . main . CommandSummary command = fr . inria . astor . test . repair . evaluation . regression . MathCommandsTests . getMath70Command ( ) ; command . command . put ( "-parameters" , ( ( ( ExtensionPoints . TARGET_CODE_PROCESSOR . identifier ) + ( java . io . File . pathSeparator ) ) + ( fr . inria . astor . core . manipulation . filters . MethodInvocationFixSpaceProcessor . class . getCanonicalName ( ) ) ) ) ; command . command . put ( "-maxgen" , "0" ) ; fr . inria . main . evolution . AstorMain main1 = new fr . inria . main . evolution . AstorMain ( ) ; main1 . execute ( command . flat ( ) ) ; java . util . List < fr . inria . astor . core . entities . ProgramVariant > variantss = main1 . getEngine ( ) . getVariants ( ) ; "<AssertPlaceHolder>" ; fr . inria . astor . core . entities . ProgramVariant pv = variantss . get ( 0 ) ; fr . inria . astor . approaches . jgenprog . JGenProg jgp = ( ( fr . inria . astor . approaches . jgenprog . JGenProg ) ( main1 . getEngine ( ) ) ) ; fr . inria . astor . core . solutionsearch . spaces . ingredients . IngredientPoolLocationType ingSpace = ( ( fr . inria . astor . core . solutionsearch . spaces . ingredients . IngredientPoolLocationType ) ( jgp . getIngredientSearchStrategy ( ) . getIngredientSpace ( ) ) ) ; checkModificationPointTypes ( variantss , spoon . reflect . code . CtInvocation . class ) ; checkIngredientTypes ( ingSpace , spoon . reflect . code . CtInvocation . class ) ; } size ( ) { if ( ( operations ) == 0 ) return ingredients ; if ( ( ingredients ) == 0 ) return operations ; return ( operations ) * ( ingredients ) ; }
|
org . junit . Assert . assertTrue ( ( ( variantss . size ( ) ) > 0 ) )
|
getStartPos ( ) { final java . awt . Point origin = new java . awt . Point ( ( - 7 ) , 11 ) ; image = createSequentialImage ( origin . x , origin . y , org . jaitools . imageutils . iterator . SimpleIteratorTest . WIDTH , org . jaitools . imageutils . iterator . SimpleIteratorTest . HEIGHT , org . jaitools . imageutils . iterator . SimpleIteratorTest . NUM_BANDS , 0 ) ; iter = new org . jaitools . imageutils . iterator . SimpleIterator ( image , null , org . jaitools . imageutils . iterator . SimpleIteratorTest . OUTSIDE ) ; "<AssertPlaceHolder>" ; } getStartPos ( ) { final java . awt . Point origin = new java . awt . Point ( ( - 7 ) , 11 ) ; image = createSequentialImage ( origin . x , origin . y , org . jaitools . imageutils . iterator . SimpleIteratorTest . WIDTH , org . jaitools . imageutils . iterator . SimpleIteratorTest . HEIGHT , org . jaitools . imageutils . iterator . SimpleIteratorTest . NUM_BANDS , 0 ) ; iter = new org . jaitools . imageutils . iterator . SimpleIterator ( image , null , org . jaitools . imageutils . iterator . SimpleIteratorTest . OUTSIDE ) ; org . junit . Assert . assertEquals ( origin , iter . getStartPos ( ) ) ; }
|
org . junit . Assert . assertEquals ( origin , iter . getStartPos ( ) )
|
saveEncounter_shouldFailfIfUserIsNotSupposedToEditEncountersOfTypeOfGivenEncounter ( ) { org . openmrs . Encounter encounter = getEncounterWithEditPrivilege ( ) ; org . openmrs . User user = org . openmrs . api . context . Context . getUserService ( ) . getUserByUsername ( "test_user" ) ; "<AssertPlaceHolder>" ; org . openmrs . api . context . Context . becomeUser ( user . getSystemId ( ) ) ; org . openmrs . api . context . Context . addProxyPrivilege ( PrivilegeConstants . EDIT_ENCOUNTERS ) ; org . openmrs . api . context . Context . getEncounterService ( ) . saveEncounter ( encounter ) ; } getUserByUsername ( java . lang . String ) { return dao . getUserByUsername ( username ) ; }
|
org . junit . Assert . assertNotNull ( user )
|
test1 ( ) { System . out . println ( "inside<sp>test1" ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( true )
|
shouldInstrumentIfWithBraces ( ) { java . lang . String source = "if<sp>(x<sp>><sp>10)\n{\n<sp>x++;\n}" ; java . lang . String instrumentedSource = sourceProcessor . instrumentSource ( source ) ; java . lang . String expectedSource = "_$jscoverage[\'test.js\'].lineData[1]++;\nif<sp>(x<sp>><sp>10)<sp>{\n<sp>_$jscoverage[\'test.js\'].lineData[3]++;\n<sp>x++;\n}\n" ; "<AssertPlaceHolder>" ; } instrumentSource ( java . lang . String ) { return instrumentSource ( uri , source ) ; }
|
org . junit . Assert . assertEquals ( expectedSource , instrumentedSource )
|
trashDeleteEmpty ( ) { final java . lang . String ixname = "empty" ; org . cojen . tupl . Index ix = mDb . openIndex ( ixname ) ; mDb . deleteIndex ( ix ) ; mDb . checkpoint ( ) ; mDb = reopenTempDatabase ( getClass ( ) , mDb , mConfig ) ; "<AssertPlaceHolder>" ; } findIndex ( org . cojen . tupl . Index ) { if ( ( activeIndex == null ) || ( activeIndex . isClosed ( ) ) ) { activeIndex = mDatabase . anyIndexById ( mActiveIndexId ) ; } return activeIndex ; }
|
org . junit . Assert . assertNull ( mDb . findIndex ( ixname ) )
|
testCloseNotPropagated ( ) { org . apache . flink . runtime . state . KeyedStateCheckpointOutputStream stream = org . apache . flink . runtime . state . KeyedStateCheckpointOutputStreamTest . createStream ( new org . apache . flink . runtime . state . KeyGroupRange ( 0 , 0 ) ) ; org . apache . flink . runtime . state . TestMemoryCheckpointOutputStream innerStream = ( ( org . apache . flink . runtime . state . TestMemoryCheckpointOutputStream ) ( stream . getDelegate ( ) ) ) ; stream . close ( ) ; "<AssertPlaceHolder>" ; } isClosed ( ) { return this . socket . isClosed ( ) ; }
|
org . junit . Assert . assertFalse ( innerStream . isClosed ( ) )
|
testSerialization ( ) { com . groupon . mapreduce . mongo . WritableBSONObject x = new com . groupon . mapreduce . mongo . WritableBSONObject ( ) ; x . put ( "key1" , 4 ) ; x . put ( "key2" , 9 ) ; com . groupon . mapreduce . mongo . WritableBSONObject x2 = new com . groupon . mapreduce . mongo . WritableBSONObject ( ) ; java . io . ByteArrayOutputStream byteStream = new java . io . ByteArrayOutputStream ( ) ; java . io . DataOutputStream stream = new java . io . DataOutputStream ( byteStream ) ; x . write ( stream ) ; byte [ ] output = byteStream . toByteArray ( ) ; x2 . readFields ( new java . io . DataInputStream ( new java . io . ByteArrayInputStream ( output ) ) ) ; "<AssertPlaceHolder>" ; } readFields ( java . io . DataInput ) { byte [ ] lengthBytes = new byte [ 4 ] ; dataInput . readFully ( lengthBytes , 0 , 4 ) ; int length = com . groupon . mapreduce . mongo . JobUtil . readInt ( lengthBytes , 0 ) ; byte [ ] bytes = new byte [ length ] ; dataInput . readFully ( bytes , 4 , ( length - 4 ) ) ; bytes [ 0 ] = lengthBytes [ 0 ] ; bytes [ 1 ] = lengthBytes [ 1 ] ; bytes [ 2 ] = lengthBytes [ 2 ] ; bytes [ 3 ] = lengthBytes [ 3 ] ; com . groupon . mapreduce . mongo . BSONDecoder decoder = new com . groupon . mapreduce . mongo . BasicBSONDecoder ( ) ; com . groupon . mapreduce . mongo . BSONCallback callback = new com . groupon . mapreduce . mongo . BasicBSONCallback ( ) ; decoder . decode ( bytes , callback ) ; obj = ( ( com . groupon . mapreduce . mongo . BSONObject ) ( callback . get ( ) ) ) ; }
|
org . junit . Assert . assertEquals ( x , x2 )
|
testCreateNewRole ( ) { com . devopsbuddy . backend . persistence . domain . backend . Role userRole = createRole ( RolesEnum . BASIC ) ; roleRepository . save ( userRole ) ; com . devopsbuddy . backend . persistence . domain . backend . Role retrievedRole = roleRepository . findOne ( RolesEnum . BASIC . getId ( ) ) ; "<AssertPlaceHolder>" ; } getId ( ) { return id ; }
|
org . junit . Assert . assertNotNull ( retrievedRole )
|
getOnly ( ) { org . eclipse . collections . api . map . MapIterable < java . lang . String , java . lang . String > map = this . newMapWithKeyValue ( "1" , "One" ) ; "<AssertPlaceHolder>" ; } getOnly ( ) { org . eclipse . collections . impl . test . Verify . assertThrows ( org . eclipse . collections . impl . map . immutable . IllegalStateException . class , ( ) -> this . classUnderTest ( ) . getOnly ( ) ) ; }
|
org . junit . Assert . assertEquals ( "One" , map . getOnly ( ) )
|
testSuccessSimpleLockingOnUpdate ( ) { createSimpleLockingDataSet ( ) ; java . util . List < org . apache . cayenne . testdo . locking . SimpleLockingTestEntity > allObjects = new org . apache . cayenne . query . SelectQuery ( org . apache . cayenne . testdo . locking . SimpleLockingTestEntity . class ) . select ( context ) ; "<AssertPlaceHolder>" ; org . apache . cayenne . testdo . locking . SimpleLockingTestEntity object = allObjects . get ( 0 ) ; object . setDescription ( "first<sp>update" ) ; context . commitChanges ( ) ; object . setDescription ( "second<sp>update" ) ; context . commitChanges ( ) ; } size ( ) { return neighbors . size ( ) ; }
|
org . junit . Assert . assertEquals ( 1 , allObjects . size ( ) )
|
shouldConvertToMap ( ) { br . com . uol . pagseguro . api . utils . RequestMap expectedMap = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; expectedMap . putMap ( new java . util . HashMap < java . lang . String , java . lang . String > ( ) { { put ( "email" , "email" ) ; put ( "token" , "token" ) ; } } ) ; br . com . uol . pagseguro . api . utils . RequestMap map = sellerCredential . asMap ( ) ; "<AssertPlaceHolder>" ; } asMap ( ) { final br . com . uol . pagseguro . api . utils . RequestMap form = new br . com . uol . pagseguro . api . utils . RequestMap ( ) ; form . putString ( "email" , email ) ; form . putString ( "token" , token ) ; return form ; }
|
org . junit . Assert . assertEquals ( expectedMap , map )
|
estimated_finish_time_must_not_be_null ( ) { fr . norad . visuwall . api . domain . SoftwareProjectId softwareProjectId = new fr . norad . visuwall . api . domain . SoftwareProjectId ( "projectId" ) ; java . util . Date estimatedFinishTime = sonar . getEstimatedFinishTime ( softwareProjectId , 1 ) ; "<AssertPlaceHolder>" ; } getEstimatedFinishTime ( fr . norad . visuwall . api . domain . SoftwareProjectId , java . lang . Integer ) { checkConnected ( ) ; checkSoftwareProjectId ( softwareProjectId ) ; return new java . util . Date ( ) ; }
|
org . junit . Assert . assertNotNull ( estimatedFinishTime )
|
testGetParameters ( ) { org . lnu . is . domain . publicactivity . PublicActivityType entity = new org . lnu . is . domain . publicactivity . PublicActivityType ( ) ; java . lang . String name = "first<sp>blood" ; java . lang . String abbrName = "fb" ; entity . setName ( name ) ; entity . setAbbrName ( abbrName ) ; java . util . Map < java . lang . String , java . lang . Object > expected = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; expected . put ( "name" , name ) ; expected . put ( "abbrName" , abbrName ) ; expected . put ( "status" , RowStatus . ACTIVE ) ; expected . put ( "userGroups" , groups ) ; java . util . Map < java . lang . String , java . lang . Object > actual = unit . getParameters ( entity ) ; "<AssertPlaceHolder>" ; } getParameters ( org . springframework . web . context . request . NativeWebRequest ) { java . util . Map < java . lang . String , java . lang . Object > resultMap = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; java . util . Map < java . lang . String , java . lang . String > pathVariables = ( ( java . util . Map < java . lang . String , java . lang . String > ) ( webRequest . getAttribute ( HandlerMapping . URI_TEMPLATE_VARIABLES_ATTRIBUTE , RequestAttributes . SCOPE_REQUEST ) ) ) ; java . util . Map < java . lang . String , java . lang . Object > requestParams = getRequestParameterMap ( webRequest ) ; for ( Map . Entry < java . lang . String , java . lang . Object > entry : requestParams . entrySet ( ) ) { resultMap . put ( entry . getKey ( ) , entry . getValue ( ) ) ; } resultMap . putAll ( pathVariables ) ; return resultMap ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
updateAPdcPositionWithoutAnyValues ( ) { try { putAt ( aResourceURI ( ) , aPdcPositionWithoutAnyValues ( ) ) ; } catch ( com . sun . jersey . api . client . UniformInterfaceException ex ) { int receivedStatus = ex . getResponse ( ) . getStatus ( ) ; int badRequest = Status . BAD_REQUEST . getStatusCode ( ) ; "<AssertPlaceHolder>" ; } } is ( T ) { return java . util . Objects . equals ( this . value , value ) ; }
|
org . junit . Assert . assertThat ( receivedStatus , org . hamcrest . Matchers . is ( badRequest ) )
|
kind ( ) { final org . apache . olingo . server . api . uri . UriInfo uriInfo = new org . apache . olingo . server . core . uri . UriInfoImpl ( ) . setKind ( UriInfoKind . all ) ; "<AssertPlaceHolder>" ; } getKind ( ) { return org . apache . olingo . commons . api . edm . constants . EdmTypeKind . PRIMITIVE ; }
|
org . junit . Assert . assertEquals ( UriInfoKind . all , uriInfo . getKind ( ) )
|
testHuidigeSituatieGeenOpschorting ( ) { nl . bzk . brp . model . bericht . kern . PersoonBericht nieuweSituatie = new nl . bzk . brp . model . bericht . kern . PersoonBericht ( ) ; java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bral9003 . executeer ( persoon1 , nieuweSituatie , nl . bzk . brp . business . bedrijfsregels . util . ActieBerichtBuilder . bouwNieuweActie ( SoortActie . REGISTRATIE_NATIONALITEIT ) . setDatumAanvang ( new nl . bzk . brp . model . algemeen . attribuuttype . kern . Datum ( 20150101 ) ) . getActie ( ) ) ; org . mockito . Mockito . verify ( historiePersoonOpschortingRepository , org . mockito . Mockito . times ( 0 ) ) . haalOpActueleDatumOpschorting ( ( ( nl . bzk . brp . model . operationeel . kern . PersoonModel ) ( org . mockito . Matchers . anyObject ( ) ) ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) )
|
clear ( ) { com . google . bitcoin . core . ECKey unencryptedKey = new com . google . bitcoin . core . ECKey ( ) ; com . google . bitcoin . core . ECKey encryptedKey = new com . google . bitcoin . core . ECKey ( ) . encrypt ( keyCrypter , keyCrypter . deriveKey ( com . google . bitcoin . core . ECKeyTest . PASSWORD1 ) ) ; com . google . bitcoin . core . ECKeyTest . checkSomeBytesAreNonZero ( unencryptedKey . getPrivKeyBytes ( ) ) ; unencryptedKey . clearPrivateKey ( ) ; com . google . bitcoin . core . ECKeyTest . checkAllBytesAreZero ( unencryptedKey . getPrivKeyBytes ( ) ) ; "<AssertPlaceHolder>" ; com . google . bitcoin . core . ECKeyTest . checkSomeBytesAreNonZero ( encryptedKey . getPrivKeyBytes ( ) ) ; com . google . bitcoin . core . ECKeyTest . checkSomeBytesAreNonZero ( encryptedKey . getEncryptedPrivateKey ( ) . getEncryptedBytes ( ) ) ; com . google . bitcoin . core . ECKeyTest . checkSomeBytesAreNonZero ( encryptedKey . getEncryptedPrivateKey ( ) . getInitialisationVector ( ) ) ; encryptedKey . clearPrivateKey ( ) ; com . google . bitcoin . core . ECKeyTest . checkAllBytesAreZero ( encryptedKey . getPrivKeyBytes ( ) ) ; com . google . bitcoin . core . ECKeyTest . checkAllBytesAreZero ( encryptedKey . getEncryptedPrivateKey ( ) . getEncryptedBytes ( ) ) ; com . google . bitcoin . core . ECKeyTest . checkAllBytesAreZero ( encryptedKey . getEncryptedPrivateKey ( ) . getInitialisationVector ( ) ) ; } getEncryptedPrivateKey ( ) { if ( ( encryptedPrivateKey ) == null ) { return null ; } else { return encryptedPrivateKey . clone ( ) ; } }
|
org . junit . Assert . assertTrue ( ( ( unencryptedKey . getEncryptedPrivateKey ( ) ) == null ) )
|
fetchFirst ( ) { "<AssertPlaceHolder>" ; } fetchFirst ( ) { return oneResult ( false ) ; }
|
org . junit . Assert . assertNotNull ( query . fetchFirst ( ) )
|
testGetPolices_exceptionInQuery_assertException ( ) { final javax . persistence . EntityManager manager = mock ( javax . persistence . EntityManager . class ) ; doThrow ( new java . lang . RuntimeException ( "Just<sp>Passing<sp>Through" ) ) . when ( manager ) . createQuery ( ( ( java . lang . String ) ( any ( ) ) ) ) ; final org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl dao = new org . nhindirect . config . store . dao . impl . CertPolicyDaoImpl ( ) ; dao . setEntityManager ( manager ) ; boolean exceptionOccured = false ; try { dao . getPolicies ( ) ; } catch ( org . nhindirect . config . store . ConfigurationStoreException ex ) { exceptionOccured = true ; } "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( exceptionOccured )
|
testSelectByExample4 ( ) { org . apache . ibatis . session . SqlSession sqlSession = tk . mybatis . mapper . mapper . MybatisHelper . getSqlSession ( ) ; try { tk . mybatis . mapper . model . Country ct = new tk . mybatis . mapper . model . Country ( ) ; ct . setCountryname ( "China" ) ; tk . mybatis . mapper . mapper . CountryMapper mapper = sqlSession . getMapper ( tk . mybatis . mapper . mapper . CountryMapper . class ) ; tk . mybatis . mapper . entity . Example example = new tk . mybatis . mapper . entity . Example ( tk . mybatis . mapper . model . Country . class ) ; example . createCriteria ( ) . andGreaterThan ( "id" , 20 ) . andEqualTo ( ct ) ; tk . mybatis . mapper . test . example . List < tk . mybatis . mapper . model . Country > countries = mapper . selectByExample ( example ) ; System . out . println ( countries . get ( 0 ) . toString ( ) ) ; "<AssertPlaceHolder>" ; } finally { sqlSession . close ( ) ; } } toString ( ) { return ( ( ( ( ( ( ( ( "Country{" + "id=" ) + ( id ) ) + ",<sp>countryname='" ) + ( countryname ) ) + '\'' ) + ",<sp>countrycode='" ) + ( countrycode ) ) + '\'' ) + '}' ; }
|
org . junit . Assert . assertEquals ( 1 , countries . size ( ) )
|
testComputeVec4FromStringWithBlank ( ) { java . lang . String vectorString = "" ; gov . nasa . worldwind . geom . Vec4 result = au . gov . ga . worldwind . common . util . Util . computeVec4FromString ( vectorString ) ; "<AssertPlaceHolder>" ; } computeVec4FromString ( java . lang . String ) { if ( au . gov . ga . worldwind . common . util . Util . isBlank ( text ) ) { return null ; } java . lang . String separators = "[\\s,]+" ; java . lang . String [ ] split = text . replaceAll ( "\\(|\\)" , "" ) . trim ( ) . split ( separators ) ; if ( ( ( split . length ) == 3 ) || ( ( split . length ) == 4 ) ) { try { double x = java . lang . Double . valueOf ( split [ 0 ] ) ; double y = java . lang . Double . valueOf ( split [ 1 ] ) ; double z = java . lang . Double . valueOf ( split [ 2 ] ) ; double w = 1.0 ; if ( ( split . length ) == 4 ) { w = java . lang . Double . valueOf ( split [ 3 ] ) ; } return new gov . nasa . worldwind . geom . Vec4 ( x , y , z , w ) ; } catch ( java . lang . NumberFormatException e ) { } } return null ; }
|
org . junit . Assert . assertNull ( result )
|
testInitialize ( ) { fallbackInput . value = "something" ; view . initialize ( ) ; "<AssertPlaceHolder>" ; verify ( dropdown ) . selectpicker ( "val" , "" ) ; } initialize ( ) { this . text = new com . ait . lienzo . client . core . shape . Text ( "" ) . setAlpha ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_ALPHA ) . setFontFamily ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_FONT_FAMILY ) . setFontSize ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_FONT_SIZE ) . setFillColor ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_FILL_COLOR ) . setStrokeColor ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_STROKE_COLOR ) . setStrokeWidth ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_STROKE_WIDTH ) . setTextAlign ( org . kie . workbench . common . stunner . client . lienzo . shape . view . wires . ext . WiresTextDecorator . TEXT_ALIGN ) . setDraggable ( false ) ; this . textWrapper = new com . ait . lienzo . client . core . shape . TextBoundsWrap ( text , shape . getPath ( ) . getBoundingBox ( ) ) ; this . text . setWrapper ( textWrapper ) ; text . setFillBoundsForSelection ( true ) ; initializeHandlers ( ) ; setTextBoundaries ( shape . getPath ( ) . getBoundingBox ( ) ) ; }
|
org . junit . Assert . assertEquals ( "" , fallbackInput . value )
|
testProcess ( ) { org . pentaho . hadoop . shim . spi . HadoopShim hadoopShim = new org . pentaho . hadoop . shim . spi . MockHadoopShim ( ) ; org . pentaho . hadoop . shim . HadoopConfiguration c = spy ( new org . pentaho . hadoop . shim . HadoopConfiguration ( org . apache . commons . vfs2 . VFS . getManager ( ) . resolveFile ( "ram:///" ) , "id" , "name" , hadoopShim ) ) ; org . pentaho . hadoop . shim . api . Configuration conf = mock ( org . pentaho . hadoop . shim . api . Configuration . class ) ; c . getHadoopShim ( ) . submitJob ( conf ) ; verify ( c ) . process ( conf ) ; "<AssertPlaceHolder>" ; } getHadoopVersion ( ) { return null ; }
|
org . junit . Assert . assertEquals ( hadoopShim . getHadoopVersion ( ) , c . getHadoopShim ( ) . getHadoopVersion ( ) )
|
testGetPairs ( ) { int minSize = 2 ; java . util . List < com . github . davidmoten . rtree3d . geometry . HasGeometry > list = com . google . common . collect . Lists . newArrayList ( ) ; list . add ( com . github . davidmoten . rtree3d . SplitterRStarTest . point ( 1 , 1 ) . mbb ( ) ) ; list . add ( com . github . davidmoten . rtree3d . SplitterRStarTest . point ( 2 , 2 ) . mbb ( ) ) ; list . add ( com . github . davidmoten . rtree3d . SplitterRStarTest . point ( 3 , 3 ) . mbb ( ) ) ; list . add ( com . github . davidmoten . rtree3d . SplitterRStarTest . point ( 4 , 4 ) . mbb ( ) ) ; list . add ( com . github . davidmoten . rtree3d . SplitterRStarTest . point ( 5 , 5 ) . mbb ( ) ) ; java . util . List < com . github . davidmoten . rtree3d . geometry . ListPair < com . github . davidmoten . rtree3d . geometry . HasGeometry > > pairs = com . github . davidmoten . rtree3d . SplitterRStar . getPairs ( minSize , list ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 2 , pairs . size ( ) )
|
shouldApplyTrue ( ) { javax . servlet . http . HttpServletRequest httpServletRequest = createMock ( javax . servlet . http . HttpServletRequest . class ) ; expect ( httpServletRequest . getHeader ( "Authorization" ) ) . andReturn ( "Negotiate<sp>....." ) . once ( ) ; expect ( configuration . getKerberosAuthenticationProperties ( ) ) . andReturn ( createProperties ( true ) ) . once ( ) ; replayAll ( ) ; org . apache . ambari . server . security . authentication . kerberos . AmbariKerberosAuthenticationFilter filter = new org . apache . ambari . server . security . authentication . kerberos . AmbariKerberosAuthenticationFilter ( authenticationManager , entryPoint , configuration , eventHandler ) ; "<AssertPlaceHolder>" ; verifyAll ( ) ; } shouldApply ( javax . servlet . http . HttpServletRequest ) { if ( org . apache . ambari . server . security . authentication . AmbariBasicAuthenticationFilter . LOG . isDebugEnabled ( ) ) { org . apache . ambari . server . utils . RequestUtils . logRequestHeadersAndQueryParams ( httpServletRequest , org . apache . ambari . server . security . authentication . AmbariBasicAuthenticationFilter . LOG ) ; } java . lang . String header = httpServletRequest . getHeader ( "Authorization" ) ; if ( ( header != null ) && ( header . startsWith ( "Basic<sp>" ) ) ) { java . lang . String doAsQueryParameterValue = org . apache . ambari . server . utils . RequestUtils . getQueryStringParameterValue ( httpServletRequest , "doAs" ) ; if ( org . apache . commons . lang . StringUtils . isEmpty ( doAsQueryParameterValue ) ) { return true ; } else { org . apache . ambari . server . security . authentication . AmbariBasicAuthenticationFilter . LOG . warn ( ( "The<sp>'doAs'<sp>query<sp>parameter<sp>was<sp>provided;<sp>however,<sp>the<sp>BasicAuth<sp>header<sp>is<sp>found.<sp>" + "Ignoring<sp>the<sp>BasicAuth<sp>header<sp>hoping<sp>to<sp>negotiate<sp>Kerberos<sp>authentication." ) ) ; return false ; } } else { return false ; } }
|
org . junit . Assert . assertTrue ( filter . shouldApply ( httpServletRequest ) )
|
testDeeperPathExtraction ( ) { java . lang . String regex = "^/([^/]+/[^/]+)(/|$)" ; org . apache . druid . query . extraction . ExtractionFn extractionFn = new org . apache . druid . query . extraction . RegexDimExtractionFn ( regex , false , null ) ; java . util . Set < java . lang . String > extracted = new java . util . LinkedHashSet ( ) ; for ( java . lang . String path : org . apache . druid . query . extraction . RegexDimExtractionFnTest . paths ) { extracted . add ( extractionFn . apply ( path ) ) ; } java . util . Set < java . lang . String > expected = com . google . common . collect . Sets . newLinkedHashSet ( com . google . common . collect . ImmutableList . of ( "druid/prod" , "druid/demo" , "dash/aloe" , "dash/baloo" ) ) ; "<AssertPlaceHolder>" ; } of ( java . lang . String , org . joda . time . Interval , java . lang . String , org . apache . druid . timeline . partition . ShardSpec ) { return org . apache . druid . timeline . SegmentId . of ( dataSource , interval , version , ( shardSpec != null ? shardSpec . getPartitionNum ( ) : 0 ) ) ; }
|
org . junit . Assert . assertEquals ( expected , extracted )
|
testOutOfBoundsThrownOnMalformedString ( ) { io . netty . buffer . ByteBuf byteBuffer = ByteBufAllocator . DEFAULT . buffer ( 5 ) ; byteBuffer . writeInt ( Integer . MAX_VALUE ) ; java . lang . Exception e = null ; try { org . apache . activemq . artemis . api . core . SimpleString . readSimpleString ( byteBuffer ) ; } catch ( java . lang . IndexOutOfBoundsException iob ) { e = iob ; } "<AssertPlaceHolder>" ; } readSimpleString ( io . netty . buffer . ByteBuf ) { int len = buffer . readInt ( ) ; return org . apache . activemq . artemis . api . core . SimpleString . readSimpleString ( buffer , len ) ; }
|
org . junit . Assert . assertTrue ( ( e instanceof java . lang . IndexOutOfBoundsException ) )
|
testMapDupsIgnored ( ) { org . apache . drill . exec . physical . rowSet . project . RequestedTuple projSet = org . apache . drill . exec . physical . rowSet . project . RequestedTupleImpl . parse ( org . apache . drill . exec . physical . rowSet . impl . RowSetTestUtils . projectList ( "a" , "a.b" , "a.c" , "a.b" ) ) ; java . util . List < org . apache . drill . exec . physical . rowSet . project . RequestedTuple . RequestedColumn > cols = projSet . projections ( ) ; "<AssertPlaceHolder>" ; } size ( ) { fail ( "size()" ) ; return - 1 ; }
|
org . junit . Assert . assertEquals ( 1 , cols . size ( ) )
|
testSerialization ( ) { org . jfree . chart . plot . CombinedRangeCategoryPlot plot1 = createPlot ( ) ; org . jfree . chart . plot . CombinedRangeCategoryPlot plot2 = ( ( org . jfree . chart . plot . CombinedRangeCategoryPlot ) ( org . jfree . chart . TestUtilities . serialised ( plot1 ) ) ) ; "<AssertPlaceHolder>" ; } serialised ( java . lang . Object ) { java . lang . Object result = null ; java . io . ByteArrayOutputStream buffer = new java . io . ByteArrayOutputStream ( ) ; java . io . ObjectOutput out ; try { out = new java . io . ObjectOutputStream ( buffer ) ; out . writeObject ( original ) ; out . close ( ) ; java . io . ObjectInput in = new java . io . ObjectInputStream ( new java . io . ByteArrayInputStream ( buffer . toByteArray ( ) ) ) ; result = in . readObject ( ) ; in . close ( ) ; } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new java . lang . RuntimeException ( e ) ; } return result ; }
|
org . junit . Assert . assertEquals ( plot1 , plot2 )
|
canBeSatisfiedTrue ( ) { eu . abc4trust . services . user . UserServiceFactory userServiceFactory = new eu . abc4trust . services . user . UserServiceFactory ( ) ; java . lang . String engineSuffix = "idemix" ; eu . abc4trust . xml . IssuancePolicyAndAttributes issuancePolicyAndAttributes = userServiceFactory . loadIssuancePolicyAndAttributes ( "/issuancePolicyAndAttributes.xml" ) ; eu . abc4trust . services . TestScenarioFactory testScenarioFactory = new eu . abc4trust . services . TestScenarioFactory ( ) ; testScenarioFactory . issuanceProtocol ( engineSuffix , issuancePolicyAndAttributes ) ; boolean b = this . canBeSatisfied ( ) ; "<AssertPlaceHolder>" ; } canBeSatisfied ( ) { eu . abc4trust . services . user . UserServiceFactory userServiceFactory = new eu . abc4trust . services . user . UserServiceFactory ( ) ; java . lang . String presentationPolicyFilename = "presentationPolicySimpleIdentitycard.xml" ; eu . abc4trust . xml . PresentationPolicyAlternatives presentationPolicy = ( ( eu . abc4trust . xml . PresentationPolicyAlternatives ) ( eu . abc4trust . xml . util . XmlUtils . getObjectFromXML ( eu . abc4trust . ri . servicehelper . FileSystem . getInputStream ( ( "src/test/resources/" + presentationPolicyFilename ) ) , true ) ) ) ; boolean b = userServiceFactory . canBeSatisfied ( presentationPolicy ) ; return b ; }
|
org . junit . Assert . assertTrue ( b )
|
test58 ( ) { net . pms . formats . AudioAsVideo audioAsVideo0 = new net . pms . formats . AudioAsVideo ( ) ; java . lang . String [ ] str_array1 = audioAsVideo0 . getSupportedExtensions ( ) ; "<AssertPlaceHolder>" ; } getSupportedExtensions ( ) { return new java . lang . String [ ] { "ogg" , "ogm" , "ogv" } ; }
|
org . junit . Assert . assertNotNull ( str_array1 )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.