input stringlengths 28 18.7k | output stringlengths 39 1.69k |
|---|---|
isNotEqualsWithLowerCaseWorking ( ) { if ( isBatoo ( ) ) { return ; } final java . lang . String query = "select<sp>r<sp>from<sp>RegularEntityTwo<sp>r<sp>" + "<sp>where<sp>r.id<sp>in<sp>(select<sp>sub.id<sp>from<sp>RegularEntityOne<sp>sub<sp>where<sp>lower(sub.stringAttribute)<sp><><sp>lower('Just<sp>a<sp>String<sp>02'))" ; final java . util . List < com . uaihebert . model . test . RegularEntityTwo > resultFromJPQL = jpqlHelper . getListFromJPQL ( query , com . uaihebert . model . test . RegularEntityTwo . class ) ; "<AssertPlaceHolder>" ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityTwo > uaiCriteria = createCriteria ( com . uaihebert . model . test . RegularEntityTwo . class ) ; final com . uaihebert . uaicriteria . UaiCriteria < com . uaihebert . model . test . RegularEntityOne > subQuery = uaiCriteria . subQuery ( "id" , com . uaihebert . model . test . RegularEntityOne . class ) ; subQuery . andNotEquals ( true , "stringAttribute" , "Just<sp>a<sp>String<sp>02" ) ; uaiCriteria . andAttributeIn ( "id" , subQuery ) ; validateTestLists ( resultFromJPQL , uaiCriteria . getResultList ( ) ) ; } getListFromJPQL ( java . lang . String , java . lang . Class ) { return getListFromJPQL ( query , classToUse , null ) ; } | org . junit . Assert . assertTrue ( ( ( resultFromJPQL . size ( ) ) > 0 ) ) |
testKroneckerMultiplication2 ( ) { cc . redberry . rings . poly . MultivariateRing < cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 > pRing = cc . redberry . rings . Rings . MultivariateRing ( cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 . zero ( 4 , cc . redberry . rings . Rings . Zp64 ( 17 ) , cc . redberry . rings . poly . multivar . MonomialOrder . LEX ) ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 a = pRing . randomElement ( 5 , 550 ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 b = pRing . randomElement ( 5 , 550 ) ; System . out . println ( a . sparsity ( ) ) ; System . out . println ( b . sparsity ( ) ) ; int nIts = 1 ; long size = 0 ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 . KRONECKER_THRESHOLD = Integer . MAX_VALUE ; long start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 ev = a . clone ( ) . multiply ( b ) ; for ( int j = 0 ; j < nIts ; j ++ ) size += a . clone ( ) . multiply ( b ) . size ( ) ; double plain = ( java . lang . System . nanoTime ( ) ) - start ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 . KRONECKER_THRESHOLD = 10 ; start = java . lang . System . nanoTime ( ) ; cc . redberry . rings . poly . multivar . MultivariatePolynomialZp64 . MultivariatePolynomialZp64 ev2 = a . clone ( ) . multiply ( b ) ; for ( int j = 0 ; j < nIts ; j ++ ) size += a . clone ( ) . multiply ( b ) . size ( ) ; double kronecker = ( java . lang . System . nanoTime ( ) ) - start ; System . out . println ( ( ( ( 1.0 * ( a . size ( ) ) ) * ( b . size ( ) ) ) / ( ( size / 2 ) / ( nIts + 1 ) ) ) ) ; System . out . println ( ( plain / kronecker ) ) ; "<AssertPlaceHolder>" ; System . out . println ( ) ; } } size ( ) { return list . size ( ) ; } | org . junit . Assert . assertEquals ( ev , ev2 ) |
testSimpleNoDecimals ( ) { org . hipparchus . geometry . euclidean . oned . Vector1D c = new org . hipparchus . geometry . euclidean . oned . Vector1D ( 1 ) ; java . lang . String expected = "{1}" ; java . lang . String actual = vector1DFormat . format ( c ) ; "<AssertPlaceHolder>" ; } format ( org . hipparchus . geometry . Vector ) { return format ( vector , new java . lang . StringBuffer ( ) , new java . text . FieldPosition ( 0 ) ) . toString ( ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testSVRWithNoFilter ( ) { int numOutputRecords = testPhysical ( getFile ( "remover/sv_with_no_filter.json" ) ) ; "<AssertPlaceHolder>" ; } getFile ( java . lang . String ) { final java . net . URL url = com . google . common . io . Resources . getResource ( resource ) ; if ( url == null ) { throw new java . io . IOException ( java . lang . String . format ( "Unable<sp>to<sp>find<sp>path<sp>%s." , resource ) ) ; } return com . google . common . io . Resources . toString ( url , Charsets . UTF_8 ) ; } | org . junit . Assert . assertEquals ( 100 , numOutputRecords ) |
testMonitorRunningAnalysesSuccessRunning ( ) { analysisSubmission . setAnalysisState ( AnalysisState . RUNNING ) ; java . util . Map < ca . corefacility . bioinformatics . irida . model . workflow . execution . galaxy . GalaxyWorkflowState , java . util . Set < java . lang . String > > stateIds = ca . corefacility . bioinformatics . irida . pipeline . upload . galaxy . integration . Util . buildStateIdsWithStateFilled ( GalaxyWorkflowState . RUNNING , com . google . common . collect . Sets . newHashSet ( "1" ) ) ; when ( analysisSubmissionRepository . findByAnalysisState ( AnalysisState . RUNNING ) ) . thenReturn ( java . util . Arrays . asList ( analysisSubmission ) ) ; when ( analysisExecutionService . getWorkflowStatus ( analysisSubmission ) ) . thenReturn ( new ca . corefacility . bioinformatics . irida . model . workflow . execution . galaxy . GalaxyWorkflowStatus ( ca . corefacility . bioinformatics . irida . model . workflow . execution . galaxy . GalaxyWorkflowState . RUNNING , stateIds ) ) ; analysisExecutionScheduledTask . monitorRunningAnalyses ( ) ; "<AssertPlaceHolder>" ; verify ( analysisSubmissionRepository , never ( ) ) . save ( analysisSubmission ) ; } getAnalysisState ( ) { return analysisState ; } | org . junit . Assert . assertEquals ( AnalysisState . RUNNING , analysisSubmission . getAnalysisState ( ) ) |
test_getTagWithKey ( ) { java . util . Map < io . github . data4all . model . data . Tag , java . lang . String > tags = new java . util . LinkedHashMap < io . github . data4all . model . data . Tag , java . lang . String > ( ) ; tags . put ( io . github . data4all . model . data . Tags . getTagWithId ( 10 ) , "orchard" ) ; System . out . println ( io . github . data4all . model . data . Tags . getTagWithId ( 10 ) ) ; testNode . addTags ( tags ) ; "<AssertPlaceHolder>" ; } getTagValueWithKey ( io . github . data4all . model . data . Tag ) { return tags . get ( key ) ; } | org . junit . Assert . assertEquals ( "orchard" , testNode . getTagValueWithKey ( io . github . data4all . model . data . Tags . getTagWithId ( 10 ) ) ) |
testJsonMapJavaField ( ) { io . atlasmap . v2 . AtlasMapping atlasMapping = generateAtlasMapping ( ) ; mapper . writerWithDefaultPrettyPrinter ( ) . writeValue ( new java . io . File ( ( ( ( ( ( ( "target" + ( java . io . File . separator ) ) + "junit" ) + ( java . io . File . separator ) ) + ( testName . getMethodName ( ) ) ) + ( java . io . File . separator ) ) + "atlasmapping.json" ) ) , atlasMapping ) ; io . atlasmap . v2 . AtlasMapping uMapping = mapper . readValue ( new java . io . File ( ( ( ( ( ( ( "target" + ( java . io . File . separator ) ) + "junit" ) + ( java . io . File . separator ) ) + ( testName . getMethodName ( ) ) ) + ( java . io . File . separator ) ) + "atlasmapping.json" ) ) , io . atlasmap . v2 . AtlasMapping . class ) ; "<AssertPlaceHolder>" ; validateAtlasMapping ( uMapping ) ; } getMethodName ( ) { return methodName ; } | org . junit . Assert . assertNotNull ( uMapping ) |
testInitialize ( ) { java . util . Map < java . lang . String , java . lang . String > conf = new java . util . HashMap ( ) ; conf . put ( Constants . RSTORE_TYPE , io . symcpe . hendrix . storm . TopologyTestRulesStore . class . getName ( ) ) ; io . symcpe . wraith . rules . RuleCommand rc = new io . symcpe . wraith . rules . RuleCommand ( "test" , false , io . symcpe . wraith . rules . RuleSerializer . serializeRulesToJSONString ( java . util . Arrays . asList ( new io . symcpe . wraith . rules . SimpleRule ( ( ( short ) ( 2 ) ) , "test" , true , new io . symcpe . wraith . conditions . relational . EqualsCondition ( "test" , "test" ) , new io . symcpe . wraith . actions . Action [ ] { new io . symcpe . wraith . actions . aggregations . StateAggregationAction ( ( ( short ) ( 0 ) ) , "test" , 100 , new io . symcpe . wraith . conditions . relational . EqualsCondition ( "test" , "test" ) ) } ) ) , false ) ) ; conf . put ( TestAlertingEngineBolt . RULES_CONTENT , new com . google . gson . Gson ( ) . toJson ( new io . symcpe . wraith . rules . RuleCommand [ ] { rc } ) ) ; io . symcpe . hendrix . storm . bolts . AggregationControllerBolt bolt = new io . symcpe . hendrix . storm . bolts . AggregationControllerBolt ( ) ; bolt . prepare ( conf , null , collector ) ; "<AssertPlaceHolder>" ; } getRuleMap ( ) { return ruleMap ; } | org . junit . Assert . assertEquals ( 1 , bolt . getRuleMap ( ) . size ( ) ) |
addAndGetTest ( ) { org . opengrok . indexer . web . messages . Message m = new org . opengrok . indexer . web . messages . Message ( "test" , java . util . Collections . singleton ( "test" ) , "info" , java . time . Duration . ofMinutes ( 10 ) ) ; container . addMessage ( m ) ; "<AssertPlaceHolder>" ; } getMessages ( java . lang . String ) { return env . getMessages ( tag ) ; } | org . junit . Assert . assertEquals ( m , container . getMessages ( "test" ) . first ( ) . getMessage ( ) ) |
readNonexistentPreferenceFromSpecificScopeTest ( ) { final org . uberfire . preferences . shared . PreferenceScope scope = userEntireApplicationScope ; final java . lang . String value = preferenceStorageServiceBackendImpl . read ( scope , "my.nonexistent.preference.key" ) ; "<AssertPlaceHolder>" ; } read ( org . uberfire . security . impl . authz . AuthorizationPolicyBuilder , java . util . Map [ ] ) { for ( java . util . Map m : input ) { m . forEach ( ( x , y ) -> read ( builder , x . toString ( ) , y . toString ( ) , DEFAULT_ONLY ) ) ; } for ( java . util . Map m : input ) { m . forEach ( ( x , y ) -> read ( builder , x . toString ( ) , y . toString ( ) , DEFAULT_EXCLUDED ) ) ; } } | org . junit . Assert . assertNull ( value ) |
getPrincipal_User_SkipsAccessingUserDetailsServiceAccordingToEmptyProperty ( ) { java . security . Principal principal = callGetPrincipalForUserString ( "" , mock ( org . springframework . security . core . userdetails . UserDetails . class ) ) ; "<AssertPlaceHolder>" ; verify ( provider , never ( ) ) . internalGetUserDetails ( org . pentaho . platform . repository2 . unified . jcr . jackrabbit . security . SpringSecurityPrincipalProvider_PrincipalCreation_Test . USERNAME ) ; } getName ( ) { return name ; } | org . junit . Assert . assertEquals ( org . pentaho . platform . repository2 . unified . jcr . jackrabbit . security . SpringSecurityPrincipalProvider_PrincipalCreation_Test . USERNAME , principal . getName ( ) ) |
missing_vcalendar_component_no_components ( ) { java . lang . String ical = "PRODID:prodid\r\n" + "VERSION:2.0\r\n" ; biweekly . io . text . ICalReader reader = new biweekly . io . text . ICalReader ( ical ) ; "<AssertPlaceHolder>" ; } readNext ( ) { warnings . clear ( ) ; context = new biweekly . io . ParseContext ( ) ; biweekly . ICalendar ical = _readNext ( ) ; if ( ical == null ) { return null ; } ical . setVersion ( context . getVersion ( ) ) ; handleTimezones ( ical ) ; return ical ; } | org . junit . Assert . assertNull ( reader . readNext ( ) ) |
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . asset . display . page . model . AssetDisplayPageEntry . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "assetDisplayPageEntryId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "assetDisplayPageEntryId" , 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 ( ) ) |
testTestAgency ( ) { java . lang . String agencyId = "agency" ; org . onebusaway . gtfs . impl . GtfsRelationalDaoImpl dao = new org . onebusaway . gtfs . impl . GtfsRelationalDaoImpl ( ) ; org . onebusaway . gtfs . GtfsTestData . readGtfs ( dao , org . onebusaway . gtfs . GtfsTestData . getTestAgencyGtfs ( ) , agencyId ) ; java . util . List < org . onebusaway . gtfs . model . Trip > trips = dao . getTripsForBlockId ( new org . onebusaway . gtfs . model . AgencyAndId ( agencyId , "block.1" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; } | org . junit . Assert . assertEquals ( 2 , trips . size ( ) ) |
testExecuteScanPackageNamesOk ( ) { java . util . List < java . lang . String > packageNames = new java . util . ArrayList < java . lang . String > ( ) ; packageNames . add ( "de.crowdcode.kissmda.maven.plugin.withguice" ) ; org . apache . maven . project . MavenProject mavenProject = new org . apache . maven . project . MavenProject ( ) ; mavenProject . setFile ( new java . io . File ( "target/tmp/test" ) ) ; kissMdaMojo . setTransformerScanPackageNames ( packageNames ) ; kissMdaMojo . setModelFile ( "src/main/resources/model/emf/test-uml.uml" ) ; kissMdaMojo . setProject ( mavenProject ) ; kissMdaMojo . execute ( ) ; "<AssertPlaceHolder>" ; } execute ( ) { logger . info ( "Start<sp>KissMdaMojo..." ) ; setLoggingLevel ( ) ; try { com . google . inject . Injector parentInjector = com . google . inject . Guice . createInjector ( new de . crowdcode . kissmda . core . CoreModule ( context ) ) ; java . lang . String fullNameModelFile = ( ( project . getBasedir ( ) ) + "/" ) + ( modelFile ) ; java . lang . String fullNameTargetDirectory = ( ( project . getBasedir ( ) ) + "/" ) + ( generatedSourcesTargetDirectory ) ; context . setSourceModel ( fullNameModelFile ) ; context . setTargetModel ( fullNameTargetDirectory ) ; context . setTargetEncoding ( targetEncoding ) ; context . setPropertyFile ( propertyFile ) ; if ( ( ( transformerNameWithOrders ) != null ) && ( ( transformerNameWithOrders . size ( ) ) != 0 ) ) { useTransformerNamesWithOrder ( parentInjector ) ; } else { useTransformerScanPackageNames ( parentInjector ) ; } logger . info ( "Stop<sp>KissMdaMojo<sp>without<sp>error..." ) ; } catch ( de . crowdcode . kissmda . core . TransformerException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "Error<sp>transform<sp>the<sp>model:<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } catch ( java . lang . InstantiationException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "Error<sp>transform<sp>the<sp>model:<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } catch ( java . lang . IllegalAccessException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "Error<sp>transform<sp>the<sp>model:<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } catch ( java . lang . ClassNotFoundException e ) { throw new org . apache . maven . plugin . MojoExecutionException ( ( "Error<sp>transform<sp>the<sp>model:<sp>" + ( e . getLocalizedMessage ( ) ) ) , e ) ; } } | org . junit . Assert . assertTrue ( true ) |
testDeletedTriggersInNotifications ( ) { com . salesforce . dva . argus . service . UserService userService = system . getServiceFactory ( ) . getUserService ( ) ; com . salesforce . dva . argus . service . AlertService alertService = system . getServiceFactory ( ) . getAlertService ( ) ; com . salesforce . dva . argus . entity . Alert alert = new com . salesforce . dva . argus . entity . Alert ( userService . findAdminUser ( ) , userService . findAdminUser ( ) , "alert-name" , com . salesforce . dva . argus . service . AlertServiceTest . EXPRESSION , "*<sp>*<sp>*<sp>*<sp>*" ) ; com . salesforce . dva . argus . entity . Notification notification1 = new com . salesforce . dva . argus . entity . Notification ( "notification1" , alert , "notifier-name1" , new java . util . ArrayList < java . lang . String > ( ) , 5000L ) ; com . salesforce . dva . argus . entity . Notification notification2 = new com . salesforce . dva . argus . entity . Notification ( "notification2" , alert , "notifier-name2" , new java . util . ArrayList < java . lang . String > ( ) , 5000L ) ; com . salesforce . dva . argus . entity . Notification notification3 = new com . salesforce . dva . argus . entity . Notification ( "notification3" , alert , "notifier-name3" , new java . util . ArrayList < java . lang . String > ( ) , 5000L ) ; com . salesforce . dva . argus . entity . Trigger trigger1 = new com . salesforce . dva . argus . entity . Trigger ( alert , com . salesforce . dva . argus . entity . Trigger . TriggerType . GREATER_THAN_OR_EQ , "trigger-name1" , 0.95 , 60000 ) ; alert . setNotifications ( java . util . Arrays . asList ( new com . salesforce . dva . argus . entity . Notification [ ] { notification1 , notification2 , notification3 } ) ) ; alert . setTriggers ( java . util . Arrays . asList ( new com . salesforce . dva . argus . entity . Trigger [ ] { trigger1 } ) ) ; notification1 . setTriggers ( alert . getTriggers ( ) ) ; notification2 . setTriggers ( alert . getTriggers ( ) ) ; notification3 . setTriggers ( alert . getTriggers ( ) ) ; alert = alertService . updateAlert ( alert ) ; for ( com . salesforce . dva . argus . entity . Notification notification : alert . getNotifications ( ) ) { notification . setTriggers ( null ) ; } alert . setTriggers ( new java . util . ArrayList < com . salesforce . dva . argus . entity . Trigger > ( ) ) ; alert = alertService . updateAlert ( alert ) ; for ( com . salesforce . dva . argus . entity . Notification notification : alert . getNotifications ( ) ) { "<AssertPlaceHolder>" ; } } getTriggers ( ) { return java . util . Collections . unmodifiableList ( triggers ) ; } | org . junit . Assert . assertTrue ( notification . getTriggers ( ) . isEmpty ( ) ) |
testFilter_accept ( ) { com . navercorp . pinpoint . common . server . bo . filter . SpanEventFilter filter = new com . navercorp . pinpoint . common . server . bo . filter . SequenceSpanEventFilter ( 100 ) ; final com . navercorp . pinpoint . common . server . bo . SpanEventBo spanEventBo = new com . navercorp . pinpoint . common . server . bo . SpanEventBo ( ) ; spanEventBo . setSequence ( ( ( short ) ( 11 ) ) ) ; "<AssertPlaceHolder>" ; } filter ( com . navercorp . pinpoint . common . server . bo . SpanEventBo ) { if ( spanEventBo == null ) { return REJECT ; } final int sequence = spanEventBo . getSequence ( ) ; if ( sequence > ( sequenceLimit ) ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "discard<sp>spanEvent:{}" , spanEventBo ) ; } return REJECT ; } return ACCEPT ; } | org . junit . Assert . assertEquals ( filter . filter ( spanEventBo ) , SpanEventFilter . ACCEPT ) |
testInstagramAuthService ( ) { org . jinstagram . auth . InstagramAuthService result = new org . jinstagram . auth . InstagramAuthService ( ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertNotNull ( result ) |
test ( ) { com . predic8 . membrane . examples . Process2 sl = new com . predic8 . membrane . examples . Process2 . Builder ( ) . in ( getExampleDir ( "logging" ) ) . script ( "service-proxy" ) . waitForMembrane ( ) . start ( ) ; try { com . predic8 . membrane . examples . util . SubstringWaitableConsoleEvent logged = new com . predic8 . membrane . examples . util . SubstringWaitableConsoleEvent ( sl , "HTTP/1.1" ) ; com . predic8 . membrane . test . AssertUtils . getAndAssert200 ( "http://localhost:2000/" ) ; "<AssertPlaceHolder>" ; } finally { sl . killScript ( ) ; } } occurred ( ) { return event ; } | org . junit . Assert . assertEquals ( true , logged . occurred ( ) ) |
isArray_A$String_false ( ) { org . junithelper . core . meta . ClassMeta classMeta = null ; org . junithelper . core . extractor . AvailableTypeDetector target = new org . junithelper . core . extractor . AvailableTypeDetector ( classMeta ) ; java . lang . String typeName = "String" ; boolean actual = target . isArray ( typeName ) ; boolean expected = false ; "<AssertPlaceHolder>" ; } isArray ( java . lang . String ) { return ( typeName != null ) && ( typeName . matches ( ".+?\\[\\]$" ) ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
testHashCode ( ) { com . tc . net . TCSocketAddress tsa1 = new com . tc . net . TCSocketAddress ( TCSocketAddress . LOOPBACK_ADDR , 9000 ) ; com . tc . net . TCSocketAddress tsa2 = new com . tc . net . TCSocketAddress ( TCSocketAddress . LOOPBACK_ADDR , 9000 ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { return ( ( int ) ( ( ( 7 * ( clientID ) ) ^ ( 5 * ( localTransactionID ) ) ) ^ ( globalTransactionID ) ) ) ; } | org . junit . Assert . assertTrue ( ( ( tsa1 . hashCode ( ) ) == ( tsa2 . hashCode ( ) ) ) ) |
testSetDatumCode ( ) { dtm . setDatumCode ( "W72" ) ; "<AssertPlaceHolder>" ; } getDatumCode ( ) { return getStringValue ( net . sf . marineapi . nmea . parser . DTMParser . DATUM_CODE ) ; } | org . junit . Assert . assertEquals ( "W72" , dtm . getDatumCode ( ) ) |
shouldNotStartEndpoint_backup ( ) { io . gravitee . definition . model . Endpoint endpoint = mock ( io . gravitee . definition . model . endpoint . HttpEndpoint . class ) ; when ( endpoint . isBackup ( ) ) . thenReturn ( true ) ; when ( group . getEndpoints ( ) ) . thenReturn ( java . util . Collections . singleton ( endpoint ) ) ; endpointLifecycleManager . start ( ) ; verify ( endpointFactory , never ( ) ) . create ( any ( io . gravitee . gateway . api . endpoint . Endpoint . class ) , any ( io . gravitee . gateway . core . endpoint . factory . template . EndpointContext . class ) ) ; "<AssertPlaceHolder>" ; } endpoints ( ) { return endpoints ; } | org . junit . Assert . assertTrue ( endpointLifecycleManager . endpoints ( ) . isEmpty ( ) ) |
testSpatialFilterWorld ( ) { org . opengis . filter . Filter filter = org . geoserver . csw . store . simple . SimpleCatalogStoreTest . FF . bbox ( "" , ( - 90 ) , ( - 180 ) , 90 , 180 , CSWRecordDescriptor . DEFAULT_CRS_NAME ) ; org . geotools . feature . FeatureCollection records = store . getRecords ( new org . geotools . data . Query ( "Record" , filter ) , Transaction . AUTO_COMMIT ) ; "<AssertPlaceHolder>" ; } size ( ) { if ( ( featureCache ) != null ) { return featureCache . size ( ) ; } if ( ( org . geoserver . wfs . FeatureSizeFeatureCollection . FEATURE_CACHE_LIMIT ) > 0 ) { try { int count = featureSource . getCount ( query ) ; if ( count == 0 ) { featureCache = new java . util . ArrayList ( ) ; return count ; } if ( count > 0 ) { return count ; } java . util . List < org . opengis . feature . simple . SimpleFeature > tempFeatureCache = new java . util . ArrayList ( ) ; try ( org . geotools . data . simple . SimpleFeatureIterator it = featureSource . getFeatures ( query ) . features ( ) ) { count = 0 ; while ( it . hasNext ( ) ) { org . opengis . feature . simple . SimpleFeature feature = it . next ( ) ; if ( ( tempFeatureCache . size ( ) ) < ( org . geoserver . wfs . FeatureSizeFeatureCollection . FEATURE_CACHE_LIMIT ) ) { tempFeatureCache . add ( feature ) ; } count ++ ; } if ( count <= ( org . geoserver . wfs . FeatureSizeFeatureCollection . FEATURE_CACHE_LIMIT ) ) { featureCache = tempFeatureCache ; } else { tempFeatureCache . clear ( ) ; } return count ; } } catch ( java . io . IOException e ) { throw new java . lang . RuntimeException ( e ) ; } } return super . size ( ) ; } | org . junit . Assert . assertEquals ( 3 , records . size ( ) ) |
shouldUpgradeExclusiveOnTry ( ) { clientA . acquireShared ( LockTracer . NONE , org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 1L ) ; "<AssertPlaceHolder>" ; clientA . releaseExclusive ( org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 1L ) ; } tryExclusiveLock ( org . neo4j . storageengine . api . lock . ResourceType , long ) { stateHolder . incrementActiveClients ( this ) ; try { final org . eclipse . collections . api . map . primitive . MutableLongObjectMap < org . neo4j . kernel . impl . locking . community . LockResource > localLocks = localExclusive ( resourceType ) ; org . neo4j . kernel . impl . locking . community . LockResource resource = localLocks . get ( resourceId ) ; if ( resource != null ) { resource . acquireReference ( ) ; return true ; } else { resource = new org . neo4j . kernel . impl . locking . community . LockResource ( resourceType , resourceId ) ; if ( manager . tryWriteLock ( resource , lockTransaction ) ) { localLocks . put ( resourceId , resource ) ; return true ; } else { return false ; } } } finally { stateHolder . decrementActiveClients ( ) ; } } | org . junit . Assert . assertTrue ( clientA . tryExclusiveLock ( org . neo4j . kernel . impl . locking . ResourceTypes . NODE , 1L ) ) |
testGetChildrenList_leaf ( ) { java . util . List < org . abego . treelayout . StringTreeNode > children = tree . getChildrenList ( n1 ) ; "<AssertPlaceHolder>" ; } getChildrenList ( org . abego . treelayout . StringTreeNode ) { return node . getChildren ( ) ; } | org . junit . Assert . assertEquals ( 0 , children . size ( ) ) |
test_getJdbcSqlTypeName ( ) { int code = 1 ; java . lang . String result = jdbcType . getJdbcSqlTypeName ( code ) ; "<AssertPlaceHolder>" ; } getJdbcSqlTypeName ( int ) { for ( cn . org . rapid_framework . generator . util . typemapping . JdbcType type : cn . org . rapid_framework . generator . util . typemapping . JdbcType . values ( ) ) { if ( ( type . TYPE_CODE ) == code ) { return type . name ( ) ; } } return null ; } | org . junit . Assert . assertNotNull ( result ) |
testBuilderLookup ( ) { final nl . bzk . brp . domain . leveringmodel . MetaObject . Builder testBuilder = nl . bzk . brp . domain . leveringmodel . MetaObject . maakBuilder ( ) . metId ( 999 ) . metObjectElement ( Element . PERSOON ) . metGroep ( ) . metGroepElement ( Element . PERSOON_IDENTITEIT . getId ( ) ) . metRecord ( ) . metAttribuut ( Element . PERSOON_SOORTCODE . getId ( ) , SoortPersoon . INGESCHREVENE . getCode ( ) ) . eindeRecord ( ) . eindeGroep ( ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject persoon = testBuilder . build ( ) ; final nl . bzk . algemeenbrp . services . blobber . json . BlobRoot root = nl . bzk . brp . service . algemeen . blob . BlobConverter . converteer ( persoon ) ; final nl . bzk . brp . service . algemeen . blob . BlobTerugConverter blobConverter = new nl . bzk . brp . service . algemeen . blob . BlobTerugConverter ( root , AttribuutMapper . INSTANCE ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject . Builder builderInConverter = blobConverter . geefRootMetaObjectBuilders ( ) . iterator ( ) . next ( ) ; final java . lang . String keyOpPersoon = blobConverter . maakObjectBuilderKey ( persoon . getObjectElement ( ) . getId ( ) , persoon . getObjectsleutel ( ) ) ; final nl . bzk . brp . domain . leveringmodel . MetaObject . Builder opzochteBuilder = blobConverter . getObjectBuilder ( keyOpPersoon ) ; "<AssertPlaceHolder>" ; } getObjectBuilder ( java . lang . String ) { return objectMap . get ( key ) ; } | org . junit . Assert . assertTrue ( ( builderInConverter == opzochteBuilder ) ) |
testRemovePrefixAndSuffixWithSpaces ( ) { final java . lang . String date = "<sp>2019-12-25<sp>" ; final java . lang . String expected = "2019-12-25" ; final java . lang . String input = addPrefixAndSuffix ( date ) ; final java . lang . String actual = dateValueFormatter . removePrefixAndSuffix ( input ) ; "<AssertPlaceHolder>" ; } removePrefixAndSuffix ( java . lang . String ) { return rawValue . replace ( org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . DurationHelper . PREFIX , "" ) . replace ( org . kie . workbench . common . dmn . client . editors . types . listview . constraint . common . typed . common . DurationHelper . SUFFIX , "" ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
systemDiagnosticContentRepo ( ) { populateSystemDiagnostics ( ) ; java . lang . String statusRequest = "systemDiagnostics:contentrepositoryusage" ; org . apache . nifi . minifi . commons . status . FlowStatusReport actual = org . apache . nifi . minifi . status . StatusConfigReporter . getStatus ( mockFlowController , statusRequest , org . slf4j . LoggerFactory . getLogger ( org . apache . nifi . minifi . status . StatusConfigReporterTest . class ) ) ; org . apache . nifi . minifi . commons . status . FlowStatusReport expected = new org . apache . nifi . minifi . commons . status . FlowStatusReport ( ) ; expected . setErrorsGeneratingReport ( Collections . EMPTY_LIST ) ; addSystemDiagnosticStatus ( expected , false , false , false , true , false ) ; "<AssertPlaceHolder>" ; } addSystemDiagnosticStatus ( org . apache . nifi . minifi . commons . status . FlowStatusReport , boolean , boolean , boolean , boolean , boolean ) { org . apache . nifi . minifi . commons . status . system . SystemDiagnosticsStatus expectedSystemDiagnosticStatus = new org . apache . nifi . minifi . commons . status . system . SystemDiagnosticsStatus ( ) ; if ( addHeap ) { org . apache . nifi . minifi . commons . status . system . HeapStatus heapStatus = new org . apache . nifi . minifi . commons . status . system . HeapStatus ( ) ; heapStatus . setMaxHeap ( 5 ) ; heapStatus . setTotalHeap ( 3 ) ; heapStatus . setUsedHeap ( 2 ) ; heapStatus . setFreeHeap ( 1 ) ; heapStatus . setHeapUtilization ( 40 ) ; heapStatus . setMaxNonHeap ( 9 ) ; heapStatus . setTotalNonHeap ( 8 ) ; heapStatus . setUsedNonHeap ( 6 ) ; heapStatus . setFreeNonHeap ( 2 ) ; heapStatus . setNonHeapUtilization ( 67 ) ; expectedSystemDiagnosticStatus . setHeapStatus ( heapStatus ) ; } if ( addProcessorStats ) { org . apache . nifi . minifi . commons . status . system . SystemProcessorStats systemProcessorStats = new org . apache . nifi . minifi . commons . status . system . SystemProcessorStats ( ) ; systemProcessorStats . setLoadAverage ( 80.9 ) ; systemProcessorStats . setAvailableProcessors ( 5 ) ; expectedSystemDiagnosticStatus . setProcessorStatus ( systemProcessorStats ) ; } if ( addFlowFileRepoUsage ) { org . apache . nifi . minifi . commons . status . system . FlowfileRepositoryUsage flowfileRepositoryUsage = new org . apache . nifi . minifi . commons . status . system . FlowfileRepositoryUsage ( ) ; flowfileRepositoryUsage . setFreeSpace ( 30 ) ; flowfileRepositoryUsage . setTotalSpace ( 100 ) ; flowfileRepositoryUsage . setUsedSpace ( 70 ) ; flowfileRepositoryUsage . setDiskUtilization ( 70 ) ; expectedSystemDiagnosticStatus . setFlowfileRepositoryUsage ( flowfileRepositoryUsage ) ; } if ( addContentRepoUsage ) { java . util . List < org . apache . nifi . minifi . commons . status . system . ContentRepositoryUsage > contentRepositoryUsageList = new java . util . LinkedList ( ) ; org . apache . nifi . minifi . commons . status . system . ContentRepositoryUsage contentRepositoryUsage = new org . apache . nifi . minifi . commons . status . system . ContentRepositoryUsage ( ) ; contentRepositoryUsage . setFreeSpace ( 30 ) ; contentRepositoryUsage . setTotalSpace ( 100 ) ; contentRepositoryUsage . setName ( "Content<sp>repo1" ) ; contentRepositoryUsage . setUsedSpace ( 70 ) ; contentRepositoryUsage . setDiskUtilization ( 70 ) ; contentRepositoryUsageList . add ( contentRepositoryUsage ) ; expectedSystemDiagnosticStatus . setContentRepositoryUsageList ( contentRepositoryUsageList ) ; } if ( addGarbageCollectionStatus ) { java . util . List < org . apache . nifi . minifi . commons . status . system . GarbageCollectionStatus > garbageCollectionStatusList = new java . util . LinkedList ( ) ; org . apache . nifi . minifi . commons . status . system . GarbageCollectionStatus garbageCollectionStatus1 = new org . apache . nifi . minifi . commons . status . system . GarbageCollectionStatus ( ) ; garbageCollectionStatus1 . setCollectionCount ( 1 ) ; garbageCollectionStatus1 . setCollectionTime ( 10 ) ; garbageCollectionStatus1 . setName ( "garbage<sp>1" ) ; garbageCollectionStatusList . add ( garbageCollectionStatus1 ) ; expectedSystemDiagnosticStatus . setGarbageCollectionStatusList ( garbageCollectionStatusList ) ; } flowStatusReport . setSystemDiagnosticsStatus ( expectedSystemDiagnosticStatus ) ; } | org . junit . Assert . assertEquals ( expected , actual ) |
getUniqueNonce ( ) { java . lang . String nonce = com . aliyuncs . utils . ParameterHelper . getUniqueNonce ( ) ; "<AssertPlaceHolder>" ; } getUniqueNonce ( ) { java . lang . String nonce = com . aliyuncs . utils . ParameterHelper . getUniqueNonce ( ) ; org . junit . Assert . assertNotEquals ( nonce , com . aliyuncs . utils . ParameterHelper . getUniqueNonce ( ) ) ; } | org . junit . Assert . assertNotEquals ( nonce , com . aliyuncs . utils . ParameterHelper . getUniqueNonce ( ) ) |
applyMaterieelVanafGeldigTrue ( ) { nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder groepBuilder = new nl . bzk . brp . domain . leveringmodel . MetaGroep . Builder ( null ) ; groepBuilder . metGroepElement ( Element . PERSOON_ADRES_STANDAARD . getId ( ) ) ; final nl . bzk . brp . domain . leveringmodel . MetaGroep metaGroep = groepBuilder . build ( null ) ; nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder recordBuilder = new nl . bzk . brp . domain . leveringmodel . MetaRecord . Builder ( groepBuilder ) ; recordBuilder . metDatumEindeGeldigheid ( 20150101 ) ; final nl . bzk . brp . domain . leveringmodel . MetaRecord metaRecord = recordBuilder . build ( metaGroep ) ; final boolean apply = nl . bzk . brp . domain . leveringmodel . persoon . HistorieVanafPredikaat . geldigOpEnNa ( 20140101 ) . apply ( metaRecord ) ; "<AssertPlaceHolder>" ; } apply ( nl . bzk . brp . model . basis . MaterieleHistorie ) { return ( ( materieleHistorie . getDatumAanvangGeldigheid ( ) . voor ( peilDatum ) ) || ( peilDatum . getWaarde ( ) . equals ( materieleHistorie . getDatumAanvangGeldigheid ( ) . getWaarde ( ) ) ) ) && ( ( ( materieleHistorie . getDatumEindeGeldigheid ( ) ) == null ) || ( materieleHistorie . getDatumEindeGeldigheid ( ) . na ( peilDatum ) ) ) ; } | org . junit . Assert . assertThat ( apply , org . hamcrest . core . Is . is ( true ) ) |
testPUT ( ) { configurationState = doPost ( configurationState , ConfigurationFactoryService . SELF_LINK ) ; java . lang . String value2 = "value2" ; configurationState . value = value2 ; doOperation ( configurationState , com . vmware . xenon . common . UriUtils . buildUri ( host , configurationState . documentSelfLink ) , false , Action . PUT ) ; com . vmware . admiral . service . common . ConfigurationService . ConfigurationState updatedConfigState = getDocument ( com . vmware . admiral . service . common . ConfigurationService . ConfigurationState . class , configurationState . documentSelfLink ) ; "<AssertPlaceHolder>" ; } getDocument ( java . lang . String , java . lang . Class ) { java . lang . String body = com . vmware . admiral . BaseIntegrationSupportIT . sendRequest ( HttpMethod . GET , seflLink , null ) ; if ( ( body == null ) || ( body . isEmpty ( ) ) ) { return null ; } return com . vmware . xenon . common . Utils . fromJson ( body , type ) ; } | org . junit . Assert . assertEquals ( value2 , updatedConfigState . value ) |
equals_differentChildPresence2 ( ) { com . icantrap . collections . dawg . Node lhs = new com . icantrap . collections . dawg . Node ( 'x' ) ; com . icantrap . collections . dawg . Node rhs = new com . icantrap . collections . dawg . Node ( 'x' ) ; rhs . addChild ( 'a' ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ( this ) == obj ) return false ; if ( ( getClass ( ) ) != ( obj . getClass ( ) ) ) return false ; com . icantrap . collections . dawg . Dawg . Result other = ( ( com . icantrap . collections . dawg . Dawg . Result ) ( obj ) ) ; return word . equals ( other . word ) ; } | org . junit . Assert . assertFalse ( lhs . equals ( rhs ) ) |
testUnavailable ( ) { java . util . Map < java . lang . String , java . lang . Object > parameters = createBasicParams ( ) ; parameters . put ( "group-health" , 70 ) ; org . opennms . netmgt . poller . PollStatus status = monitor . poll ( createMonitor ( ) , parameters ) ; "<AssertPlaceHolder>" ; } isAvailable ( ) { return available ; } | org . junit . Assert . assertFalse ( status . isAvailable ( ) ) |
getInt_test ( ) { pref . edit ( ) . putInt ( "int" , 1 ) . commit ( ) ; com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . system . AndroidPreferences preferences = new com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . system . AndroidPreferences ( context , com . amazonaws . mobileconnectors . amazonmobileanalytics . internal . core . system . AndroidPreferencesTest . preferencesKey ) ; int value = preferences . getInt ( "int" , 0 ) ; "<AssertPlaceHolder>" ; } getInt ( java . lang . String , int ) { return preferences . getInt ( key , optValue ) ; } | org . junit . Assert . assertThat ( value , org . hamcrest . Matchers . is ( 1 ) ) |
testHashCode ( ) { int result = iterator . hashCode ( ) ; int result2 = iterator . hashCode ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { final int prime = 31 ; int result = super . hashCode ( ) ; result = ( prime * result ) + ( fTrace . hashCode ( ) ) ; result = ( prime * result ) + ( ( fCurLocation ) == null ? 0 : fCurLocation . hashCode ( ) ) ; result = ( prime * result ) + ( ( int ) ( ( fCurRank ) ^ ( ( fCurRank ) > > > 32 ) ) ) ; return result ; } | org . junit . Assert . assertEquals ( result , result2 ) |
testToString ( ) { final org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl annotBuilderImpl = new org . opendaylight . mdsal . binding . model . util . generated . type . builder . AnnotationTypeBuilderImpl ( org . opendaylight . mdsal . binding . model . api . JavaTypeName . create ( "org.opedaylight.yangtools.test" , "AnnotationTest" ) ) ; "<AssertPlaceHolder>" ; } toString ( ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; builder . append ( "StaticReferenceMetadata<sp>[interfaceName=" ) . append ( interfaceName ) . append ( "]" ) ; return builder . toString ( ) ; } | org . junit . Assert . assertNotNull ( annotBuilderImpl . toString ( ) ) |
handleEvent_PercentType0invertPercentTrue_returnPercentType100 ( ) { org . openhab . binding . zwave . internal . converter . ZWaveMultiLevelSwitchConverter sut = new org . openhab . binding . zwave . internal . converter . ZWaveMultiLevelSwitchConverter ( controller ) ; java . util . Map < java . lang . String , java . lang . String > configMap = new java . util . HashMap ( ) ; configMap . put ( "config_invert_percent" , "true" ) ; when ( channel . getArguments ( ) ) . thenReturn ( configMap ) ; when ( event . getValue ( ) ) . thenReturn ( 0 ) ; when ( channel . getDataType ( ) ) . thenReturn ( DataType . PercentType ) ; org . eclipse . smarthome . core . types . State state = sut . handleEvent ( channel , event ) ; "<AssertPlaceHolder>" ; } handleEvent ( org . openhab . binding . zwave . handler . ZWaveThingChannel , org . openhab . binding . zwave . internal . protocol . event . ZWaveCommandClassValueEvent ) { logger . debug ( "NODE<sp>{}:<sp>Handle<sp>door<sp>lock<sp>event<sp>{}" , event . getNodeId ( ) , event . getType ( ) ) ; switch ( ( ( org . openhab . binding . zwave . internal . protocol . commandclass . ZWaveDoorLockCommandClass . Type ) ( event . getType ( ) ) ) ) { case DOOR_LOCK_STATE : return handleEventLockState ( channel , event ) ; case DOOR_CONDITION : return handleEventCondition ( channel , event ) ; default : return null ; } } | org . junit . Assert . assertEquals ( new org . eclipse . smarthome . core . library . types . PercentType ( 100 ) , state ) |
testFlattenVendorConfigurationJobJuniperBrackets ( ) { java . lang . String nestedConfig = "nested-config-brackets" ; java . lang . String flattenedConfig = "nested-config-brackets-flattened" ; java . lang . String flatText = org . batfish . job . FlattenVendorConfigurationJobTest . getFlattenedText ( ( ( org . batfish . job . FlattenVendorConfigurationJobTest . JUNIPER_TESTCONFIGS_PREFIX ) + nestedConfig ) ) ; "<AssertPlaceHolder>" ; } readResource ( java . lang . String ) { try ( java . io . InputStream is = java . lang . Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( resourcePath ) ) { if ( is == null ) { throw new org . batfish . common . BatfishException ( ( ( "Error<sp>opening<sp>resource:<sp>'" + resourcePath ) + "'" ) ) ; } byte [ ] bytes = org . apache . commons . io . IOUtils . toByteArray ( is ) ; java . lang . String output = new java . lang . String ( bytes , org . batfish . common . util . CommonUtil . detectCharset ( bytes ) ) ; return output ; } catch ( java . io . IOException e ) { throw new org . batfish . common . BatfishException ( ( ( "Could<sp>not<sp>open<sp>resource:<sp>'" + resourcePath ) + "'" ) , e ) ; } } | org . junit . Assert . assertThat ( flatText , org . hamcrest . Matchers . equalTo ( org . batfish . common . util . CommonUtil . readResource ( ( ( org . batfish . job . FlattenVendorConfigurationJobTest . JUNIPER_TESTCONFIGS_PREFIX ) + flattenedConfig ) ) ) ) |
testFindElementByXpath ( ) { java . util . Random random = new java . util . Random ( ) ; org . openqa . selenium . WebElement text = driver . findElement ( org . openqa . selenium . By . xpath ( "//textfield[1]" ) ) ; int number = ( random . nextInt ( ( ( ( com . sugarcrm . candybean . examples . mobile . AppiumAndroidTest . MAXIMUM ) - ( com . sugarcrm . candybean . examples . mobile . AppiumAndroidTest . MINIMUM ) ) + 1 ) ) ) + ( com . sugarcrm . candybean . examples . mobile . AppiumAndroidTest . MINIMUM ) ; text . sendKeys ( java . lang . String . valueOf ( number ) ) ; driver . findElement ( org . openqa . selenium . By . xpath ( "//button[1]" ) ) . click ( ) ; org . openqa . selenium . WebElement sumLabel = driver . findElement ( org . openqa . selenium . By . xpath ( "//text[1]" ) ) ; "<AssertPlaceHolder>" ; } getText ( ) { logger . info ( ( "Getting<sp>text<sp>for<sp>element:<sp>" + ( this . toString ( ) ) ) ) ; if ( "input" . equals ( we . getTagName ( ) ) ) { return this . we . getAttribute ( "value" ) ; } return this . we . getText ( ) ; } | org . junit . Assert . assertEquals ( sumLabel . getText ( ) , java . lang . String . valueOf ( number ) ) |
testAddAuthorizer ( ) { final org . pac4j . core . config . Config config = new org . pac4j . core . config . Config ( ) ; final org . pac4j . core . authorization . authorizer . RequireAnyRoleAuthorizer authorizer = new org . pac4j . core . authorization . authorizer . RequireAnyRoleAuthorizer ( ) ; config . addAuthorizer ( org . pac4j . core . config . NAME , authorizer ) ; "<AssertPlaceHolder>" ; } getAuthorizers ( ) { return authorizers ; } | org . junit . Assert . assertEquals ( authorizer , config . getAuthorizers ( ) . get ( org . pac4j . core . config . NAME ) ) |
testList ( ) { java . util . List < com . riversoft . weixin . mp . care . bean . Account > accounts = com . riversoft . weixin . mp . care . Accounts . defaultAccounts ( ) . list ( ) ; "<AssertPlaceHolder>" ; } list ( ) { java . lang . String url = com . riversoft . weixin . mp . base . WxEndpoint . get ( "url.care.account.list" ) ; java . lang . String response = wxClient . get ( url ) ; com . riversoft . weixin . mp . care . Accounts . logger . debug ( "list<sp>care<sp>accounts<sp>:{}" , response ) ; com . riversoft . weixin . mp . care . Accounts . CareListResponse careListResponse = com . riversoft . weixin . common . util . JsonMapper . defaultMapper ( ) . fromJson ( response , com . riversoft . weixin . mp . care . Accounts . CareListResponse . class ) ; return careListResponse . getList ( ) ; } | org . junit . Assert . assertNotNull ( accounts ) |
smembers ( ) { session . sadd ( "foo" , "a" ) ; session . sadd ( "foo" , "b" ) ; java . util . Set < java . lang . String > expected = new java . util . LinkedHashSet < java . lang . String > ( ) ; expected . add ( "a" ) ; expected . add ( "b" ) ; java . util . Set < java . lang . String > members = session . smembers ( "foo" ) ; "<AssertPlaceHolder>" ; } smembers ( java . lang . String ) { return execute ( new org . idevlab . rjc . RedisCallback < org . idevlab . rjc . Set < java . lang . String > > ( ) { public org . idevlab . rjc . Set < java . lang . String > doIt ( org . idevlab . rjc . Session session ) { return session . smembers ( key ) ; } } ) ; } | org . junit . Assert . assertEquals ( expected , members ) |
testLoad_ByKey ( ) { com . jmethods . catatumbo . entities . ParentEntity entity = new com . jmethods . catatumbo . entities . ParentEntity ( ) ; entity . setField1 ( "test<sp>for<sp>load<sp>by<sp>key" ) ; entity = com . jmethods . catatumbo . EntityManagerTest . em . insert ( entity ) ; com . jmethods . catatumbo . entities . ParentEntity entity2 = com . jmethods . catatumbo . EntityManagerTest . em . load ( com . jmethods . catatumbo . entities . ParentEntity . class , entity . getKey ( ) ) ; "<AssertPlaceHolder>" ; } getKey ( ) { return key ; } | org . junit . Assert . assertEquals ( entity , entity2 ) |
g_V_valueMap_selectXlast_a_bX ( ) { final org . apache . tinkerpop . gremlin . process . traversal . Traversal < org . apache . tinkerpop . gremlin . structure . Vertex , java . util . Map < java . lang . String , java . lang . Object > > traversal = get_g_V_valueMap_selectXlast_a_bX ( ) ; printTraversalForm ( traversal ) ; "<AssertPlaceHolder>" ; } toList ( ) { return this . fill ( new java . util . ArrayList ( ) ) ; } | org . junit . Assert . assertEquals ( java . util . Collections . emptyList ( ) , traversal . toList ( ) ) |
testRetryMaxRetriesClassLevelConfigForMethodAnnotation ( ) { try { beanE . connect ( ) ; org . junit . Assert . fail ( "Exception<sp>not<sp>thrown" ) ; } catch ( com . ibm . ws . microprofile . faulttolerance_fat . util . ConnectException e ) { } "<AssertPlaceHolder>" ; } getConnectCount ( ) { return connectCount ; } | org . junit . Assert . assertThat ( beanE . getConnectCount ( ) , org . hamcrest . Matchers . is ( 3 ) ) |
readWrite_addRequiredBundle_emptyInOriginal_filteredEvenWhenAddingEmpty ( ) { java . lang . String content = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Manifest-Version:<sp>1.0" + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Bundle-ManifestVersion:<sp>2" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Require-Bundle:<sp>org.eclipse.xtext," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.eclipse.xtext.xbase," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.eclipse.xtext.util," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.antlr.runtime;bundle-version=\"[3.2.0,3.2.1)\"Manifest-Version:<sp>1.0" 2 ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.eclipse.xtext.common.types," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Automatic-Module-Name:<sp>org.eclipse.xtext.example.homeautomation" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ; java . lang . String expected = ( ( ( ( ( ( ( ( ( ( ( ( ( ( "Manifest-Version:<sp>1.0" + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Bundle-ManifestVersion:<sp>2" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Require-Bundle:<sp>org.eclipse.xtext," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.eclipse.xtext.xbase," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.eclipse.xtext.util," ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "<sp>org.antlr.runtime;bundle-version=\"[3.2.0,3.2.1)\"Manifest-Version:<sp>1.0" 2 ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Manifest-Version:<sp>1.0" 0 ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ) + "Automatic-Module-Name:<sp>org.eclipse.xtext.example.homeautomation" ) + ( org . eclipse . xtext . util . MergeableManifest2Test . NL ) ; org . eclipse . xtext . util . MergeableManifest2 manifest = newManifest ( content ) ; manifest . addRequiredBundles ( "Manifest-Version:<sp>1.0" 1 ) ; "<AssertPlaceHolder>" ; } write ( java . io . OutputStream ) { write ( new java . io . BufferedWriter ( new java . io . OutputStreamWriter ( stream ) ) ) ; } | org . junit . Assert . assertEquals ( expected , write ( manifest ) ) |
allowsRemovalOfParameterAfterParameterLevelChange ( ) { restRequest . getParams ( ) . addProperty ( "Param2" ) ; getRestParameterTable ( ) . setValueAt ( NewRestResourceActionBase . ParamLocation . METHOD , 0 , 3 ) ; java . lang . String paramNameAtRow0 ; restRequest . getParams ( ) . removeProperty ( com . eviware . soapui . impl . rest . panels . request . RestRequestDesktopPanelTest . PARAMETER_NAME ) ; paramNameAtRow0 = ( ( java . lang . String ) ( getRestParameterTable ( ) . getValueAt ( 0 , 0 ) ) ) ; "<AssertPlaceHolder>" ; } getValueAt ( int , int ) { com . eviware . soapui . impl . rest . support . RestParamProperty prop = params . getPropertyAt ( rowIndex ) ; return columnIndex == 0 ? prop . getName ( ) : prop . getValue ( ) ; } | org . junit . Assert . assertThat ( paramNameAtRow0 , org . hamcrest . CoreMatchers . is ( "Param2" ) ) |
testDatumHuwelijkOnVolledigBuitenland ( ) { nl . bzk . brp . model . objecttype . bericht . RelatieBericht huwelijk = new nl . bzk . brp . util . RelatieBuilder ( ) . bouwHuwlijkRelatie ( ) . setDatumAanvang ( 20080400 ) . getRelatie ( ) ; final java . util . List < nl . bzk . brp . model . validatie . Melding > meldingen = bral2102 . executeer ( null , huwelijk , null ) ; "<AssertPlaceHolder>" ; } size ( ) { return elementen . size ( ) ; } | org . junit . Assert . assertEquals ( 0 , meldingen . size ( ) ) |
testSetOutputValue ( ) { com . impetus . ankush . agent . utils . Result fixture = new com . impetus . ankush . agent . utils . Result ( ) ; fixture . setError ( "" ) ; fixture . setOutput ( "" ) ; fixture . setCommand ( "ls" ) ; fixture . setExitVal ( 1 ) ; java . lang . String output = "abcd.xml" ; fixture . setOutput ( output ) ; "<AssertPlaceHolder>" ; } getOutput ( ) { return output ; } | org . junit . Assert . assertEquals ( output , fixture . getOutput ( ) ) |
anyOnAnEmptyCollectionGivesFalse ( ) { java . util . function . Predicate < java . lang . String > stringPredicate = ( w ) -> true ; "<AssertPlaceHolder>" ; } any ( com . khartec . waltz . common . Collection , java . util . function . Predicate ) { return com . khartec . waltz . common . CollectionUtilities . find ( pred , ts ) . isPresent ( ) ; } | org . junit . Assert . assertFalse ( com . khartec . waltz . common . CollectionUtilities . any ( java . util . Collections . emptyList ( ) , stringPredicate ) ) |
testDefaultConfig ( ) { final com . spotify . styx . model . StyxConfig expectedConfig = com . spotify . styx . model . StyxConfig . newBuilder ( ) . globalDockerRunnerId ( "default" ) . globalEnabled ( true ) . debugEnabled ( false ) . executionGatingEnabled ( false ) . build ( ) ; "<AssertPlaceHolder>" ; } config ( ) { final com . google . cloud . datastore . Entity entity = com . spotify . styx . storage . DatastoreStorage . asBuilderOrNew ( com . spotify . styx . storage . DatastoreStorage . getOpt ( datastore , com . spotify . styx . storage . DatastoreStorage . globalConfigKey ( datastore . newKeyFactory ( ) ) ) , com . spotify . styx . storage . DatastoreStorage . globalConfigKey ( datastore . newKeyFactory ( ) ) ) . build ( ) ; return entityToConfig ( entity ) ; } | org . junit . Assert . assertThat ( storage . config ( ) , org . hamcrest . Matchers . is ( expectedConfig ) ) |
testLoadMovie ( ) { storage . storeMovie ( org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . ID , org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . DATA ) ; "<AssertPlaceHolder>" ; } loadMovie ( java . lang . String ) { java . io . File storageFile = fileForMovie ( movieId ) ; return loadJsonValue ( storageFile ) ; } | org . junit . Assert . assertEquals ( org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . DATA , storage . loadMovie ( org . neo4j . cineasts . movieimport . MovieDbLocalStorageTest . ID ) ) |
asyncGet_A$String ( ) { java . util . concurrent . Future < com . m3 . curly . Response > f = com . m3 . curly . HTTP . asyncGet ( "http://localhost:8814/" ) ; "<AssertPlaceHolder>" ; } getStatus ( ) { return status ; } | org . junit . Assert . assertThat ( f . get ( ) . getStatus ( ) , is ( 200 ) ) |
viewProperty_asProperty_delegatesToViewProperty ( ) { com . hp . hpl . jena . rdf . model . Property prop = getViewProperty ( ) . asProperty ( ) ; "<AssertPlaceHolder>" ; } getViewProperty ( ) { return parser . getViewProperty ( definition , factory ) ; } | org . junit . Assert . assertEquals ( this . prop , prop ) |
getsExportedResources ( ) { org . mule . tck . classlaoder . TestClassLoader classLoader = new org . mule . tck . classlaoder . TestClassLoader ( null ) ; java . net . URL resource = new java . net . URL ( "file:/app.txt" ) ; classLoader . addResource ( FilteringArtifactClassLoaderTestCase . RESOURCE_NAME , resource ) ; when ( filter . exportsResource ( FilteringArtifactClassLoaderTestCase . RESOURCE_NAME ) ) . thenReturn ( true ) ; when ( artifactClassLoader . getClassLoader ( ) ) . thenReturn ( classLoader ) ; filteringArtifactClassLoader = doCreateClassLoader ( emptyList ( ) ) ; java . util . Enumeration < java . net . URL > resources = filteringArtifactClassLoader . getResources ( FilteringArtifactClassLoaderTestCase . RESOURCE_NAME ) ; "<AssertPlaceHolder>" ; } equalTo ( java . util . Collection ) { return new org . mule . tck . util . EnumerationMatcher ( items ) ; } | org . junit . Assert . assertThat ( resources , org . mule . tck . util . EnumerationMatcher . equalTo ( java . util . Collections . singletonList ( resource ) ) ) |
validate_shouldPassIfTheConceptHasAtleastOneFullySpecifiedNameAddedToIt ( ) { concept . addName ( new org . openmrs . ConceptName ( "one<sp>name" , org . openmrs . api . context . Context . getLocale ( ) ) ) ; concept . addDescription ( new org . openmrs . ConceptDescription ( "some<sp>description" , null ) ) ; concept . setConceptClass ( new org . openmrs . ConceptClass ( ) ) ; concept . setDatatype ( new org . openmrs . ConceptDatatype ( ) ) ; validator . validate ( concept , errors ) ; "<AssertPlaceHolder>" ; } hasErrors ( ) { return erroneous ; } | org . junit . Assert . assertFalse ( errors . hasErrors ( ) ) |
testDefaultLoadedThrowOnErrorWithNotSetSystemProperty ( ) { java . lang . System . clearProperty ( org . apache . sqoop . Sqoop . SQOOP_RETHROW_PROPERTY ) ; org . apache . sqoop . SqoopOptions out = new org . apache . sqoop . SqoopOptions ( ) ; java . util . Properties props = out . writeProperties ( ) ; org . apache . sqoop . SqoopOptions opts = new org . apache . sqoop . SqoopOptions ( ) ; opts . loadProperties ( props ) ; "<AssertPlaceHolder>" ; } isThrowOnError ( ) { return throwOnError ; } | org . junit . Assert . assertFalse ( opts . isThrowOnError ( ) ) |
testJobWithDFS ( ) { java . lang . String namenode = null ; org . apache . hadoop . hdfs . MiniDFSCluster dfs = null ; org . apache . hadoop . mapred . MiniMRCluster mr = null ; org . apache . hadoop . fs . FileSystem fileSys = null ; try { final int taskTrackers = 4 ; final int jobTrackerPort = 60050 ; org . apache . hadoop . conf . Configuration conf = new org . apache . hadoop . conf . Configuration ( ) ; dfs = new org . apache . hadoop . hdfs . MiniDFSCluster . Builder ( conf ) . build ( ) ; fileSys = dfs . getFileSystem ( ) ; namenode = fileSys . getUri ( ) . toString ( ) ; mr = new org . apache . hadoop . mapred . MiniMRCluster ( taskTrackers , namenode , 2 ) ; org . apache . hadoop . mapred . JobConf jobConf = new org . apache . hadoop . mapred . JobConf ( ) ; boolean result ; result = org . apache . hadoop . mapred . TestSpecialCharactersInOutputPath . launchJob ( fileSys . getUri ( ) , jobConf , 3 , 1 ) ; "<AssertPlaceHolder>" ; } finally { if ( dfs != null ) { dfs . shutdown ( ) ; } if ( mr != null ) { mr . shutdown ( ) ; } } } getUri ( ) { return uri ; } | org . junit . Assert . assertTrue ( result ) |
shouldRebuildTheSessionFactoryWhenTheObservableUpdates ( ) { org . hivedb . hibernate . simplified . session . HiveSessionFactoryImpl factory = ( ( org . hivedb . hibernate . simplified . session . HiveSessionFactoryImpl ) ( builder . getSessionFactory ( ) ) ) ; builder . update ( null , null ) ; org . hivedb . hibernate . simplified . session . HiveSessionFactoryImpl anotherFactory = ( ( org . hivedb . hibernate . simplified . session . HiveSessionFactoryImpl ) ( builder . getSessionFactory ( ) ) ) ; "<AssertPlaceHolder>" ; } getSessionFactory ( ) { return allNodesSessionFactory ; } | org . junit . Assert . assertTrue ( ( factory != anotherFactory ) ) |
eventHandlersAreOnlyInvokedOnceDuringShutdown ( ) { final java . util . concurrent . atomic . AtomicInteger counter = new java . util . concurrent . atomic . AtomicInteger ( ) ; graphDb . registerKernelEventHandler ( new org . neo4j . graphdb . event . KernelEventHandler ( ) { public void beforeShutdown ( ) { counter . incrementAndGet ( ) ; } public java . lang . Object getResource ( ) { return null ; } public void kernelPanic ( org . neo4j . graphdb . event . ErrorState error ) { } public org . neo4j . kernel . impl . core . ExecutionOrder orderComparedTo ( org . neo4j . graphdb . event . KernelEventHandler other ) { return ExecutionOrder . DOESNT_MATTER ; } } ) ; graphDb . shutdown ( ) ; graphDb . shutdown ( ) ; "<AssertPlaceHolder>" ; } get ( ) { return delegate . get ( ) ; } | org . junit . Assert . assertEquals ( 1 , counter . get ( ) ) |
testGetInstanceWhenComponentInParent ( ) { org . xwiki . component . embed . EmbeddableComponentManager ecm = new org . xwiki . component . embed . EmbeddableComponentManager ( ) ; ecm . setParent ( createParentComponentManager ( ) ) ; org . xwiki . component . embed . EmbeddableComponentManagerTest . Role instance = ecm . getInstance ( org . xwiki . component . embed . EmbeddableComponentManagerTest . Role . class ) ; "<AssertPlaceHolder>" ; } getInstance ( java . lang . reflect . Type ) { return getComponentManager ( ) . getInstance ( roleType ) ; } | org . junit . Assert . assertNotNull ( instance ) |
fsUtilsSanityCheck ( ) { org . uberfire . io . IOService ioService = org . uberfire . mocks . FileSystemTestingUtilsTest . fileSystemTestingUtils . getIoService ( ) ; org . uberfire . java . nio . file . Path init = ioService . get ( java . net . URI . create ( "git://amend-repo-test/init.file" ) ) ; java . lang . String expected = "setupFS!" ; ioService . write ( init , expected ) ; "<AssertPlaceHolder>" ; } readAllString ( org . uberfire . java . nio . file . Path ) { return readAllString ( path , org . uberfire . io . impl . AbstractIOService . UTF_8 ) ; } | org . junit . Assert . assertEquals ( expected , ioService . readAllString ( init ) ) |
testGetSortedWithNoValue ( ) { java . lang . String key = "test" ; java . util . List < com . github . pmerienne . trident . cf . state . SortedSetMultiMapState . ScoredValue < com . github . pmerienne . trident . cf . testing . TestValue > > actual = this . state . getSorted ( key , 3 ) ; "<AssertPlaceHolder>" ; } getSorted ( K , int ) { java . util . List < com . github . pmerienne . trident . cf . state . redis . ScoredValue < V > > scoredValues = new java . util . ArrayList < com . github . pmerienne . trident . cf . state . redis . ScoredValue < V > > ( ) ; redis . clients . jedis . Jedis jedis = this . pool . getResource ( ) ; try { java . lang . String stringKey = this . generateKey ( key ) ; java . util . Set < redis . clients . jedis . Tuple > results = jedis . zrevrangeWithScores ( stringKey , 0 , ( count - 1 ) ) ; for ( redis . clients . jedis . Tuple result : results ) { scoredValues . add ( new com . github . pmerienne . trident . cf . state . redis . ScoredValue ( result . getScore ( ) , this . serializer . deserialize ( result . getBinaryElement ( ) ) ) ) ; } } finally { this . pool . returnResource ( jedis ) ; } return scoredValues ; } | org . junit . Assert . assertTrue ( actual . isEmpty ( ) ) |
getGroupSecurityNameWithValidGroup ( ) { java . lang . String group = "TelnetClients" ; java . lang . String uniqueGroupId = "CN=TelnetClients,cn=users,dc=secfvt2,dc=austin,dc=ibm,dc=com" ; com . ibm . websphere . simplicity . log . Log . info ( com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . c , "getGroupSecurityNameWithValidGroup" , "Checking<sp>with<sp>a<sp>valid<sp>group." ) ; "<AssertPlaceHolder>" ; } getGroupSecurityName ( java . lang . String ) { return userRegistry . getGroupSecurityName ( uniqueId ) ; } | org . junit . Assert . assertEquals ( uniqueGroupId , com . ibm . ws . security . wim . adapter . ldap . fat . FATTestADwithSSL . servlet . getGroupSecurityName ( group ) ) |
attributeHttpOnly ( ) { javax . servlet . http . Cookie cookie = new javax . servlet . http . Cookie ( "HttpOnly" , null ) ; "<AssertPlaceHolder>" ; } getName ( ) { return getPoolProperties ( ) . getName ( ) ; } | org . junit . Assert . assertEquals ( "HttpOnly" , cookie . getName ( ) ) |
testEnvironmentEmptyPropertiesFile ( ) { io . fabric8 . maven . docker . access . ContainerCreateConfig cc = new io . fabric8 . maven . docker . access . ContainerCreateConfig ( "testImage" ) ; cc . environment ( null , getEnvMap ( ) , java . util . Collections . < java . lang . String , java . lang . String > emptyMap ( ) ) ; com . google . gson . JsonArray env = getEnvArray ( cc ) ; "<AssertPlaceHolder>" ; } getEnvArray ( io . fabric8 . maven . docker . access . ContainerCreateConfig ) { com . google . gson . JsonObject config = io . fabric8 . maven . docker . util . JsonFactory . newJsonObject ( cc . toJson ( ) ) ; return ( ( com . google . gson . JsonArray ) ( config . get ( "Env" ) ) ) ; } | org . junit . Assert . assertEquals ( 5 , env . size ( ) ) |
testIgnorable ( ) { org . talend . esb . policy . samenabling . SamEnablingPolicy sep = new org . talend . esb . policy . samenabling . SamEnablingPolicy ( generateStubElement ( ) ) ; "<AssertPlaceHolder>" ; } isIgnorable ( ) { return false ; } | org . junit . Assert . assertFalse ( sep . isIgnorable ( ) ) |
testAsErrorWithStringOk ( ) { final java . util . List < com . allanbank . mongodb . bson . Document > docs = java . util . Collections . singletonList ( com . allanbank . mongodb . bson . builder . BuilderFactory . start ( ) . addString ( "ok" , "0" ) . build ( ) ) ; final com . allanbank . mongodb . client . message . Reply reply = new com . allanbank . mongodb . client . message . Reply ( 0 , 0 , 0 , docs , false , false , false , true ) ; final com . allanbank . mongodb . Callback < com . allanbank . mongodb . bson . Document > mockCallback = createMock ( com . allanbank . mongodb . Callback . class ) ; replay ( mockCallback ) ; final com . allanbank . mongodb . client . callback . ReplyCommandCallback callback = new com . allanbank . mongodb . client . callback . ReplyCommandCallback ( mockCallback ) ; final com . allanbank . mongodb . error . ReplyException error = ( ( com . allanbank . mongodb . error . ReplyException ) ( callback . asError ( reply , true ) ) ) ; "<AssertPlaceHolder>" ; verify ( mockCallback ) ; } asError ( com . allanbank . mongodb . client . message . Reply , boolean ) { final java . util . List < com . allanbank . mongodb . bson . Document > results = reply . getResults ( ) ; if ( ( results . size ( ) ) == 1 ) { final com . allanbank . mongodb . bson . Document doc = results . get ( 0 ) ; final com . allanbank . mongodb . bson . Element okElem = doc . get ( "ok" ) ; final com . allanbank . mongodb . bson . Element errorNumberElem = doc . get ( "code" ) ; com . allanbank . mongodb . bson . Element errorMessageElem = null ; for ( int i = 0 ; ( errorMessageElem == null ) && ( i < ( com . allanbank . mongodb . client . callback . ERROR_MESSAGE_FIELDS . size ( ) ) ) ; ++ i ) { errorMessageElem = doc . get ( com . allanbank . mongodb . client . callback . ERROR_MESSAGE_FIELDS . get ( i ) ) ; } if ( ( okElem == null ) && knownError ) { return asError ( reply , ( - 1 ) , toInt ( errorNumberElem ) , asString ( errorMessageElem ) ) ; } } return null ; } | org . junit . Assert . assertNull ( error ) |
shortFileNameForNoSeparator ( ) { org . slim3 . controller . upload . FileItem fileItem = new org . slim3 . controller . upload . FileItem ( "bbb.txt" , "text/plain" , new byte [ 0 ] ) ; "<AssertPlaceHolder>" ; } getShortFileName ( ) { return shortFileName ; } | org . junit . Assert . assertThat ( fileItem . getShortFileName ( ) , org . hamcrest . CoreMatchers . is ( "bbb.txt" ) ) |
evaluatesListSubscript ( ) { org . teavm . flavour . expr . test . IntComputation c = parseExpr ( org . teavm . flavour . expr . test . IntComputation . class , "integerList[0]" ) ; vars . integerList ( java . util . Arrays . asList ( 23 ) ) ; "<AssertPlaceHolder>" ; } parseExpr ( java . lang . Class , java . lang . String ) { org . teavm . flavour . expr . EvaluatorBuilder builder = new org . teavm . flavour . expr . InterpretingEvaluatorBuilder ( ) . importPackage ( "java.lang" ) . importPackage ( "java.util" ) . importClass ( org . teavm . flavour . expr . test . EvaluatorTest . class . getName ( ) ) . importClass ( java . util . stream . Collectors . class . getName ( ) ) ; org . teavm . flavour . expr . Evaluator < T , org . teavm . flavour . expr . test . TestVars > e ; try { e = builder . build ( cls , org . teavm . flavour . expr . test . TestVars . class , str ) ; } catch ( org . teavm . flavour . expr . InvalidExpressionException ex ) { java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; sb . append ( "Errors<sp>occurred<sp>compiling<sp>expression:\n" ) ; sb . append ( str ) . append ( "\n" ) ; java . util . List < org . teavm . flavour . expr . Diagnostic > diagnostics = ex . getDiagnostics ( ) . stream ( ) . sorted ( java . util . Comparator . comparingInt ( ( d ) -> d . getStart ( ) ) ) . collect ( java . util . stream . Collectors . toList ( ) ) ; for ( org . teavm . flavour . expr . Diagnostic diagnostic : diagnostics ) { for ( int i = 0 ; i < ( diagnostic . getStart ( ) ) ; ++ i ) { sb . append ( '<sp>' ) ; } sb . append ( "^\n" ) ; sb . append ( diagnostic . getMessage ( ) ) . append ( "\n\n" ) ; } throw new java . lang . AssertionError ( sb . toString ( ) ) ; } vars = e . getVariables ( ) ; return e . getFunction ( ) ; } | org . junit . Assert . assertThat ( c . compute ( ) , org . hamcrest . Matchers . is ( 23 ) ) |
inexistentFieldShouldThrow ( ) { java . util . Collection < java . lang . Object > collectionOfC = info . michaelkohler . helpertools . collections . CollectionHelper . all ( myClassCollection , "c" ) ; "<AssertPlaceHolder>" ; } all ( java . util . Collection , java . lang . String ) { checkNotNull ( collection , "collection<sp>cannot<sp>be<sp>null" ) ; checkArgument ( ( ! ( info . michaelkohler . helpertools . string . StringHelper . isNullOrEmpty ( property ) ) ) , "property<sp>cannot<sp>be<sp>null<sp>or<sp>empty" ) ; java . util . Collection < java . lang . Object > properties = new java . util . ArrayList < java . lang . Object > ( ) ; for ( T element : collection ) { java . lang . Class < ? extends java . lang . Object > elementClass = element . getClass ( ) ; java . lang . reflect . Field field = elementClass . getDeclaredField ( property ) ; if ( ! ( field . isAccessible ( ) ) ) { field . setAccessible ( true ) ; } try { properties . add ( field . get ( element ) ) ; } catch ( java . lang . IllegalArgumentException e ) { e . printStackTrace ( ) ; } catch ( java . lang . IllegalAccessException e ) { e . printStackTrace ( ) ; } } return properties ; } | org . junit . Assert . assertEquals ( collectionOfC , null ) |
test_hugedata_select0 ( ) { int size = 1000000 ; org . trie4j . bv . SuccinctBitVector bv = create ( size ) ; for ( int i = 0 ; i < size ; i ++ ) { bv . append0 ( ) ; } for ( int i = 1 ; i <= 100000 ; i ++ ) { "<AssertPlaceHolder>" ; } } select0 ( int ) { if ( count > ( size0 ) ) return - 1 ; if ( count <= 3 ) { if ( count == 1 ) return node1pos ; else if ( count == 2 ) return node2pos ; else if ( count == 3 ) return node3pos ; else return - 1 ; } int idx = count / ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . BITS0_COUNT_IN_EACH_INDEX ) ; int start = 0 ; int end = 0 ; if ( idx < ( indexCache0 . size ( ) ) ) { start = indexCache0 . get ( idx ) ; if ( ( count % ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ) ) == 0 ) return start ; start /= org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ; if ( ( idx + 1 ) < ( indexCache0 . size ( ) ) ) { end = ( ( indexCache0 . get ( ( idx + 1 ) ) ) / ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ) ) + 1 ; } else { end = org . trie4j . bv . UnsafeBytesSuccinctBitVector . countCache0Size ( size ) ; } } else if ( idx > 0 ) { start = ( indexCache0 . get ( ( idx - 1 ) ) ) / ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ) ; end = java . lang . Math . min ( ( start + ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ) ) , org . trie4j . bv . UnsafeBytesSuccinctBitVector . countCache0Size ( size ) ) ; } long m = ( ( - 1 ) * ( sun . misc . Unsafe . ARRAY_INT_INDEX_SCALE ) ) + ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ; int d = 0 ; long startOffset = ( start * ( sun . misc . Unsafe . ARRAY_INT_INDEX_SCALE ) ) + ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ; long endOffset = ( end * ( sun . misc . Unsafe . ARRAY_INT_INDEX_SCALE ) ) + ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ; if ( startOffset != endOffset ) { do { m = ( ( startOffset + endOffset ) / 2 ) & - 4L ; d = count - ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . unsafe . getInt ( countCache0 , m ) ) ; if ( d < 0 ) { endOffset = m ; continue ; } else if ( d > 0 ) { if ( startOffset != m ) startOffset = m ; else break ; } else { break ; } } while ( ( endOffset - startOffset ) >= 4 ) ; if ( d > 0 ) { count = d ; } else { while ( ( m >= ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ) && ( count <= ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . unsafe . getInt ( countCache0 , m ) ) ) ) { m -= sun . misc . Unsafe . ARRAY_INT_INDEX_SCALE ; } if ( m >= ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ) count -= org . trie4j . bv . UnsafeBytesSuccinctBitVector . unsafe . getInt ( countCache0 , m ) ; } } int n = bytes . length ; for ( int i = ( ( ( ( ( int ) ( m - ( sun . misc . Unsafe . ARRAY_INT_BASE_OFFSET ) ) ) / ( sun . misc . Unsafe . ARRAY_INT_INDEX_SCALE ) ) + 1 ) * ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . CACHE_WIDTH ) ) / 8 ; i < n ; i ++ ) { int bits = ( bytes [ i ] ) & 255 ; int c = org . trie4j . bv . UnsafeBytesSuccinctBitVector . BITCOUNTS0 [ bits ] ; if ( count <= c ) { return ( i * 8 ) + ( org . trie4j . bv . UnsafeBytesSuccinctBitVector . BITPOS0 [ bits ] [ ( count - 1 ) ] ) ; } count -= c ; } return - 1 ; } | org . junit . Assert . assertEquals ( ( i - 1 ) , bv . select0 ( i ) ) |
shouldReturnBadRequestIfReleaseCreationFailed ( ) { ch . mobi . itc . mobiliar . rest . resources . ResourceReleaseCopyDTO resourceReleaseCopyDTO = new ch . mobi . itc . mobiliar . rest . resources . ResourceReleaseCopyDTO ( ) ; resourceReleaseCopyDTO . setReleaseName ( "NewRelease" ) ; resourceReleaseCopyDTO . setSourceReleaseName ( "TestRelease" ) ; java . lang . String resourceGroupName = "TetApp" ; ch . puzzle . itc . mobiliar . business . resourcegroup . control . CopyResourceResult copyResourceResult = new ch . puzzle . itc . mobiliar . business . resourcegroup . control . CopyResourceResult ( resourceGroupName ) ; copyResourceResult . getExceptions ( ) . add ( "bogus" ) ; org . mockito . Mockito . when ( copyResourceMock . doCreateResourceRelease ( resourceGroupName , resourceReleaseCopyDTO . getReleaseName ( ) , resourceReleaseCopyDTO . getSourceReleaseName ( ) , ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner . getSystemOwner ( ) ) ) . thenReturn ( copyResourceResult ) ; javax . ws . rs . core . Response response = rest . addNewResourceRelease ( resourceReleaseCopyDTO , resourceGroupName ) ; "<AssertPlaceHolder>" ; } addNewResourceRelease ( ch . mobi . itc . mobiliar . rest . resources . ResourceReleaseCopyDTO , java . lang . String ) { ch . puzzle . itc . mobiliar . business . resourcegroup . control . CopyResourceResult copyResourceResult ; if ( org . apache . commons . lang . StringUtils . isEmpty ( request . getReleaseName ( ) ) ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . resources . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "Release<sp>name<sp>must<sp>not<sp>be<sp>empty" ) ) . build ( ) ; } if ( org . apache . commons . lang . StringUtils . isEmpty ( request . getSourceReleaseName ( ) ) ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . resources . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "Source<sp>release<sp>name<sp>must<sp>not<sp>be<sp>empty" ) ) . build ( ) ; } try { copyResourceResult = copyResource . doCreateResourceRelease ( resourceGroupName , request . getReleaseName ( ) , request . getSourceReleaseName ( ) , ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwner . getSystemOwner ( ) ) ; } catch ( ch . puzzle . itc . mobiliar . business . foreignable . entity . ForeignableOwnerViolationException | ch . puzzle . itc . mobiliar . common . exception . AMWException e ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . resources . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( e . getMessage ( ) ) ) . build ( ) ; } if ( ! ( copyResourceResult . isSuccess ( ) ) ) { return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . resources . BAD_REQUEST ) . entity ( new ch . mobi . itc . mobiliar . rest . exceptions . ExceptionDto ( "Release<sp>creation<sp>failed" ) ) . build ( ) ; } return javax . ws . rs . core . Response . status ( ch . mobi . itc . mobiliar . rest . resources . CREATED ) . header ( "Location" , ( ( ( "/resources/" + ( copyResourceResult . getTargetResourceName ( ) ) ) + "/" ) + ( request . getReleaseName ( ) ) ) ) . build ( ) ; } | org . junit . Assert . assertEquals ( javax . ws . rs . core . Response . Status . BAD_REQUEST . getStatusCode ( ) , response . getStatus ( ) ) |
shouldSupportRemovingAPath ( ) { model . addPath ( "/a/b/c" ) ; model . addPath ( "/d/e/f" ) ; model . addPath ( "/g/h/i" ) ; model . removePath ( "/d/e/f" ) ; "<AssertPlaceHolder>" ; } getPaths ( ) { return new java . util . ArrayList ( paths ) ; } | org . junit . Assert . assertThat ( model . getPaths ( ) , org . hamcrest . Matchers . is ( asList ( "/a/b/c" , "/g/h/i" ) ) ) |
testBlockingAllToAllTopologyWithCoLocation ( ) { final org . apache . flink . runtime . jobgraph . JobVertex source = new org . apache . flink . runtime . jobgraph . JobVertex ( "source" ) ; source . setInvokableClass ( org . apache . flink . runtime . testtasks . NoOpInvokable . class ) ; source . setParallelism ( 10 ) ; final org . apache . flink . runtime . jobgraph . JobVertex target = new org . apache . flink . runtime . jobgraph . JobVertex ( "target" ) ; target . setInvokableClass ( org . apache . flink . runtime . testtasks . NoOpInvokable . class ) ; target . setParallelism ( 13 ) ; target . connectNewDataSetAsInput ( source , DistributionPattern . ALL_TO_ALL , ResultPartitionType . BLOCKING ) ; final org . apache . flink . runtime . jobmanager . scheduler . SlotSharingGroup sharingGroup = new org . apache . flink . runtime . jobmanager . scheduler . SlotSharingGroup ( ) ; source . setSlotSharingGroup ( sharingGroup ) ; target . setSlotSharingGroup ( sharingGroup ) ; source . setStrictlyCoLocatedWith ( target ) ; final org . apache . flink . runtime . jobgraph . JobGraph jobGraph = new org . apache . flink . runtime . jobgraph . JobGraph ( "test<sp>job" , source , target ) ; final org . apache . flink . runtime . executiongraph . ExecutionGraph eg = createExecutionGraph ( jobGraph ) ; org . apache . flink . runtime . executiongraph . failover . RestartPipelinedRegionStrategy failoverStrategy = ( ( org . apache . flink . runtime . executiongraph . failover . RestartPipelinedRegionStrategy ) ( eg . getFailoverStrategy ( ) ) ) ; org . apache . flink . runtime . executiongraph . failover . FailoverRegion region1 = failoverStrategy . getFailoverRegion ( eg . getJobVertex ( source . getID ( ) ) . getTaskVertices ( ) [ 0 ] ) ; org . apache . flink . runtime . executiongraph . failover . FailoverRegion region2 = failoverStrategy . getFailoverRegion ( eg . getJobVertex ( target . getID ( ) ) . getTaskVertices ( ) [ 0 ] ) ; "<AssertPlaceHolder>" ; } getTaskVertices ( ) { return taskVertices ; } | org . junit . Assert . assertTrue ( ( region1 == region2 ) ) |
checkAdminWithDiffTenantAccessToTenant ( ) { final org . sentilo . web . catalog . domain . Tenant resource = new org . sentilo . web . catalog . domain . Tenant ( "1" ) ; when ( userDetails . isAdminUser ( ) ) . thenReturn ( true ) ; when ( service . findAndThrowErrorIfNotExist ( any ( org . sentilo . web . catalog . domain . CatalogDocument . class ) ) ) . thenReturn ( resource ) ; final boolean allowedCRUDL = ( ( ( ( checkAccess ( resource , ActionType . LIST ) ) | ( checkAccess ( resource , ActionType . CREATE ) ) ) | ( checkAccess ( resource , ActionType . DELETE ) ) ) | ( checkAccess ( resource , ActionType . READ ) ) ) | ( checkAccess ( resource , ActionType . SAVE ) ) ; "<AssertPlaceHolder>" ; } checkAccess ( org . sentilo . web . catalog . domain . CatalogDocument , org . sentilo . web . catalog . security . enums . ActionType ) { boolean allowed = true ; try { accessControlService . checkAccess ( new org . sentilo . web . catalog . security . access . AccessControlContext ( resource , action , service ) ) ; } catch ( final org . sentilo . web . catalog . exception . NotAllowedActionException naae ) { allowed = false ; } return allowed ; } | org . junit . Assert . assertFalse ( allowedCRUDL ) |
shouldNotEnrichUnknownContainers ( ) { org . arquillian . cube . impl . client . enricher . HostPortTestEnricher hostPortTestEnricher = new org . arquillian . cube . impl . client . enricher . HostPortTestEnricher ( ) ; hostPortTestEnricher . cubeRegistryInstance = new org . jboss . arquillian . core . api . Instance < org . arquillian . cube . spi . CubeRegistry > ( ) { @ org . arquillian . cube . impl . client . enricher . Override public org . arquillian . cube . spi . CubeRegistry get ( ) { final org . arquillian . cube . spi . CubeRegistry cubeRegistry = org . mockito . Mockito . mock ( org . arquillian . cube . spi . CubeRegistry . class ) ; org . mockito . Mockito . when ( cubeRegistry . getCube ( "test2" ) ) . thenAnswer ( new org . mockito . stubbing . Answer < java . lang . Object > ( ) { @ org . arquillian . cube . impl . client . enricher . Override public java . lang . Object answer ( org . mockito . invocation . InvocationOnMock invocationOnMock ) throws java . lang . Throwable { final org . arquillian . cube . spi . metadata . HasPortBindings hasPortBindings = org . mockito . Mockito . mock ( org . arquillian . cube . spi . metadata . HasPortBindings . class ) ; org . mockito . Mockito . when ( hasPortBindings . getMappedAddress ( 99 ) ) . thenReturn ( new org . arquillian . cube . spi . metadata . HasPortBindings . PortAddressImpl ( "192.168.99.100" , 9999 ) ) ; final org . arquillian . cube . spi . Cube < ? > cube = org . mockito . Mockito . mock ( org . arquillian . cube . spi . Cube . class ) ; org . mockito . Mockito . when ( cube . getMetadata ( org . arquillian . cube . spi . metadata . HasPortBindings . class ) ) . thenReturn ( hasPortBindings ) ; return cube ; } } ) ; return cubeRegistry ; } } ; final org . arquillian . cube . impl . client . enricher . HostPortTestEnricherTest . MyTest testCase = new org . arquillian . cube . impl . client . enricher . HostPortTestEnricherTest . MyTest ( ) ; hostPortTestEnricher . enrich ( testCase ) ; "<AssertPlaceHolder>" ; } enrich ( java . lang . Object ) { for ( java . lang . reflect . Field field : org . arquillian . cube . impl . util . ReflectionUtil . getFieldsWithAnnotation ( testCase . getClass ( ) , org . arquillian . cube . openshift . impl . enricher . RouteURL . class ) ) { java . lang . Object url ; org . arquillian . cube . openshift . impl . enricher . AwaitRoute await ; try { if ( ! ( field . isAccessible ( ) ) ) { field . setAccessible ( true ) ; } org . arquillian . cube . openshift . impl . enricher . RouteURL routeURL = getAnnotation ( org . arquillian . cube . openshift . impl . enricher . RouteURL . class , field . getAnnotations ( ) ) ; url = lookup ( routeURL , field . getType ( ) ) ; field . set ( testCase , url ) ; await = getAnnotation ( org . arquillian . cube . openshift . impl . enricher . AwaitRoute . class , field . getAnnotations ( ) ) ; } catch ( java . lang . Exception e ) { throw new java . lang . RuntimeException ( ( "Could<sp>not<sp>set<sp>RouteURL<sp>value<sp>on<sp>field<sp>" + field ) , e ) ; } configureAwaitRoute ( url , await ) ; } } | org . junit . Assert . assertThat ( testCase . port , org . hamcrest . CoreMatchers . is ( 0 ) ) |
testGetRootDirMultipleWithComposite ( ) { hudson . plugins . clearcase . ucm . model . Component [ ] components = new hudson . plugins . clearcase . ucm . model . Component [ 2 ] ; components [ 0 ] = hudson . plugins . clearcase . ucm . model . UcmSelector . parse ( "component:name1@\\pvob" , hudson . plugins . clearcase . ucm . model . Component . class ) ; components [ 1 ] = hudson . plugins . clearcase . ucm . model . UcmSelector . parse ( "component:composite@\\pvob" , hudson . plugins . clearcase . ucm . model . Component . class ) ; when ( ct . describe ( eq ( "%[root_dir]Xp" ) , anyString ( ) , eq ( "component:name1@\\pvob" ) ) ) . thenReturn ( new java . io . StringReader ( "\\vob1\\cmp1" ) ) ; when ( ct . describe ( eq ( "%[root_dir]Xp" ) , anyString ( ) , eq ( "component:composite@\\pvob" ) ) ) . thenReturn ( new java . io . StringReader ( "" ) ) ; java . lang . String [ ] rootDirs = instance . getRootDir ( components ) ; "<AssertPlaceHolder>" ; } getRootDir ( hudson . plugins . clearcase . ucm . model . Component [ ] ) { java . util . List < java . lang . String > rootDirs = new java . util . ArrayList < java . lang . String > ( ) ; for ( int i = 0 ; i < ( components . length ) ; i ++ ) { java . lang . String rootDir = getRootDir ( components [ i ] ) ; if ( org . apache . commons . lang . StringUtils . isNotEmpty ( rootDir ) ) { rootDirs . add ( rootDir ) ; } } return rootDirs . toArray ( new java . lang . String [ rootDirs . size ( ) ] ) ; } | org . junit . Assert . assertArrayEquals ( new java . lang . String [ ] { "\\vob1\\cmp1" } , rootDirs ) |
testFormatNull ( ) { org . openl . rules . table . formatters . ArrayFormatter arrayFormat = new org . openl . rules . table . formatters . ArrayFormatter ( new org . openl . util . formatters . EnumFormatter ( org . openl . rules . table . xls . XlsArrayFormatTest . TestConstants . class ) ) ; org . openl . rules . table . xls . XlsArrayFormatTest . TestConstants [ ] arrayEnum = new org . openl . rules . table . xls . XlsArrayFormatTest . TestConstants [ 2 ] ; arrayEnum [ 0 ] = org . openl . rules . table . xls . XlsArrayFormatTest . TestConstants . TEST_CONST_1 ; arrayEnum [ 1 ] = org . openl . rules . table . xls . XlsArrayFormatTest . TestConstants . TEST_CONST_2 ; java . lang . String result = arrayFormat . format ( null ) ; "<AssertPlaceHolder>" ; } format ( double ) { return org . openl . rules . helpers . RulesUtils . format ( d , org . openl . rules . helpers . RulesUtils . DEFAULT_DOUBLE_FORMAT ) ; } | org . junit . Assert . assertNull ( result ) |
testTruncDecimalValue1 ( ) { java . lang . String sqlText = "values<sp>truncate(12345.6789,<sp>1)" ; java . sql . ResultSet rs = com . splicemachine . derby . impl . sql . execute . operations . TruncateFunctionIT . spliceClassWatcher . executeQuery ( sqlText ) ; java . lang . String expected = "1<sp>|\n" + ( "------------\n" + "12345.6000<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 ) ) |
testGetOwnedProperty1 ( ) { java . util . List < org . dresdenocl . pivotmodel . Property > properties ; boolean foundProperty1 ; boolean foundProperty2 ; java . lang . String msg ; msg = "The<sp>adaptation<sp>of<sp>UML2DataType.getOwnedProperty()<sp>seems<sp>to<sp>be<sp>wrong." ; properties = org . dresdenocl . metamodels . uml2 . test . tests . TestUmlDataType . dataType . getOwnedProperty ( ) ; foundProperty1 = false ; foundProperty2 = false ; "<AssertPlaceHolder>" ; } getOwnedProperty ( ) { return getOwnedPropertyGen ( ) ; } | org . junit . Assert . assertFalse ( msg , foundProperty2 ) |
testCreateMessage ( ) { io . cdap . cdap . proto . id . DatasetId datasetId = new io . cdap . cdap . proto . id . NamespaceId ( "ns1" ) . dataset ( "ds1" ) ; io . cdap . cdap . api . metadata . MetadataEntity metadataEntity = datasetId . toMetadataEntity ( ) ; io . cdap . cdap . proto . codec . AuditMessage v1AuditMessage = new io . cdap . cdap . proto . codec . AuditMessage ( 1000L , datasetId , "user1" , io . cdap . cdap . proto . audit . AuditType . CREATE , io . cdap . cdap . proto . audit . AuditPayload . EMPTY_PAYLOAD ) ; io . cdap . cdap . proto . audit . AuditMessage expectedV2AuditMessage = new io . cdap . cdap . proto . audit . AuditMessage ( 1000L , metadataEntity , "user1" , io . cdap . cdap . proto . audit . AuditType . CREATE , io . cdap . cdap . proto . audit . AuditPayload . EMPTY_PAYLOAD ) ; io . cdap . cdap . proto . audit . AuditMessage actualV2AuditMessage = io . cdap . cdap . proto . codec . AuditMessageTypeAdapterTest . GSON . fromJson ( io . cdap . cdap . proto . codec . AuditMessageTypeAdapterTest . GSON . toJson ( v1AuditMessage ) , io . cdap . cdap . proto . audit . AuditMessage . class ) ; "<AssertPlaceHolder>" ; } toJson ( io . cdap . cdap . api . app . ApplicationSpecification ) { java . lang . StringBuilder builder = new java . lang . StringBuilder ( ) ; toJson ( appSpec , builder ) ; return builder . toString ( ) ; } | org . junit . Assert . assertEquals ( expectedV2AuditMessage , actualV2AuditMessage ) |
shouldBeImportAwareForImportAwareProcessor ( ) { final ro . isdc . wro . model . resource . processor . decorator . ProcessorDecorator decorator = new ro . isdc . wro . model . resource . processor . decorator . ProcessorDecorator ( new ro . isdc . wro . model . resource . processor . decorator . TestProcessorDecorator . ImportAwareProcessor ( ) ) ; "<AssertPlaceHolder>" ; } isImportAware ( ) { return true ; } | org . junit . Assert . assertTrue ( decorator . isImportAware ( ) ) |
int_stream_to_array ( ) { int [ ] intArray = java . util . stream . IntStream . of ( 1 , 2 , 3 ) . toArray ( ) ; com . levelup . java . util . stream . ConvertStreamToArray . logger . info ( java . util . Arrays . toString ( intArray ) ) ; "<AssertPlaceHolder>" ; } | org . junit . Assert . assertTrue ( ( ( intArray . length ) == 3 ) ) |
hasLatitude ( ) { "<AssertPlaceHolder>" ; } hasLatitude ( ) { return net . sf . marineapi . ais . util . Latitude27 . isAvailable ( fLatitude ) ; } | org . junit . Assert . assertEquals ( true , msg . hasLatitude ( ) ) |
testEmptyStringAsPathParameter ( ) { router . addRoute ( ro . pippo . core . route . Route . GET ( "/" , ro . pippo . core . route . DefaultRouterTest . emptyHandler ) ) ; router . addRoute ( ro . pippo . core . route . Route . GET ( "/{id}" , ro . pippo . core . route . DefaultRouterTest . emptyHandler ) ) ; java . util . List < ro . pippo . core . route . RouteMatch > matches = router . findRoutes ( HttpConstants . Method . GET , "/" ) ; "<AssertPlaceHolder>" ; } size ( ) { return list . size ( ) ; } | org . junit . Assert . assertEquals ( 1 , matches . size ( ) ) |
testCleanSecretkeyFromJsonObjectInMiddle ( ) { final java . lang . String input = "{\"foo\":\"bar\",\"secretkey\":\"test\",\"test\":\"blah\"}" ; final java . lang . String expected = "{\"foo\":\"bar\",\"test\":\"blah\"}" ; final java . lang . String result = com . cloud . utils . StringUtils . cleanString ( input ) ; "<AssertPlaceHolder>" ; } cleanString ( java . lang . String ) { java . lang . String cleanResult = "" ; if ( stringToClean != null ) { cleanResult = com . cloud . utils . StringUtils . REGEX_PASSWORD_QUERYSTRING . matcher ( stringToClean ) . replaceAll ( "" ) ; cleanResult = com . cloud . utils . StringUtils . REGEX_PASSWORD_JSON . matcher ( cleanResult ) . replaceAll ( "" ) ; final java . util . regex . Matcher detailsMatcher = com . cloud . utils . StringUtils . REGEX_PASSWORD_DETAILS . matcher ( cleanResult ) ; while ( detailsMatcher . find ( ) ) { final java . util . regex . Matcher detailsIndexMatcher = com . cloud . utils . StringUtils . REGEX_PASSWORD_DETAILS_INDEX . matcher ( detailsMatcher . group ( ) ) ; if ( detailsIndexMatcher . find ( ) ) { cleanResult = com . cloud . utils . StringUtils . cleanDetails ( cleanResult , detailsIndexMatcher . group ( ) ) ; } } } return cleanResult ; } | org . junit . Assert . assertEquals ( result , expected ) |
shouldValidateWhenEdge ( ) { final uk . gov . gchq . gaffer . data . element . Element element = new uk . gov . gchq . gaffer . data . element . Edge . Builder ( ) . group ( TestGroups . EDGE ) . build ( ) ; final boolean valid = new uk . gov . gchq . gaffer . data . IsEdgeValidator ( ) . validate ( element ) ; "<AssertPlaceHolder>" ; } validate ( uk . gov . gchq . gaffer . data . element . Edge ) { return ( ( ( ( null != edge ) && ( validateFlags ( edge ) ) ) && ( validatePreAggregationFilter ( edge ) ) ) && ( validatePostAggregationFilter ( edge ) ) ) && ( validatePostTransformFilter ( edge ) ) ; } | org . junit . Assert . assertTrue ( valid ) |
setSubscriptionOwner_resetOwner ( ) { org . oscm . domobjects . PlatformUser user = givenSubscriptionOwner ( ) ; org . oscm . domobjects . Subscription subscriptionToModify = givenSubscription ( user ) ; doReturn ( user ) . when ( idManager ) . getPlatformUser ( user . getUserId ( ) , true ) ; bean . modUpgBean . setSubscriptionOwner ( subscriptionToModify , null , true ) ; "<AssertPlaceHolder>" ; } getOwner ( ) { return owner ; } | org . junit . Assert . assertNull ( subscriptionToModify . getOwner ( ) ) |
getAutoCommitShouldReturnTrue ( ) { openConnection . setAutoCommit ( false ) ; openConnection . setAutoCommit ( true ) ; "<AssertPlaceHolder>" ; } getAutoCommit ( ) { this . checkClosed ( ) ; return autoCommit ; } | org . junit . Assert . assertTrue ( openConnection . getAutoCommit ( ) ) |
testUnionAdjentIntersection3 ( ) { java . lang . String query = "Compute[@fqdns=\"slc4-0003.ebay.com\"]{*}." + ( ( "(<sp><VPool>parentCluster[@_oid=\"CLguf6sdle-invalid\"]<sp>" + "||<sp>activeManifestRef[@_oid=\"B-N-D-1.20111108154904.0\"]<sp>" ) + "&&<sp>activeManifestCur[@_oid=\"Black-Pearl-1.20111103221326.0\"])" ) ; com . ebay . cloud . cms . query . service . IQueryResult result = queryService . query ( query , stratusContext ) ; "<AssertPlaceHolder>" ; } getEntities ( ) { return entities ; } | org . junit . Assert . assertEquals ( 1 , result . getEntities ( ) . size ( ) ) |
testUndefinedAsBigInteger ( ) { org . jboss . dmr . ModelNode testee = org . jboss . dmr . test . ModelNodeTest . testUndefinedConversion ( ModelNode :: asBigInteger ) ; "<AssertPlaceHolder>" ; } asBigIntegerOrNull ( ) { return isDefined ( ) ? value . asBigInteger ( ) : null ; } | org . junit . Assert . assertNull ( testee . asBigIntegerOrNull ( ) ) |
testSetDefault ( ) { final org . kie . workbench . common . services . shared . kmodule . KBaseModel kBaseModel = new org . kie . workbench . common . services . shared . kmodule . KBaseModel ( ) ; kBaseModel . setDefault ( false ) ; final org . kie . workbench . common . screens . library . client . settings . sections . knowledgebases . KnowledgeBasesPresenter parentPresenter = mock ( org . kie . workbench . common . screens . library . client . settings . sections . knowledgebases . KnowledgeBasesPresenter . class ) ; knowledgeBaseItemPresenter . kBaseModel = kBaseModel ; knowledgeBaseItemPresenter . parentPresenter = parentPresenter ; knowledgeBaseItemPresenter . setDefault ( true ) ; "<AssertPlaceHolder>" ; verify ( defaultKnowledgeBaseChangeEvent ) . fire ( any ( ) ) ; verify ( parentPresenter ) . fireChangeEvent ( ) ; } isDefault ( ) { return true ; } | org . junit . Assert . assertTrue ( kBaseModel . isDefault ( ) ) |
get_println_output ( ) { java . io . ByteArrayOutputStream berr = new java . io . ByteArrayOutputStream ( ) ; java . io . ByteArrayOutputStream bout = new java . io . ByteArrayOutputStream ( ) ; final java . lang . StringBuilder S = new java . lang . StringBuilder ( ) ; final bsh . ConsoleInterface C = getConsole ( S , bout , berr ) ; bsh . Interpreter bsh = new bsh . Interpreter ( C ) ; bsh . setExitOnEOF ( false ) ; bsh . println ( "bar" ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( super . toString ( ) ) + ":<sp>" ) + ( tokenImage [ kind ] ) ; } | org . junit . Assert . assertEquals ( "bar" , bout . toString ( ) . trim ( ) ) |
testContainsRunContainer_IncludeProperSubsetDifferentStart ( ) { org . roaringbitmap . Container bc = new org . roaringbitmap . BitmapContainer ( ) . add ( 0 , 10 ) ; org . roaringbitmap . Container subset = new org . roaringbitmap . RunContainer ( ) . add ( 2 , 9 ) ; "<AssertPlaceHolder>" ; } contains ( int ) { throw new java . lang . UnsupportedOperationException ( "Not<sp>implemented<sp>in<sp>ImmutableConciseSet" ) ; } | org . junit . Assert . assertTrue ( bc . contains ( subset ) ) |
testGetSetSubGridDivKO ( ) { shape . setSubGridDiv ( 11 ) ; shape . setSubGridDiv ( ( - 1 ) ) ; "<AssertPlaceHolder>" ; } getSubGridDiv ( ) { return firstIGrid ( ) . map ( ( sh ) -> sh . getSubGridDiv ( ) ) . orElse ( 0 ) ; } | org . junit . Assert . assertEquals ( 11 , shape . getSubGridDiv ( ) ) |
testProcessorPredicateFalse ( ) { org . hawkular . apm . api . model . config . CollectorConfiguration cc = new org . hawkular . apm . api . model . config . CollectorConfiguration ( ) ; org . hawkular . apm . api . model . config . txn . TransactionConfig btc = new org . hawkular . apm . api . model . config . txn . TransactionConfig ( ) ; cc . getTransactions ( ) . put ( "testapp" , btc ) ; org . hawkular . apm . api . model . config . txn . Processor p1 = new org . hawkular . apm . api . model . config . txn . Processor ( ) ; btc . getProcessors ( ) . add ( p1 ) ; p1 . setNodeType ( NodeType . Component ) ; p1 . setDirection ( Direction . In ) ; org . hawkular . apm . api . model . config . txn . LiteralExpression literal = new org . hawkular . apm . api . model . config . txn . LiteralExpression ( ) ; literal . setValue ( "false" ) ; p1 . setPredicate ( literal ) ; org . hawkular . apm . api . model . config . txn . SetPropertyAction pa1 = new org . hawkular . apm . api . model . config . txn . SetPropertyAction ( ) ; p1 . getActions ( ) . add ( pa1 ) ; pa1 . setName ( "test" ) ; org . hawkular . apm . api . model . config . txn . TextExpression expr = new org . hawkular . apm . api . model . config . txn . TextExpression ( ) ; expr . setSource ( DataSource . Content ) ; expr . setKey ( "1" ) ; pa1 . setExpression ( expr ) ; org . hawkular . apm . client . collector . internal . ProcessorManager pm = new org . hawkular . apm . client . collector . internal . ProcessorManager ( cc ) ; org . hawkular . apm . api . model . trace . Trace trace = new org . hawkular . apm . api . model . trace . Trace ( ) ; org . hawkular . apm . api . model . trace . Component service = new org . hawkular . apm . api . model . trace . Component ( ) ; trace . getNodes ( ) . add ( service ) ; trace . setTransaction ( "testapp" ) ; pm . process ( trace , service , Direction . In , null , "first" , "second" ) ; "<AssertPlaceHolder>" ; } hasProperty ( java . lang . String ) { for ( org . hawkular . apm . api . model . Property property : this . properties ) { if ( property . getName ( ) . equals ( name ) ) { return true ; } } return false ; } | org . junit . Assert . assertFalse ( service . hasProperty ( "test" ) ) |
testConstructEmptyDocument ( ) { final com . allanbank . mongodb . bson . impl . ImmutableDocument element = new com . allanbank . mongodb . bson . impl . ImmutableDocument ( new com . allanbank . mongodb . bson . impl . RootDocument ( ) ) ; "<AssertPlaceHolder>" ; } getElements ( ) { return myElements ; } | org . junit . Assert . assertTrue ( element . getElements ( ) . isEmpty ( ) ) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.