input
stringlengths 28
18.7k
| output
stringlengths 39
1.69k
|
|---|---|
testFetchByPrimaryKeyMissing ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . blogs . model . BlogsEntry missingBlogsEntry = _persistence . fetchByPrimaryKey ( pk ) ; "<AssertPlaceHolder>" ; } fetchByPrimaryKey ( long ) { return com . liferay . adaptive . media . image . service . persistence . AMImageEntryUtil . getPersistence ( ) . fetchByPrimaryKey ( amImageEntryId ) ; }
|
org . junit . Assert . assertNull ( missingBlogsEntry )
|
executeWithCityAndCountryWithNoCityMatches ( ) { com . gisgraphy . webapp . action . GeocodingAction action = new com . gisgraphy . webapp . action . GeocodingAction ( ) ; com . gisgraphy . fulltext . IFullTextSearchEngine fullTextSearchEngine = org . easymock . EasyMock . createMock ( com . gisgraphy . fulltext . IFullTextSearchEngine . class ) ; java . lang . String countryCode = "FR" ; java . lang . String cityName = "city" ; com . gisgraphy . fulltext . FulltextQuery query = new com . gisgraphy . fulltext . FulltextQuery ( cityName , com . gisgraphy . domain . valueobject . Pagination . DEFAULT_PAGINATION , com . gisgraphy . domain . valueobject . Output . DEFAULT_OUTPUT , ONLY_CITY_PLACETYPE , countryCode ) ; org . easymock . EasyMock . expect ( fullTextSearchEngine . executeQuery ( query ) ) . andStubReturn ( new com . gisgraphy . fulltext . FulltextResultsDto ( ) ) ; org . easymock . EasyMock . replay ( fullTextSearchEngine ) ; action . setFullTextSearchEngine ( fullTextSearchEngine ) ; action . setCity ( cityName ) ; action . setCountryCode ( countryCode ) ; "<AssertPlaceHolder>" ; } execute ( ) { java . util . List < com . gisgraphy . stats . StatsUsage > statsUsageList = new java . util . ArrayList < com . gisgraphy . stats . StatsUsage > ( ) ; com . gisgraphy . stats . StatsUsage statsUsage1 = new com . gisgraphy . stats . StatsUsage ( com . gisgraphy . stats . StatsUsageType . FULLTEXT ) ; com . gisgraphy . stats . StatsUsage statsUsage2 = new com . gisgraphy . stats . StatsUsage ( com . gisgraphy . stats . StatsUsageType . GEOLOC ) ; com . gisgraphy . stats . StatsUsage statsUsage3 = new com . gisgraphy . stats . StatsUsage ( com . gisgraphy . stats . StatsUsageType . STREET ) ; statsUsage1 . setUsage ( 10L ) ; statsUsage2 . setUsage ( 20L ) ; statsUsage3 . setUsage ( 30L ) ; statsUsageList . add ( statsUsage1 ) ; statsUsageList . add ( statsUsage2 ) ; statsUsageList . add ( statsUsage3 ) ; com . gisgraphy . webapp . action . StatsAction statsAction = new com . gisgraphy . webapp . action . StatsAction ( ) ; com . gisgraphy . domain . repository . IStatsUsageDao mockStatsUsageDao = org . easymock . EasyMock . createMock ( com . gisgraphy . domain . repository . IStatsUsageDao . class ) ; org . easymock . EasyMock . expect ( mockStatsUsageDao . getAll ( ) ) . andReturn ( statsUsageList ) . times ( 2 ) ; org . easymock . EasyMock . replay ( mockStatsUsageDao ) ; statsAction . setStatsUsageDao ( mockStatsUsageDao ) ; java . lang . String returnString = statsAction . execute ( ) ; org . junit . Assert . assertEquals ( "statsusage<sp>should<sp>be<sp>loaded<sp>when<sp>execute<sp>is<sp>called" , statsUsageList , statsAction . getStatsUsages ( ) ) ; org . junit . Assert . assertEquals ( Action . SUCCESS , returnString ) ; org . junit . Assert . assertEquals ( 60L , statsAction . getTotalUsage ( ) . longValue ( ) ) ; returnString = statsAction . execute ( ) ; org . junit . Assert . assertEquals ( "totalusage<sp>should<sp>not<sp>be<sp>recursively<sp>added<sp>for<sp>each<sp>call<sp>to<sp>execute" , 60L , statsAction . getTotalUsage ( ) . longValue ( ) ) ; org . easymock . EasyMock . verify ( mockStatsUsageDao ) ; }
|
org . junit . Assert . assertEquals ( Action . SUCCESS , action . execute ( ) )
|
testDeleteProcessDefinitionsByKeyWithCustomListenersSkipped ( ) { org . camunda . bpm . engine . test . api . runtime . util . IncrementCounterListener . counter = 0 ; for ( int i = 0 ; i < 3 ; i ++ ) { deployTwoProcessDefinitions ( ) ; } runtimeService . startProcessInstanceByKey ( "processOne" ) ; repositoryService . deleteProcessDefinitions ( ) . byKey ( "processOne" ) . withoutTenantId ( ) . cascade ( ) . skipCustomListeners ( ) . delete ( ) ; "<AssertPlaceHolder>" ; } delete ( ) { ensureOnlyOneNotNull ( org . camunda . bpm . engine . exception . NullValueException . class , "'processDefinitionKey'<sp>or<sp>'processDefinitionIds'<sp>cannot<sp>be<sp>null" , processDefinitionKey , processDefinitionIds ) ; org . camunda . bpm . engine . impl . interceptor . Command < java . lang . Void > command ; if ( ( processDefinitionKey ) != null ) { command = new org . camunda . bpm . engine . impl . cmd . DeleteProcessDefinitionsByKeyCmd ( processDefinitionKey , cascade , skipCustomListeners , skipIoMappings , tenantId , isTenantIdSet ) ; } else if ( ( ( processDefinitionIds ) != null ) && ( ! ( processDefinitionIds . isEmpty ( ) ) ) ) { command = new org . camunda . bpm . engine . impl . cmd . DeleteProcessDefinitionsByIdsCmd ( processDefinitionIds , cascade , skipCustomListeners , skipIoMappings ) ; } else { return ; } commandExecutor . execute ( command ) ; }
|
org . junit . Assert . assertThat ( IncrementCounterListener . counter , org . hamcrest . Matchers . is ( 0 ) )
|
selfWithTerm ( ) { final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "%s|SNOMED<sp>CT<sp>Root|" , com . b2international . snowowl . snomed . core . ql . SnomedQueryEvaluationRequestTest . ROOT_ID ) ) ; final com . b2international . index . query . Expression expected = RevisionDocument . Expressions . id ( com . b2international . snowowl . snomed . core . ql . SnomedQueryEvaluationRequestTest . ROOT_ID ) ; "<AssertPlaceHolder>" ; } id ( java . lang . String ) { return super . id ( id ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
shouldSaveState ( ) { org . apache . camel . impl . MemoryStateRepository repository = new org . apache . camel . impl . MemoryStateRepository ( ) ; repository . setState ( "key" , "value" ) ; "<AssertPlaceHolder>" ; } getState ( java . lang . String ) { if ( key . contains ( org . apache . camel . component . kafka . KafkaConsumerRebalanceTest . TOPIC ) ) { messagesLatch . countDown ( ) ; } return "-1" ; }
|
org . junit . Assert . assertEquals ( "value" , repository . getState ( "key" ) )
|
testGetSettings ( ) { final com . atlassian . bitbucket . setting . Settings settings = mock ( com . atlassian . bitbucket . setting . Settings . class ) ; com . atlassian . bitbucket . user . EscalatedSecurityContext escalatedSecurityContext = mock ( com . atlassian . bitbucket . user . EscalatedSecurityContext . class ) ; org . mockito . ArgumentCaptor < com . atlassian . bitbucket . util . Operation > captor = org . mockito . ArgumentCaptor . forClass ( com . atlassian . bitbucket . util . Operation . class ) ; when ( securityService . withPermission ( eq ( Permission . REPO_ADMIN ) , eq ( "Retrieving<sp>settings" ) ) ) . thenReturn ( escalatedSecurityContext ) ; settingsService . getSettings ( repository ) ; verify ( escalatedSecurityContext , times ( 1 ) ) . call ( captor . capture ( ) ) ; when ( hookService . getSettings ( repository , Notifier . KEY ) ) . thenReturn ( settings ) ; java . lang . Object returnValue = captor . getValue ( ) . perform ( ) ; verify ( hookService , times ( 1 ) ) . getSettings ( repository , Notifier . KEY ) ; "<AssertPlaceHolder>" ; } getSettings ( com . atlassian . bitbucket . repository . Repository ) { try { return securityService . withPermission ( Permission . REPO_ADMIN , "Retrieving<sp>settings" ) . call ( ( ) -> hookService . getSettings ( repository , Notifier . KEY ) ) ; } catch ( java . lang . Exception e ) { com . nerdwin15 . stash . webhook . service . ConcreteSettingsService . LOGGER . error ( "Unexpected<sp>exception<sp>trying<sp>to<sp>get<sp>webhook<sp>settings" , e ) ; return null ; } }
|
org . junit . Assert . assertEquals ( settings , returnValue )
|
testDynamicQueryByProjectionMissing ( ) { com . liferay . portal . kernel . dao . orm . DynamicQuery dynamicQuery = com . liferay . portal . kernel . dao . orm . DynamicQueryFactoryUtil . forClass ( com . liferay . portal . kernel . model . Contact . class , _dynamicQueryClassLoader ) ; dynamicQuery . setProjection ( com . liferay . portal . kernel . dao . orm . ProjectionFactoryUtil . property ( "contactId" ) ) ; dynamicQuery . add ( com . liferay . portal . kernel . dao . orm . RestrictionsFactoryUtil . in ( "contactId" , 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 ( ) )
|
testCheckNullRequestMethod ( ) { org . apache . catalina . filters . TesterHttpServletRequest request = new org . apache . catalina . filters . TesterHttpServletRequest ( ) ; request . setHeader ( CorsFilter . REQUEST_HEADER_ORIGIN , "http://tomcat.apache.org" ) ; request . setMethod ( null ) ; org . apache . catalina . filters . CorsFilter corsFilter = new org . apache . catalina . filters . CorsFilter ( ) ; corsFilter . init ( org . apache . catalina . filters . TesterFilterConfigs . getSpecificOriginFilterConfig ( ) ) ; org . apache . catalina . filters . CorsFilter . CORSRequestType requestType = corsFilter . checkRequestType ( request ) ; "<AssertPlaceHolder>" ; } checkRequestType ( javax . servlet . http . HttpServletRequest ) { org . apache . catalina . filters . CorsFilter . CORSRequestType requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; if ( request == null ) { throw new java . lang . IllegalArgumentException ( org . apache . catalina . filters . CorsFilter . sm . getString ( "corsFilter.nullRequest" ) ) ; } java . lang . String originHeader = request . getHeader ( org . apache . catalina . filters . CorsFilter . REQUEST_HEADER_ORIGIN ) ; if ( originHeader != null ) { if ( originHeader . isEmpty ( ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else if ( ! ( org . apache . catalina . filters . CorsFilter . isValidOrigin ( originHeader ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else if ( isLocalOrigin ( request , originHeader ) ) { return org . apache . catalina . filters . CorsFilter . CORSRequestType . NOT_CORS ; } else { java . lang . String method = request . getMethod ( ) ; if ( method != null ) { if ( "OPTIONS" . equals ( method ) ) { java . lang . String accessControlRequestMethodHeader = request . getHeader ( org . apache . catalina . filters . CorsFilter . REQUEST_HEADER_ACCESS_CONTROL_REQUEST_METHOD ) ; if ( ( accessControlRequestMethodHeader != null ) && ( ! ( accessControlRequestMethodHeader . isEmpty ( ) ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . PRE_FLIGHT ; } else if ( ( accessControlRequestMethodHeader != null ) && ( accessControlRequestMethodHeader . isEmpty ( ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . INVALID_CORS ; } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } else if ( ( "GET" . equals ( method ) ) || ( "HEAD" . equals ( method ) ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . SIMPLE ; } else if ( "POST" . equals ( method ) ) { java . lang . String mediaType = getMediaType ( request . getContentType ( ) ) ; if ( mediaType != null ) { if ( org . apache . catalina . filters . CorsFilter . SIMPLE_HTTP_REQUEST_CONTENT_TYPE_VALUES . contains ( mediaType ) ) { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . SIMPLE ; } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . ACTUAL ; } } } } else { requestType = org . apache . catalina . filters . CorsFilter . CORSRequestType . NOT_CORS ; } return requestType ; }
|
org . junit . Assert . assertEquals ( CorsFilter . CORSRequestType . INVALID_CORS , requestType )
|
testInputCoalesce ( ) { java . util . Map < java . lang . String , java . lang . Object > configMap = com . google . common . collect . Maps . newHashMap ( ) ; configMap . put ( ( ( ( DataStep . INPUT_TYPE ) + "." ) + ( com . cloudera . labs . envelope . input . InputFactory . TYPE_CONFIG_NAME ) ) , com . cloudera . labs . envelope . run . DummyInput . class . getName ( ) ) ; configMap . put ( ( ( ( DataStep . INPUT_TYPE ) + "." ) + "starting.partitions" ) , 10 ) ; configMap . put ( BatchStep . COALESCE_NUM_PARTITIONS_PROPERTY , 5 ) ; com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . parseMap ( configMap ) ; com . cloudera . labs . envelope . run . BatchStep batchStep = new com . cloudera . labs . envelope . run . BatchStep ( "test" ) ; batchStep . configure ( config ) ; batchStep . submit ( com . google . common . collect . Sets . < com . cloudera . labs . envelope . run . Step > newHashSet ( ) ) ; org . apache . spark . sql . Dataset < org . apache . spark . sql . Row > df = batchStep . getData ( ) ; int numPartitions = df . javaRDD ( ) . getNumPartitions ( ) ; "<AssertPlaceHolder>" ; } getData ( ) { return data ; }
|
org . junit . Assert . assertEquals ( numPartitions , 5 )
|
testRewritePomWithReleasedParent ( ) { java . util . List < org . apache . maven . project . MavenProject > reactorProjects = createReactorProjects ( "pom-with-released-parent" ) ; org . apache . maven . shared . release . config . ReleaseDescriptorBuilder builder = createDescriptorFromProjects ( reactorProjects , "pom-with-released-parent" ) ; mapAlternateNextVersion ( builder , "groupId:subproject1" ) ; builder . addReleaseVersion ( "groupId:artifactId" , "1" ) ; builder . addDevelopmentVersion ( "groupId:artifactId" , "1" ) ; phase . execute ( org . apache . maven . shared . release . config . ReleaseUtils . buildReleaseDescriptor ( builder ) , new org . apache . maven . shared . release . env . DefaultReleaseEnvironment ( ) , reactorProjects ) ; "<AssertPlaceHolder>" ; } comparePomFiles ( java . util . List ) { return comparePomFiles ( reactorProjects , true ) ; }
|
org . junit . Assert . assertTrue ( comparePomFiles ( reactorProjects ) )
|
testBepalenDatumLaatsteBericht ( ) { final java . sql . Timestamp opgehaaldeDatumLaatsteBericht = geefQueryResultaat ( ( "select<sp>max(tijdstip)<sp>from<sp>mig_bericht<sp>where<sp>process_instance_id<sp>=<sp>" + ( nl . bzk . migratiebrp . isc . opschoner . dao . impl . MigDaoImplTest . PROCES_ID ) ) , java . sql . Timestamp . class ) ; final java . sql . Timestamp datumLaatsteBericht = migDao . bepaalDatumLaatsteBerichtOntvangenVoorProces ( nl . bzk . migratiebrp . isc . opschoner . dao . impl . MigDaoImplTest . PROCES_ID ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( opgehaaldeDatumLaatsteBericht , datumLaatsteBericht )
|
shouldReturnTrueWhenThereAreDraftDocuments ( ) { com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService spy = spy ( draftDocumentsNotificationService ) ; given ( securityService . getCurrentUserId ( ) ) . willReturn ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationServiceTest . CURRENT_USER_ID ) ; given ( securityService . hasCurrentUserRole ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService . ROLE_DOCUMENTS_NOTIFICATION ) ) . willReturn ( Boolean . TRUE ) ; doReturn ( 1 ) . when ( spy ) . countDraftDocumentsForUser ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationServiceTest . CURRENT_USER_ID ) ; boolean result = spy . shouldNotifyCurrentUser ( ) ; verify ( securityService ) . getCurrentUserId ( ) ; verify ( securityService ) . hasCurrentUserRole ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationService . ROLE_DOCUMENTS_NOTIFICATION ) ; verify ( spy ) . countDraftDocumentsForUser ( com . qcadoo . mes . materialFlowResources . service . DraftDocumentsNotificationServiceTest . CURRENT_USER_ID ) ; "<AssertPlaceHolder>" ; } countDraftDocumentsForUser ( java . lang . Long ) { com . qcadoo . model . api . EntityList userLocations = userDataDefinition ( ) . get ( currentUserId ) . getHasManyField ( UserFieldsMF . USER_LOCATIONS ) ; com . qcadoo . model . api . search . SearchConjunction conjunction = com . qcadoo . model . api . search . SearchRestrictions . conjunction ( ) ; conjunction . add ( eq ( DocumentFields . STATE , DocumentState . DRAFT . getStringValue ( ) ) ) ; conjunction . add ( eq ( DocumentFields . ACTIVE , Boolean . TRUE ) ) ; conjunction . add ( isNull ( "order.id" ) ) ; com . qcadoo . model . api . search . SearchCriteriaBuilder criteriaBuilder = documentDataDefinition ( ) . find ( ) ; if ( ! ( userLocations . isEmpty ( ) ) ) { criteriaBuilder . createAlias ( DocumentFields . LOCATION_FROM , "locFrom" , JoinType . LEFT ) ; criteriaBuilder . createAlias ( DocumentFields . LOCATION_TO , "locTo" , JoinType . LEFT ) ; java . util . Set < java . lang . Long > locationIds = userLocations . stream ( ) . map ( ( ul ) -> ul . getBelongsToField ( UserLocationFields . LOCATION ) ) . map ( Entity :: getId ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; conjunction . add ( or ( in ( "locFrom.id" , locationIds ) , in ( "locTo.id" , locationIds ) ) ) ; } criteriaBuilder . add ( conjunction ) ; return criteriaBuilder . list ( ) . getTotalNumberOfEntities ( ) ; }
|
org . junit . Assert . assertTrue ( result )
|
noEventsShouldBeFetchedFromEmptyTree ( ) { com . graphaware . module . timetree . domain . TimeInstant timeInstant1 = com . graphaware . module . timetree . domain . TimeInstant . instant ( dateToMillis ( 2012 , 11 , 1 ) ) . with ( Resolution . MILLISECOND ) ; com . graphaware . module . timetree . domain . TimeInstant timeInstant2 = com . graphaware . module . timetree . domain . TimeInstant . instant ( dateToMillis ( 2012 , 11 , 2 ) ) . with ( Resolution . MILLISECOND ) ; try ( org . neo4j . graphdb . Transaction tx = getDatabase ( ) . beginTx ( ) ) { com . graphaware . module . timetree . List < com . graphaware . module . timetree . domain . Event > events = timedEvents . getEvents ( timeInstant1 , timeInstant2 , com . graphaware . module . timetree . Collections . singleton ( com . graphaware . module . timetree . TimeTreeBackedEventsTest . AT_TIME ) ) ; "<AssertPlaceHolder>" ; tx . success ( ) ; } } getEvents ( com . graphaware . module . timetree . domain . TimeInstant , com . graphaware . module . timetree . domain . TimeInstant , com . graphaware . module . timetree . Set ) { return getEvents ( startTime , endTime , relationshipTypes , com . graphaware . module . timetree . INCOMING ) ; }
|
org . junit . Assert . assertEquals ( 0 , events . size ( ) )
|
shouldNotMatchWhenIndexesDiffer ( ) { final org . pitest . mutationtest . engine . MutationIdentifier a = org . pitest . mutationtest . LocationMother . aMutationId ( ) . withIndex ( 1 ) . build ( ) ; final org . pitest . mutationtest . engine . MutationIdentifier b = org . pitest . mutationtest . LocationMother . aMutationId ( ) . withIndex ( 100 ) . build ( ) ; "<AssertPlaceHolder>" ; } matches ( org . pitest . mutationtest . engine . MutationDetails ) { return value . getId ( ) . getLocation ( ) . getMethodName ( ) . name ( ) . equals ( name ) ; }
|
org . junit . Assert . assertFalse ( a . matches ( b ) )
|
shouldReturnResponse ( ) { logFile . log ( "" , "left=1,<sp>right=2,<sp>rotate=3,<sp>drop" ) ; logFile . readNextStep ( ) ; "<AssertPlaceHolder>" ; } getCurrentResponse ( ) { return currentLine . split ( "\\@" ) [ 1 ] ; }
|
org . junit . Assert . assertEquals ( "left=1,<sp>right=2,<sp>rotate=3,<sp>drop" , logFile . getCurrentResponse ( ) )
|
testGetRowKeys ( ) { org . jfree . data . category . DefaultIntervalCategoryDataset empty = new org . jfree . data . category . DefaultIntervalCategoryDataset ( new double [ 0 ] [ 0 ] , new double [ 0 ] [ 0 ] ) ; java . util . List keys = empty . getRowKeys ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return queue . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , keys . size ( ) )
|
getServicesFirstCategory_NoData ( ) { givenEmptyModel ( ) ; "<AssertPlaceHolder>" ; } getServicesFirstCategory ( ) { return this . entriesOfCateogry0 ; }
|
org . junit . Assert . assertNull ( model . getServicesFirstCategory ( ) )
|
testSerialize ( ) { java . util . List < java . lang . String > m = createList ( ) ; m . add ( "a" ) ; m . add ( "b" ) ; if ( m instanceof java . io . Serializable ) { byte [ ] data = org . ujmp . core . util . SerializationUtil . serialize ( ( ( java . io . Serializable ) ( m ) ) ) ; java . util . List < java . lang . String > m2 = ( ( java . util . List < java . lang . String > ) ( org . ujmp . core . util . SerializationUtil . deserialize ( data ) ) ) ; "<AssertPlaceHolder>" ; } } getLabel ( ) { java . lang . Object o = getLabelObject ( ) ; if ( o == null ) { return null ; } if ( o instanceof java . lang . String ) { return ( ( java . lang . String ) ( o ) ) ; } if ( o instanceof org . ujmp . core . interfaces . HasLabel ) { return ( ( org . ujmp . core . interfaces . HasLabel ) ( o ) ) . getLabel ( ) ; } return o . toString ( ) ; }
|
org . junit . Assert . assertEquals ( getLabel ( ) , m , m2 )
|
toAffiliationTest ( ) { org . orcid . pojo . ajaxForm . AffiliationForm f1 = getAffiliationForm ( ) ; org . orcid . jaxb . model . v3 . rc2 . record . Affiliation aff = getAffiliation ( ) ; "<AssertPlaceHolder>" ; } toAffiliation ( ) { org . orcid . jaxb . model . v3 . release . record . Affiliation affiliation = null ; if ( AffiliationType . DISTINCTION . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Distinction ( ) ; } else if ( AffiliationType . EDUCATION . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Education ( ) ; } else if ( AffiliationType . EMPLOYMENT . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Employment ( ) ; } else if ( AffiliationType . INVITED_POSITION . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . InvitedPosition ( ) ; } else if ( AffiliationType . MEMBERSHIP . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Membership ( ) ; } else if ( AffiliationType . QUALIFICATION . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Qualification ( ) ; } else if ( AffiliationType . SERVICE . value ( ) . equals ( affiliationType . getValue ( ) ) ) { affiliation = new org . orcid . jaxb . model . v3 . release . record . Service ( ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( putCode ) ) ) { affiliation . setPutCode ( java . lang . Long . valueOf ( putCode . getValue ( ) ) ) ; } if ( ( ( visibility ) != null ) && ( ( visibility . getVisibility ( ) ) != null ) ) { affiliation . setVisibility ( org . orcid . jaxb . model . v3 . release . common . Visibility . fromValue ( visibility . getVisibility ( ) . value ( ) ) ) ; } org . orcid . jaxb . model . v3 . release . common . Organization organization = new org . orcid . jaxb . model . v3 . release . common . Organization ( ) ; affiliation . setOrganization ( organization ) ; organization . setName ( affiliationName . getValue ( ) ) ; org . orcid . jaxb . model . v3 . release . common . OrganizationAddress organizationAddress = new org . orcid . jaxb . model . v3 . release . common . OrganizationAddress ( ) ; organization . setAddress ( organizationAddress ) ; organizationAddress . setCity ( city . getValue ( ) ) ; if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( region ) ) ) { organizationAddress . setRegion ( region . getValue ( ) ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( disambiguatedAffiliationSourceId ) ) ) { organization . setDisambiguatedOrganization ( new org . orcid . jaxb . model . v3 . release . common . DisambiguatedOrganization ( ) ) ; organization . getDisambiguatedOrganization ( ) . setDisambiguatedOrganizationIdentifier ( disambiguatedAffiliationSourceId . getValue ( ) ) ; organization . getDisambiguatedOrganization ( ) . setDisambiguationSource ( disambiguationSource . getValue ( ) ) ; } organizationAddress . setCountry ( org . orcid . jaxb . model . common . Iso3166Country . fromValue ( country . getValue ( ) ) ) ; if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( roleTitle ) ) ) { affiliation . setRoleTitle ( roleTitle . getValue ( ) ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( departmentName ) ) ) { affiliation . setDepartmentName ( departmentName . getValue ( ) ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( startDate ) ) ) { affiliation . setStartDate ( startDate . toV3FuzzyDate ( ) ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( endDate ) ) ) { affiliation . setEndDate ( endDate . toV3FuzzyDate ( ) ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( url ) ) ) { affiliation . setUrl ( new org . orcid . jaxb . model . v3 . release . common . Url ( url . getValue ( ) ) ) ; } if ( ( affiliationExternalIdentifiers ) != null ) { org . orcid . jaxb . model . v3 . release . record . ExternalIDs externalIDs = new org . orcid . jaxb . model . v3 . release . record . ExternalIDs ( ) ; for ( org . orcid . pojo . ajaxForm . ActivityExternalIdentifier affiliationExternalIdentifier : affiliationExternalIdentifiers ) { externalIDs . getExternalIdentifier ( ) . add ( affiliationExternalIdentifier . toExternalIdentifier ( ) ) ; } affiliation . setExternalIDs ( externalIDs ) ; } if ( ! ( org . orcid . pojo . ajaxForm . PojoUtil . isEmpty ( source ) ) ) { org .
|
org . junit . Assert . assertEquals ( aff , f1 . toAffiliation ( ) )
|
testMessageBoxes ( ) { com . github . bordertech . wcomponents . test . selenium . driver . SeleniumWComponentsWebDriver driver = getDriver ( ) ; com . github . bordertech . wcomponents . test . selenium . element . SeleniumWMessagesWebElement messages = driver . findWMessages ( byWComponentPath ( "WMessages[0]" ) ) ; java . util . List < com . github . bordertech . wcomponents . test . selenium . element . SeleniumWMessageBoxWebElement > messageBoxes = messages . getMessageBoxes ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return ( ( endIndex ) - ( startIndex ) ) + 1 ; }
|
org . junit . Assert . assertEquals ( 4 , messageBoxes . size ( ) )
|
testResourceInjected ( ) { final com . google . inject . Module module = new com . google . inject . Module ( ) { @ org . jboss . resteasy . plugins . guice . Override public void configure ( final com . google . inject . Binder binder ) { binder . bind ( java . lang . String . class ) . toInstance ( "injected-name" ) ; binder . bind ( org . jboss . resteasy . plugins . guice . ResourceTest . TestResource . class ) . to ( org . jboss . resteasy . plugins . guice . ResourceTest . TestResourceInjected . class ) ; } } ; final org . jboss . resteasy . plugins . guice . ModuleProcessor processor = new org . jboss . resteasy . plugins . guice . ModuleProcessor ( org . jboss . resteasy . plugins . guice . ResourceTest . dispatcher . getRegistry ( ) , org . jboss . resteasy . plugins . guice . ResourceTest . dispatcher . getProviderFactory ( ) ) ; processor . processInjector ( com . google . inject . Guice . createInjector ( module ) ) ; final org . jboss . resteasy . plugins . guice . ResourceTest . TestResource resource = org . jboss . resteasy . test . TestPortProvider . createProxy ( org . jboss . resteasy . plugins . guice . ResourceTest . TestResource . class , org . jboss . resteasy . test . TestPortProvider . generateBaseUrl ( ) ) ; "<AssertPlaceHolder>" ; org . jboss . resteasy . plugins . guice . ResourceTest . dispatcher . getRegistry ( ) . removeRegistrations ( org . jboss . resteasy . plugins . guice . ResourceTest . TestResource . class ) ; } getName ( ) { return name ; }
|
org . junit . Assert . assertEquals ( "injected-name" , resource . getName ( ) )
|
testGetAllRoutes ( ) { java . util . List < org . onebusaway . gtfs . model . Route > routes = org . onebusaway . gtfs . impl . HibernateGtfsRelationalDaoImplCaltrainTest . _dao . getAllRoutes ( ) ; "<AssertPlaceHolder>" ; } size ( ) { return size ; }
|
org . junit . Assert . assertEquals ( 3 , routes . size ( ) )
|
toJsonElementPreservesNullReportedProperties ( ) { com . microsoft . azure . sdk . iot . deps . twin . TwinState twinState = new com . microsoft . azure . sdk . iot . deps . twin . TwinState ( null , tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinStateTest . PROPERTIES , tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinStateTest . PROPERTIES_WITH_NULL_VALUES ) ; com . google . gson . JsonElement jsonElement = mockit . Deencapsulation . invoke ( twinState , "toJsonElement" ) ; "<AssertPlaceHolder>" ; } toString ( ) { com . google . gson . Gson gson = new com . google . gson . GsonBuilder ( ) . disableHtmlEscaping ( ) . setPrettyPrinting ( ) . create ( ) ; return gson . toJson ( this ) ; }
|
org . junit . Assert . assertTrue ( jsonElement . toString ( ) . contains ( tests . unit . com . microsoft . azure . sdk . iot . deps . twin . TwinStateTest . PROPERTIES_WITH_NULL_VALUES . toString ( ) ) )
|
testComputeFileContentHash_Null ( ) { java . lang . String hash = org . peerbox . watchservice . PathUtils . computeFileContentHash ( null ) ; "<AssertPlaceHolder>" ; } computeFileContentHash ( java . nio . file . Path ) { java . lang . String newHash = "" ; if ( ( path != null ) && ( ( path . toFile ( ) ) != null ) ) { for ( int i = 0 ; i < 3 ; i ++ ) { try { byte [ ] rawHash = org . hive2hive . core . security . HashUtil . hash ( path . toFile ( ) ) ; if ( rawHash != null ) { newHash = org . peerbox . watchservice . PathUtils . base64Encode ( rawHash ) ; } break ; } catch ( java . io . IOException e ) { e . printStackTrace ( ) ; try { java . lang . Thread . sleep ( 3000 ) ; } catch ( java . lang . InterruptedException e1 ) { e1 . printStackTrace ( ) ; } } } } return newHash ; }
|
org . junit . Assert . assertEquals ( hash , "" )
|
skip ( ) { final byte [ ] data = new byte [ ] { 1 , 2 , 3 , 4 } ; final java . io . ByteArrayInputStream stream = new java . io . ByteArrayInputStream ( data ) ; final com . flagstone . transform . coder . LittleDecoder fixture = new com . flagstone . transform . coder . LittleDecoder ( stream ) ; fixture . skip ( 2 ) ; "<AssertPlaceHolder>" ; } readByte ( ) { if ( ( ( size ) - ( index ) ) < 1 ) { fill ( ) ; } if ( ( ( index ) + 1 ) > ( size ) ) { throw new java . lang . ArrayIndexOutOfBoundsException ( ) ; } return ( buffer [ ( ( index ) ++ ) ] ) & ( com . flagstone . transform . coder . SWFDecoder . BYTE_MASK ) ; }
|
org . junit . Assert . assertEquals ( 3 , fixture . readByte ( ) )
|
testAddAllIntListOfRdn006 ( ) { java . util . LinkedList < javax . naming . ldap . Rdn > test = new java . util . LinkedList < javax . naming . ldap . Rdn > ( ) ; javax . naming . ldap . LdapName ln = new javax . naming . ldap . LdapName ( "t=test" ) ; ln . addAll ( 0 , test ) ; "<AssertPlaceHolder>" ; } toString ( ) { return this . toString ( "" ) ; }
|
org . junit . Assert . assertEquals ( "t=test" , ln . toString ( ) )
|
packageDirectories_singleEntryWithSubEntries_canUnzip ( ) { java . io . File output = tempFolder . newFile ( "output.zip" ) ; java . io . File inputRootFolder = tempFolder . newFolder ( "inputRootFolder" ) ; java . io . File inputSubFolder = new java . io . File ( inputRootFolder , "inputSubFolder" ) ; org . apache . commons . io . FileUtils . forceMkdir ( inputSubFolder ) ; java . io . File inputFile = new java . io . File ( inputSubFolder , "exampleInput.foo" ) ; org . apache . commons . io . FileUtils . write ( inputFile , "some<sp>data" ) ; MavenResolvedArtifactImpl . PackageDirHelper . packageDirectories ( output , inputRootFolder ) ; java . io . File outputFolder = tempFolder . newFolder ( "outputFolder" ) ; "<AssertPlaceHolder>" ; } canUnzip ( java . io . File , java . io . File ) { byte [ ] buffer = new byte [ 1024 ] ; try ( java . util . zip . ZipInputStream zis = new java . util . zip . ZipInputStream ( new java . io . FileInputStream ( zipFile ) ) ) { java . util . zip . ZipEntry ze = zis . getNextEntry ( ) ; while ( ze != null ) { java . lang . String fileName = ze . getName ( ) ; java . io . File newFile = new java . io . File ( outputFolder , fileName ) ; org . apache . commons . io . FileUtils . forceMkdir ( newFile . getParentFile ( ) ) ; try ( java . io . FileOutputStream fos = new java . io . FileOutputStream ( newFile ) ) { int len ; while ( ( len = zis . read ( buffer ) ) > 0 ) { fos . write ( buffer , 0 , len ) ; } } ze = zis . getNextEntry ( ) ; } return true ; } catch ( java . io . IOException ex ) { return false ; } }
|
org . junit . Assert . assertTrue ( canUnzip ( output , outputFolder ) )
|
testSyncTokenToJsonNullUuid ( ) { java . lang . String expected = "{\"t\":\"2015-11-25T11:25:28.000Z\",\"u\":null}" ; java . lang . String result = org . openmrs . projectbuendia . webservices . rest . SyncTokenUtils . syncTokenToJson ( new org . projectbuendia . openmrs . api . SyncToken ( new java . util . Date ( 1448450728000L ) , null ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertEquals ( expected , result )
|
utestCountTestedAtomTypes ( ) { org . openscience . cdk . config . AtomTypeFactory factory = org . openscience . cdk . config . AtomTypeFactory . getInstance ( "org/openscience/cdk/config/data/structgen_atomtypes.xml" , org . openscience . cdk . silent . SilentChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomType [ ] expectedTypes = factory . getAllAtomTypes ( ) ; if ( ( expectedTypes . length ) != ( org . openscience . cdk . atomtype . StructGenMatcherTest . testedAtomTypes . size ( ) ) ) { java . lang . String errorMessage = "Atom<sp>types<sp>not<sp>tested:" ; for ( org . openscience . cdk . interfaces . IAtomType expectedType : expectedTypes ) { if ( ! ( org . openscience . cdk . atomtype . StructGenMatcherTest . testedAtomTypes . containsKey ( expectedType . getAtomTypeName ( ) ) ) ) errorMessage += "<sp>" + ( expectedType . getAtomTypeName ( ) ) ; } "<AssertPlaceHolder>" ; } } getAllAtomTypes ( ) { org . openscience . cdk . config . AtomTypeFactory . logger . debug ( "Returning<sp>list<sp>of<sp>size:<sp>" , getSize ( ) ) ; return ( ( org . openscience . cdk . interfaces . IAtomType [ ] ) ( atomTypes . values ( ) . toArray ( new org . openscience . cdk . interfaces . IAtomType [ atomTypes . size ( ) ] ) ) ) ; }
|
org . junit . Assert . assertEquals ( errorMessage , factory . getAllAtomTypes ( ) . length , org . openscience . cdk . atomtype . StructGenMatcherTest . testedAtomTypes . size ( ) )
|
testGetAdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl ( ) { gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . AdapterPatientDiscoveryDeferredReqQueueProcessImpl deferredProcessImpl = new gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . AdapterPatientDiscoveryDeferredReqQueueProcessImpl ( ) ; gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . AdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl processImpl = deferredProcessImpl . getAdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl ( ) ; "<AssertPlaceHolder>" ; } getAdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl ( ) { return new gov . hhs . fha . nhinc . patientdiscovery . adapter . deferred . request . queue . AdapterPatientDiscoveryDeferredReqQueueProcessOrchImpl ( ) ; }
|
org . junit . Assert . assertNotNull ( processImpl )
|
testIntegerDataSource ( ) { com . vaadin . server . VaadinSession . setCurrent ( new com . vaadin . tests . util . AlwaysLockedVaadinSession ( null ) ) ; com . vaadin . v7 . ui . Label l = new com . vaadin . v7 . ui . Label ( "Foo" ) ; com . vaadin . v7 . data . Property ds = new com . vaadin . v7 . data . util . MethodProperty < java . lang . Integer > ( com . vaadin . tests . data . bean . Person . createTestPerson1 ( ) , "age" ) ; l . setPropertyDataSource ( ds ) ; "<AssertPlaceHolder>" ; } getAge ( ) { return age ; }
|
org . junit . Assert . assertEquals ( java . lang . String . valueOf ( com . vaadin . tests . data . bean . Person . createTestPerson1 ( ) . getAge ( ) ) , l . getValue ( ) )
|
testFilterSuccess ( ) { com . mozilla . bagheera . http . ContentLengthFilter filter = new com . mozilla . bagheera . http . ContentLengthFilter ( 4 ) ; byte [ ] contentBytes = new java . lang . String ( "foo" ) . getBytes ( ) ; boolean success = false ; try { filter . messageReceived ( ctx , createMockEvent ( ctx . getChannel ( ) , com . mozilla . bagheera . http . HTTP_1_1 , com . mozilla . bagheera . http . POST , "/" , contentBytes ) ) ; success = true ; } catch ( java . lang . Exception e ) { e . printStackTrace ( ) ; } "<AssertPlaceHolder>" ; } getChannel ( ) { return channel ; }
|
org . junit . Assert . assertTrue ( success )
|
testWithoutSettingsObject ( ) { "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertNotNull ( driver )
|
testCorrectnessOfOutOfScopeActivityPort1 ( ) { org . apache . taverna . scufl2 . api . profiles . ProcessorBinding pb = new org . apache . taverna . scufl2 . api . profiles . ProcessorBinding ( ) ; org . apache . taverna . scufl2 . api . core . Processor processor = new org . apache . taverna . scufl2 . api . core . Processor ( ) ; pb . setBoundProcessor ( processor ) ; org . apache . taverna . scufl2 . api . profiles . ProcessorOutputPortBinding pipb = new org . apache . taverna . scufl2 . api . profiles . ProcessorOutputPortBinding ( ) ; pipb . setParent ( pb ) ; org . apache . taverna . scufl2 . api . port . OutputActivityPort orphanPort = new org . apache . taverna . scufl2 . api . port . OutputActivityPort ( ) ; pipb . setBoundActivityPort ( orphanPort ) ; org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator cv = new org . apache . taverna . scufl2 . validation . correctness . CorrectnessValidator ( ) ; org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener rcvl = new org . apache . taverna . scufl2 . validation . correctness . ReportCorrectnessValidationListener ( ) ; cv . checkCorrectness ( pipb , false , rcvl ) ; java . util . Set < org . apache . taverna . scufl2 . validation . correctness . report . OutOfScopeValueProblem > outOfScopeValueProblems = rcvl . getOutOfScopeValueProblems ( ) ; boolean problem = false ; for ( org . apache . taverna . scufl2 . validation . correctness . report . OutOfScopeValueProblem nlp : outOfScopeValueProblems ) { if ( ( ( nlp . getBean ( ) . equals ( pipb ) ) && ( nlp . getFieldName ( ) . equals ( "boundActivityPort" ) ) ) && ( nlp . getValue ( ) . equals ( orphanPort ) ) ) { problem = true ; } } "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { return ( getClass ( ) ) == ( obj . getClass ( ) ) ; }
|
org . junit . Assert . assertTrue ( problem )
|
testIgnoreWhitespaceChars ( ) { java . lang . String query = "<sp>(<sp>)<sp>a\nb<sp>\rc<sp>+-/=,^<sp>@." ; java . util . List < com . facebook . buck . query . Lexer . Token > tokens = com . facebook . buck . query . Lexer . scan ( query . toCharArray ( ) ) ; java . util . List < com . facebook . buck . query . Lexer . Token > expected = com . google . common . collect . Lists . newArrayList ( new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . LPAREN ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . RPAREN ) , new com . facebook . buck . query . Lexer . Token ( "a" ) , new com . facebook . buck . query . Lexer . Token ( "b" ) , new com . facebook . buck . query . Lexer . Token ( "c" ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . PLUS ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . MINUS ) , new com . facebook . buck . query . Lexer . Token ( "/" ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . EQUALS ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . COMMA ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . CARET ) , new com . facebook . buck . query . Lexer . Token ( "@." ) , new com . facebook . buck . query . Lexer . Token ( Lexer . TokenKind . EOF ) ) ; "<AssertPlaceHolder>" ; } equalTo ( com . facebook . buck . query . QueryEnvironment$Argument ) { return ( ( ( type . equals ( other . type ) ) && ( ( integer ) == ( other . integer ) ) ) && ( java . util . Objects . equals ( expression , other . expression ) ) ) && ( java . util . Objects . equals ( word , other . word ) ) ; }
|
org . junit . Assert . assertThat ( tokens , org . hamcrest . Matchers . is ( org . hamcrest . Matchers . equalTo ( expected ) ) )
|
non_strict_with_skipped_scenarios ( ) { java . lang . Runtime runtime = createNonStrictRuntime ( ) ; bus . send ( testCaseFinishedWithStatus ( Result . Type . SKIPPED ) ) ; "<AssertPlaceHolder>" ; } exitStatus ( ) { return exitStatus . exitStatus ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , runtime . exitStatus ( ) )
|
When_creating_entity_Should_not_affect_subscriptions_before_processing ( ) { execute ( new com . artemis . EntityComponentLifecycleIntegrationTest . LifecycleTestingSystem ( ) { @ com . artemis . Override protected void processSystem ( ) { if ( ( timesProcessed ) == 0 ) { world . create ( ) ; "<AssertPlaceHolder>" ; done = true ; } } } ) ; } allMembers ( ) { return subAll . getEntities ( ) . size ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , allMembers ( ) )
|
shouldUseCustomComputerUsingEasyMock ( ) { final int EXPECTED_RESULT = 1 ; com . octo . android . sample . ui . HelloAndroidActivity activityUnderTest = org . robolectric . Robolectric . buildActivity ( com . octo . android . sample . ui . HelloAndroidActivity . class ) . create ( ) . get ( ) ; com . octo . android . sample . model . Computer mockComputer = org . easymock . EasyMock . createMock ( com . octo . android . sample . model . Computer . class ) ; org . easymock . EasyMock . expect ( mockComputer . getResult ( ) ) . andReturn ( EXPECTED_RESULT ) ; activityUnderTest . setComputer ( mockComputer ) ; org . easymock . EasyMock . replay ( mockComputer ) ; android . widget . Button button = ( ( android . widget . Button ) ( activityUnderTest . findViewById ( R . id . button_main ) ) ) ; button . performClick ( ) ; org . easymock . EasyMock . verify ( mockComputer ) ; android . widget . TextView textViewHello = ( ( android . widget . TextView ) ( activityUnderTest . findViewById ( R . id . textview_hello ) ) ) ; java . lang . String textViewHelloString = textViewHello . getText ( ) . toString ( ) ; "<AssertPlaceHolder>" ; } setComputer ( com . octo . android . sample . model . Computer ) { this . computer = computer ; }
|
org . junit . Assert . assertThat ( textViewHelloString , org . hamcrest . CoreMatchers . equalTo ( java . lang . String . valueOf ( EXPECTED_RESULT ) ) )
|
testGetCatalogFilterInclude ( ) { classUnderTest . setCatalogFilterInclude ( "aTestString" ) ; "<AssertPlaceHolder>" ; } getCatalogFilterInclude ( ) { return _catalogFilterInclude ; }
|
org . junit . Assert . assertEquals ( "aTestString" , classUnderTest . getCatalogFilterInclude ( ) )
|
fetchShouldNotFetchTagsFromOtherBranches ( ) { remoteGit . commit ( ) . setMessage ( "commit" ) . call ( ) ; remoteGit . checkout ( ) . setName ( "other" ) . setCreateBranch ( true ) . call ( ) ; remoteGit . commit ( ) . setMessage ( "commit2" ) . call ( ) ; remoteGit . tag ( ) . setName ( "foo" ) . call ( ) ; org . eclipse . jgit . transport . RefSpec spec = new org . eclipse . jgit . transport . RefSpec ( "refs/heads/master:refs/remotes/origin/master" ) ; git . fetch ( ) . setRemote ( "test" ) . setRefSpecs ( spec ) . setTagOpt ( TagOpt . AUTO_FOLLOW ) . call ( ) ; "<AssertPlaceHolder>" ; } resolve ( org . eclipse . jgit . lib . AbbreviatedObjectId ) { if ( id . isComplete ( ) ) return java . util . Collections . singleton ( id . toObjectId ( ) ) ; java . util . HashSet < org . eclipse . jgit . lib . ObjectId > matches = new java . util . HashSet ( 4 ) ; db . resolve ( matches , id ) ; return matches ; }
|
org . junit . Assert . assertNull ( db . resolve ( "foo" ) )
|
testFactory ( ) { uk . gov . dstl . baleen . mallet . ClassifierTrainerFactory factory = new uk . gov . dstl . baleen . mallet . ClassifierTrainerFactory ( "MaxEnt,gaussianPriorVariance=10.0,numIterations=20" ) ; cc . mallet . classify . ClassifierTrainer < ? > trainer = factory . createTrainer ( ) ; "<AssertPlaceHolder>" ; } createTrainer ( ) { java . lang . String [ ] fields = trainerDescriptor . split ( "," ) ; cc . mallet . classify . ClassifierTrainer < T > trainer = ( ( cc . mallet . classify . ClassifierTrainer < T > ) ( createTrainer ( resolveTrainerClassName ( fields [ 0 ] ) ) ) ) ; setParameterValues ( fields , trainer ) ; return trainer ; }
|
org . junit . Assert . assertNotNull ( trainer )
|
shouldReturnErrorWhenNoResourcesAndProductNotInTrackingOperations ( ) { given ( recordInProduct2 . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) ) . willReturn ( BigDecimal . TEN ) ; given ( recordOutProduct . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) ) . willReturn ( product3 ) ; given ( warehouse . getStringField ( LocationFields . NAME ) ) . willReturn ( "location" ) ; boolean enoughResources = productionTrackingValidatorsPFTD . checkResources ( productionTracking , groupedRecordInProducts , recordOutProducts ) ; "<AssertPlaceHolder>" ; } checkResources ( com . qcadoo . model . api . Entity , com . google . common . collect . Multimap , java . util . List ) { boolean enoughResources = true ; com . qcadoo . mes . materialFlowResources . helpers . NotEnoughResourcesErrorMessageHolder errorMessageHolder = notEnoughResourcesErrorMessageHolderFactory . create ( ) ; java . util . Map < com . qcadoo . model . api . Entity , java . util . Map < com . qcadoo . model . api . Entity , java . math . BigDecimal > > productsNotInStock = findProductsNotInStock ( groupedRecordInProducts ) ; for ( com . qcadoo . model . api . Entity warehouseFrom : productsNotInStock . keySet ( ) ) { for ( com . qcadoo . model . api . Entity productNotInStock : productsNotInStock . get ( warehouseFrom ) . keySet ( ) ) { boolean productInTrackingOperationProductOut = false ; for ( com . qcadoo . model . api . Entity recordOutProduct : recordOutProducts ) { if ( productNotInStock . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) . getId ( ) . equals ( recordOutProduct . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) . getId ( ) ) ) { if ( java . util . Objects . isNull ( recordOutProduct . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) ) ) { java . math . BigDecimal quantity = productNotInStock . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) . subtract ( productsNotInStock . get ( warehouseFrom ) . get ( productNotInStock ) ) ; errorMessageHolder . addErrorEntry ( productNotInStock . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) , quantity ) ; enoughResources = false ; } else if ( ( productNotInStock . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) . compareTo ( recordOutProduct . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) . add ( productsNotInStock . get ( warehouseFrom ) . get ( productNotInStock ) ) ) ) > 0 ) { java . math . BigDecimal quantity = productNotInStock . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) . subtract ( productsNotInStock . get ( warehouseFrom ) . get ( productNotInStock ) ) . subtract ( recordOutProduct . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) ) ; errorMessageHolder . addErrorEntry ( productNotInStock . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) , quantity ) ; enoughResources = false ; } productInTrackingOperationProductOut = true ; break ; } } if ( ! productInTrackingOperationProductOut ) { java . math . BigDecimal quantity = productNotInStock . getDecimalField ( TrackingOperationProductInComponentFields . USED_QUANTITY ) . subtract ( productsNotInStock . get ( warehouseFrom ) . get ( productNotInStock ) ) ; errorMessageHolder . addErrorEntry ( productNotInStock . getBelongsToField ( TrackingOperationProductInComponentFields . PRODUCT ) , quantity ) ; enoughResources = false ; } } if ( ! enoughResources ) { com . qcadoo . mes . materialFlowResources . helpers . NotEnoughResourcesErrorMessageCopyToEntityHelper . addError ( productionTracking , warehouseFrom , errorMessageHolder ) ; return false ; } } return true ; }
|
org . junit . Assert . assertEquals ( false , enoughResources )
|
shouldCalculatePercentageOfOneQuestionWithSomeWrongAnswers ( ) { java . lang . String questionId = this . addQuestion ( "lecture" , 10 ) ; for ( int i = 0 ; i < 99 ; i ++ ) { this . addAnswer ( questionId , ( "user" + i ) , 10 ) ; } this . addAnswer ( questionId , "user-with-a-wrong-answer" , 0 ) ; int expected = 99 ; int actual = lp . getCourseProgress ( null ) . getCourseProgress ( ) ; "<AssertPlaceHolder>" ; } getCourseProgress ( de . thm . arsnova . model . Room ) { this . refreshProgress ( room ) ; this . filterVariant ( ) ; return this . createCourseProgress ( ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
itShouldNotRenderUnusedLeftAndRightHistogramLevels ( ) { io . datakernel . jmx . ValueStats stats = io . datakernel . jmx . ValueStats . create ( io . datakernel . jmx . ValueStatsTest . SMOOTHING_WINDOW ) . withHistogram ( new int [ ] { 5 , 10 , 15 , 20 , 25 , 30 , 35 } ) ; stats . recordValue ( 12 ) ; stats . recordValue ( 14 ) ; stats . recordValue ( 23 ) ; java . util . List < java . lang . String > expected = asList ( "(-,<sp>10)<sp>:<sp>0" , "[10,<sp>15)<sp>:<sp>2" , "[15,<sp>20)<sp>:<sp>0" , "[20,<sp>25)<sp>:<sp>1" , "[25,<sp>+)<sp>:<sp>0" ) ; "<AssertPlaceHolder>" ; } getHistogram ( ) { if ( ( histogramLevels ) == null ) { return null ; } if ( ! ( histogramContainsValues ( ) ) ) { return null ; } int left = findLeftHistogramLimit ( ) ; int right = findRightHistogramLimit ( ) ; java . lang . String [ ] lines = new java . lang . String [ ( right - left ) + 1 ] ; java . lang . String [ ] labels = io . datakernel . jmx . ValueStats . createHistogramLabels ( histogramLevels , left , ( right - 1 ) ) ; long [ ] values = java . util . Arrays . copyOfRange ( histogramValues , left , ( right + 1 ) ) ; int maxValueStrLen = 0 ; for ( long value : histogramValues ) { java . lang . String valueStr = java . lang . Long . toString ( value ) ; if ( ( valueStr . length ( ) ) > maxValueStrLen ) { maxValueStrLen = valueStr . length ( ) ; } } java . lang . String pattern = ( "<sp>:<sp>%" + maxValueStrLen ) + "s" ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { lines [ i ] = ( labels [ i ] ) + ( java . lang . String . format ( pattern , values [ i ] ) ) ; } return asList ( lines ) ; }
|
org . junit . Assert . assertEquals ( expected , stats . getHistogram ( ) )
|
gregor_hohpe_updates ( ) { final java . lang . String rulebase = "rules/reloaded/hohpe_dynamic_discovery.prova" ; java . util . concurrent . atomic . AtomicInteger count = new java . util . concurrent . atomic . AtomicInteger ( ) ; java . util . Map < java . lang . String , java . lang . Object > globals = new java . util . HashMap < java . lang . String , java . lang . Object > ( ) ; globals . put ( "$Count" , count ) ; prova = new ws . prova . api2 . ProvaCommunicatorImpl ( test . ws . prova . test2 . ProvaUpdatesTest . kAgent , test . ws . prova . test2 . ProvaUpdatesTest . kPort , rulebase , ws . prova . api2 . ProvaCommunicatorImpl . SYNC , globals ) ; try { synchronized ( this ) { wait ( 2000 ) ; "<AssertPlaceHolder>" ; } } catch ( java . lang . Exception e ) { } } get ( ) { return count ; }
|
org . junit . Assert . assertEquals ( 1 , count . get ( ) )
|
normalizeWithReservedChar ( ) { final java . lang . String [ ] TEST_NAMES = new java . lang . String [ ] { "test?.txt" , "?test.txt" , "test.txt?" , "?test?txt?" } ; final java . lang . String [ ] EXPECTED_NAMES = new java . lang . String [ ] { "test%3F.txt" , "%3Ftest.txt" , "test.txt%3F" , "%3Ftest%3Ftxt%3F" } ; for ( int i = 0 ; i < ( TEST_NAMES . length ) ; ++ i ) { "<AssertPlaceHolder>" ; } } normalize ( java . lang . String ) { if ( name == null ) { throw new java . lang . IllegalArgumentException ( "name<sp>cannot<sp>be<sp>null" ) ; } java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; for ( char c : name . toCharArray ( ) ) { if ( org . apache . tika . io . FilenameUtils . RESERVED . contains ( c ) ) { sb . append ( '%' ) . append ( ( c < 16 ? "0" : "" ) ) . append ( java . lang . Integer . toHexString ( c ) . toUpperCase ( Locale . ROOT ) ) ; } else { sb . append ( c ) ; } } return sb . toString ( ) ; }
|
org . junit . Assert . assertEquals ( EXPECTED_NAMES [ i ] , org . apache . tika . io . FilenameUtils . normalize ( TEST_NAMES [ i ] ) )
|
testEndWithoutAcl ( ) { "<AssertPlaceHolder>" ; importer . end ( accessControlledTree ) ; } start ( org . apache . jackrabbit . oak . spi . whiteboard . Whiteboard ) { checkState ( ( ( tracker ) == ( stopped ) ) ) ; tracker = whiteboard . track ( type ) ; }
|
org . junit . Assert . assertFalse ( importer . start ( accessControlledTree ) )
|
isTaskPendingForUser_should_be_true_when_mapped_using_actor ( ) { final org . bonitasoft . engine . identity . model . SUser expectedUser = repository . add ( aUser ( ) . build ( ) ) ; org . bonitasoft . engine . actor . mapping . model . SActor actor = repository . add ( anActor ( ) . build ( ) ) ; org . bonitasoft . engine . actor . mapping . model . SActorMember actorMember = repository . add ( anActorMember ( ) . withUserId ( expectedUser . getId ( ) ) . forActor ( actor ) . build ( ) ) ; final org . bonitasoft . engine . core . process . instance . model . SPendingActivityMapping pendingActivity = repository . add ( aPendingActivityMapping ( ) . withActorId ( actor . getId ( ) ) . build ( ) ) ; boolean taskPendingForUser = repository . isTaskPendingForUser ( pendingActivity . getActivityId ( ) , expectedUser . getId ( ) ) ; "<AssertPlaceHolder>" . isTrue ( ) ; } getId ( ) { return id ; }
|
org . junit . Assert . assertThat ( taskPendingForUser )
|
testGetActiveEmrClusterIdAssertReturnActualClusterIdWhenClusterIdSpecifiedAndClusterStateActiveAndNameMatch ( ) { org . finra . herd . dao . EmrDao originalEmrDao = emrHelper . getEmrDao ( ) ; org . finra . herd . dao . EmrDao mockEmrDao = mock ( org . finra . herd . dao . EmrDao . class ) ; emrHelper . setEmrDao ( mockEmrDao ) ; try { java . lang . String emrClusterId = "emrClusterId" ; java . lang . String emrClusterName = "emrClusterName" ; java . lang . String expectedEmrClusterId = "expectedEmrClusterId" ; when ( mockEmrDao . getEmrClusterById ( any ( ) , any ( ) ) ) . thenReturn ( new com . amazonaws . services . elasticmapreduce . model . Cluster ( ) . withId ( expectedEmrClusterId ) . withName ( emrClusterName ) . withStatus ( new com . amazonaws . services . elasticmapreduce . model . ClusterStatus ( ) . withState ( ClusterState . RUNNING ) ) ) ; "<AssertPlaceHolder>" ; verify ( mockEmrDao ) . getEmrClusterById ( eq ( emrClusterId . trim ( ) ) , any ( ) ) ; verifyNoMoreInteractions ( mockEmrDao ) ; } finally { emrHelper . setEmrDao ( originalEmrDao ) ; } } getActiveEmrClusterId ( java . lang . String , java . lang . String , java . lang . String ) { boolean emrClusterIdSpecified = org . apache . commons . lang3 . StringUtils . isNotBlank ( emrClusterId ) ; boolean emrClusterNameSpecified = org . apache . commons . lang3 . StringUtils . isNotBlank ( emrClusterName ) ; org . springframework . util . Assert . isTrue ( ( emrClusterIdSpecified || emrClusterNameSpecified ) , "One<sp>of<sp>EMR<sp>cluster<sp>ID<sp>or<sp>EMR<sp>cluster<sp>name<sp>must<sp>be<sp>specified." ) ; org . finra . herd . model . dto . AwsParamsDto awsParamsDto = getAwsParamsDtoByAccountId ( accountId ) ; if ( emrClusterIdSpecified ) { java . lang . String emrClusterIdTrimmed = emrClusterId . trim ( ) ; com . amazonaws . services . elasticmapreduce . model . Cluster cluster = emrDao . getEmrClusterById ( emrClusterIdTrimmed , awsParamsDto ) ; org . springframework . util . Assert . notNull ( cluster , java . lang . String . format ( "The<sp>cluster<sp>with<sp>ID<sp>\"%s\"<sp>does<sp>not<sp>exist." , emrClusterIdTrimmed ) ) ; java . lang . String emrClusterState = cluster . getStatus ( ) . getState ( ) ; org . springframework . util . Assert . isTrue ( isActiveEmrState ( emrClusterState ) , java . lang . String . format ( "The<sp>cluster<sp>with<sp>ID<sp>\"%s\"<sp>is<sp>not<sp>active.<sp>The<sp>cluster<sp>state<sp>must<sp>be<sp>in<sp>one<sp>of<sp>%s.<sp>Current<sp>state<sp>is<sp>\"%s\"" , emrClusterIdTrimmed , java . util . Arrays . toString ( getActiveEmrClusterStates ( ) ) , emrClusterState ) ) ; if ( emrClusterNameSpecified ) { java . lang . String emrClusterNameTrimmed = emrClusterName . trim ( ) ; org . springframework . util . Assert . isTrue ( cluster . getName ( ) . equalsIgnoreCase ( emrClusterNameTrimmed ) , java . lang . String . format ( "The<sp>cluster<sp>with<sp>ID<sp>\"%s\"<sp>does<sp>not<sp>match<sp>the<sp>expected<sp>name<sp>\"%s\".<sp>The<sp>actual<sp>name<sp>is<sp>\"%s\"." , cluster . getId ( ) , emrClusterNameTrimmed , cluster . getName ( ) ) ) ; } return cluster . getId ( ) ; } else { java . lang . String emrClusterNameTrimmed = emrClusterName . trim ( ) ; com . amazonaws . services . elasticmapreduce . model . ClusterSummary clusterSummary = emrDao . getActiveEmrClusterByName ( emrClusterNameTrimmed , awsParamsDto ) ; org . springframework . util . Assert . notNull ( clusterSummary , java . lang . String . format ( "The<sp>cluster<sp>with<sp>name<sp>\"%s\"<sp>does<sp>not<sp>exist." , emrClusterNameTrimmed ) ) ; return clusterSummary . getId ( ) ; } }
|
org . junit . Assert . assertEquals ( expectedEmrClusterId , emrHelper . getActiveEmrClusterId ( emrClusterId , emrClusterName , null ) )
|
treeAwareUpdates3 ( ) { final java . lang . String doc = "<a><b/></a>" ; final org . basex . query . up . AtomicUpdateCache auc = org . basex . query . up . AtomicUpdatesTest . atomics ( doc ) ; final org . basex . query . up . MemData md = new org . basex . query . up . MemData ( context . options ) ; auc . addReplace ( 2 , org . basex . query . up . AtomicUpdatesTest . elemClip ( md , "<newb/>" , false ) ) ; auc . addInsert ( 3 , 1 , org . basex . query . up . AtomicUpdatesTest . elemClip ( md , "<d/>" , false ) ) ; "<AssertPlaceHolder>" ; query ( transform ( doc , ( "insert<sp>node<sp><d/><sp>into<sp>$input," + "replace<sp>node<sp>$input/b<sp>with<sp><newb/>" ) ) , "<a>\n<newb/>\n<d/>\n</a>" ) ; } updatesSize ( ) { flush ( ) ; return ( struct . size ( ) ) + ( val . size ( ) ) ; }
|
org . junit . Assert . assertEquals ( 2 , auc . updatesSize ( ) )
|
testGetActionInfo ( ) { com . myjeeva . digitalocean . pojo . Action action = apiClient . getActionInfo ( 28336352 ) ; "<AssertPlaceHolder>" ; log . info ( action . toString ( ) ) ; } getActionInfo ( java . lang . Integer ) { checkNullAndThrowError ( actionId , "Missing<sp>required<sp>parameter<sp>-<sp>actionId" ) ; java . lang . Object [ ] params = new java . lang . Object [ ] { actionId } ; return ( ( com . myjeeva . digitalocean . pojo . Action ) ( perform ( new com . myjeeva . digitalocean . impl . ApiRequest ( com . myjeeva . digitalocean . common . ApiAction . GET_ACTION_INFO , params ) ) . getData ( ) ) ) ; }
|
org . junit . Assert . assertNotNull ( action )
|
testIsDoubleDataRateSupportedOk ( ) { "<AssertPlaceHolder>" ; } isDoubleDataRateSupported ( ) { final java . lang . String value = this . properties . get ( org . sump . device . logicsniffer . profile . DeviceProfile . DEVICE_SUPPORTS_DDR ) ; return java . lang . Boolean . parseBoolean ( value ) ; }
|
org . junit . Assert . assertTrue ( this . profile . isDoubleDataRateSupported ( ) )
|
testGetAll ( ) { headers . delegate ( ) . add ( "header" , "value1" , "value2" ) ; "<AssertPlaceHolder>" ; } getAll ( java . lang . CharSequence ) { return new java . util . ArrayList < java . lang . CharSequence > ( delegate . getAll ( name ) ) ; }
|
org . junit . Assert . assertEquals ( java . util . Arrays . asList ( "value1" , "value2" ) , headers . getAll ( "header" ) )
|
refinementIntegerLessThan ( ) { generateDrugHierarchy ( ) ; generateDrugWithIntegerStrengthOfValueOne ( ) ; final com . b2international . index . query . Expression actual = eval ( java . lang . String . format ( "<%s:<sp>%s<sp><<sp>#1" , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT , com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . PREFERRED_STRENGTH ) ) ; final com . b2international . index . query . Expression expected = com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . and ( descendantsOf ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . DRUG_ROOT ) , ids ( com . google . common . collect . ImmutableSet . of ( com . b2international . snowowl . snomed . core . ecl . SnomedEclEvaluationRequestTest . TRIPHASIL_TABLET ) ) ) ; "<AssertPlaceHolder>" ; } of ( com . b2international . commons . exceptions . ApiError ) { return new com . b2international . snowowl . snomed . api . rest . domain . RestApiError . Builder ( error ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testService_ExecutorShutdownNow_2 ( ) { final java . lang . String MESSAGE = "Shutting<sp>down<sp>executor<sp>[" 0 ; org . apache . axis2 . jaxws . sample . parallelasync . server . AsyncService service = getService ( null ) ; org . apache . axis2 . jaxws . sample . parallelasync . server . AsyncPort port = getPort ( service ) ; java . util . concurrent . ExecutorService ex = java . util . concurrent . Executors . newSingleThreadExecutor ( ) ; service . setExecutor ( ex ) ; org . apache . axis2 . jaxws . sample . parallelasync . common . CallbackHandler < org . test . parallelasync . SleepResponse > sleepCallbackHandler1 = new org . apache . axis2 . jaxws . sample . parallelasync . common . CallbackHandler < org . test . parallelasync . SleepResponse > ( ) ; java . lang . String request1 = "sleepAsync_with_Callback_1" ; TestLogger . logger . debug ( ( ( "Request<sp>[" 1 + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 5 ) ) ; java . util . concurrent . Future < ? > sr1 = port . sleepAsync ( request1 , sleepCallbackHandler1 ) ; TestLogger . logger . debug ( ( ( "Request<sp>[" 1 + request1 ) + ",<sp>callbackHander1)<sp>#1<sp>.....submitted." ) ) ; java . lang . Thread . sleep ( 1000 ) ; TestLogger . logger . debug ( ( ( "Shutting<sp>down<sp>executor<sp>[" + ( ex . getClass ( ) . getName ( ) ) ) + "Shutting<sp>down<sp>executor<sp>[" 9 ) ) ; ex . shutdownNow ( ) ; TestLogger . logger . debug ( ( ( "port.isAsleep(" + request1 ) + ")<sp>#1<sp>being<sp>submitted...." ) ) ; java . lang . String asleepWithCallback1 = port . isAsleep ( request1 ) ; TestLogger . logger . debug ( ( ( ( ( "port.isAsleep(" + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 4 ) + asleepWithCallback1 ) + "Shutting<sp>down<sp>executor<sp>[" 9 ) ) ; TestLogger . logger . debug ( "Request<sp>[" 2 ) ; java . lang . String wake1 = port . wakeUp ( request1 ) ; TestLogger . logger . debug ( ( ( ( ( "Request<sp>[" 0 + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 4 ) + wake1 ) + "Shutting<sp>down<sp>executor<sp>[" 9 ) ) ; await ( sr1 ) ; boolean gotException = false ; try { org . test . parallelasync . SleepResponse sleepResp1 = sleepCallbackHandler1 . get ( ) ; if ( sleepResp1 != null ) { TestLogger . logger . debug ( ( ( "Request<sp>[" + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 3 ) ) ; java . lang . String result1 = sleepResp1 . getMessage ( ) ; TestLogger . logger . debug ( ( ( ( ( "Request<sp>[" + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 2 ) + result1 ) + "]<sp>" ) ) ; } else { TestLogger . logger . debug ( ( ( "Request<sp>[" + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 6 ) ) ; TestLogger . logger . debug ( ( ( "Request<sp>[" + request1 ) + "]<sp>#1:<sp>....check<sp>Future<sp>response..." ) ) ; java . lang . Object futureResult = sr1 . get ( ) ; TestLogger . logger . debug ( ( ( ( ( "Request<sp>[" + request1 ) + "Shutting<sp>down<sp>executor<sp>[" 1 ) + futureResult ) + "Shutting<sp>down<sp>executor<sp>[" 8 ) ) ; } } catch ( java . lang . Exception exc ) { TestLogger . logger . debug ( ( ( ( ( ( ( "Request<sp>[" + request1 ) + "]<sp>:<sp>got<sp>exception<sp>[" ) + ( exc . getClass ( ) . getName ( ) ) ) + "]<sp>[" ) + ( exc . getMessage ( ) ) ) + "]<sp>" ) ) ; gotException = true ; } "<AssertPlaceHolder>" ; } getMessage ( ) { return messageName ; }
|
org . junit . Assert . assertTrue ( "Shutting<sp>down<sp>executor<sp>[" 7 , gotException )
|
matchTimeOnlyTestClosedEndedIntervalRangeInclusive ( ) { org . dcm4che3 . data . Attributes testAttrs = new org . dcm4che3 . data . Attributes ( ) ; java . lang . String tmString = "121212.000-121212.999" ; java . util . List < org . dcm4chee . archive . entity . Study > studies = createTimeRangeQuery ( testAttrs , tmString ) ; "<AssertPlaceHolder>" ; } size ( ) { return locationPks . size ( ) ; }
|
org . junit . Assert . assertThat ( studies . size ( ) , org . hamcrest . CoreMatchers . is ( 1 ) )
|
invalidIntegerLengthConstraintShouldCreateViolations ( ) { java . util . Set < javax . validation . ConstraintViolation < org . alien4cloud . tosca . model . definitions . PropertyDefinition > > violations = validator . validate ( createLenghtDefinition ( ToscaTypes . INTEGER . toString ( ) , 2 ) , alien4cloud . tosca . container . validation . ToscaSequence . class ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( ( "name:<sp>[" + ( name ) ) + "],<sp>value:<sp>[" ) + ( value ) ) + "]" ; }
|
org . junit . Assert . assertEquals ( 2 , violations . size ( ) )
|
testReencodeImages ( ) { try ( javax . imageio . stream . ImageInputStream iis = javax . imageio . ImageIO . createImageInputStream ( getClassLoaderResource ( "/tiff/fivepages-scan-causingerrors.tif" ) . openStream ( ) ) ) { javax . imageio . ImageReader reader = javax . imageio . ImageIO . getImageReaders ( iis ) . next ( ) ; reader . setInput ( iis , true ) ; com . twelvemonkeys . imageio . plugins . tiff . ByteArrayOutputStream outputBuffer = new com . twelvemonkeys . imageio . plugins . tiff . ByteArrayOutputStream ( ) ; javax . imageio . ImageWriter writer = new com . twelvemonkeys . imageio . plugins . tiff . TIFFImageWriter ( new com . twelvemonkeys . imageio . plugins . tiff . TIFFImageWriterSpi ( ) ) ; java . awt . image . BufferedImage originalImage ; try ( javax . imageio . stream . ImageOutputStream output = javax . imageio . ImageIO . createImageOutputStream ( outputBuffer ) ) { writer . setOutput ( output ) ; originalImage = reader . read ( 0 ) ; javax . imageio . IIOImage outputImage = new javax . imageio . IIOImage ( originalImage , null , reader . getImageMetadata ( 0 ) ) ; writer . write ( outputImage ) ; } byte [ ] originalData = ( ( java . awt . image . DataBufferByte ) ( originalImage . getData ( ) . getDataBuffer ( ) ) ) . getData ( ) ; java . awt . image . BufferedImage reencodedImage = javax . imageio . ImageIO . read ( new com . twelvemonkeys . imageio . plugins . tiff . ByteArrayInputStream ( outputBuffer . toByteArray ( ) ) ) ; byte [ ] reencodedData = ( ( java . awt . image . DataBufferByte ) ( reencodedImage . getData ( ) . getDataBuffer ( ) ) ) . getData ( ) ; "<AssertPlaceHolder>" ; } } getData ( ) { return getResource ( "/psd/psd-jpeg-segment.bin" ) . openStream ( ) ; }
|
org . junit . Assert . assertArrayEquals ( originalData , reencodedData )
|
getHostNameReturnsHostNameIfHostNameOverridden ( ) { final com . typesafe . config . Config config = com . typesafe . config . ConfigFactory . parseMap ( java . util . Collections . singletonMap ( "host-name" , "foobar.example.net" ) ) ; final org . graylog . collector . utils . CollectorHostNameConfiguration hostNameConfiguration = new org . graylog . collector . utils . CollectorHostNameConfiguration ( config ) ; "<AssertPlaceHolder>" ; } getHostName ( ) { return hostName ; }
|
org . junit . Assert . assertEquals ( "foobar.example.net" , hostNameConfiguration . getHostName ( ) )
|
testAdditems_moreThanMax ( ) { when ( delegate . execute ( PingLevel . BASIC ) ) . thenReturn ( new nl . trifork . healthcheck . api . PingResult ( "mock" , nl . trifork . healthcheck . api . SystemStatus . OK , "nothing" ) ) ; for ( int i = 0 ; i < 15 ; i ++ ) { wrapper . execute ( ) ; } nl . trifork . healthcheck . api . PingResult [ ] items = wrapper . getItems ( ) ; "<AssertPlaceHolder>" ; } getItems ( ) { return items . toArray ( new nl . trifork . healthcheck . api . PingResult [ items . size ( ) ] ) ; }
|
org . junit . Assert . assertEquals ( 10 , items . length )
|
toJSON_axisWithUnits_TimeUnitMultiplesCorrectlySerialized ( ) { com . vaadin . addon . charts . model . YAxis yaxis = new com . vaadin . addon . charts . model . YAxis ( ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitMillisecond = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . MILLISECOND , 1 , 2 , 5 , 10 , 20 , 25 , 50 , 100 , 200 , 500 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitSecond = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . SECOND , 1 , 2 , 5 , 10 , 15 , 30 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitMinute = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . MINUTE , 1 , 2 , 5 , 10 , 15 , 30 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitHour = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . HOUR , 1 , 2 , 3 , 4 , 6 , 8 , 12 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitDay = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . DAY , 1 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitWeek = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . WEEK , 1 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitMonth = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . MONTH , 1 , 3 , 6 ) ; com . vaadin . addon . charts . model . TimeUnitMultiples unitYear = new com . vaadin . addon . charts . model . TimeUnitMultiples ( com . vaadin . addon . charts . model . TimeUnit . YEAR , null ) ; yaxis . setUnits ( unitMillisecond , unitSecond , unitMinute , unitHour , unitDay , unitWeek , unitMonth , unitYear ) ; java . lang . String expected = "{\"units\":[[\"millisecond\",[1,2,5,10,20,25,50,100,200,500]],[\"second\",[1,2,5,10,15,30]],[\"minute\",[1,2,5,10,15,30]],[\"hour\",[1,2,3,4,6,8,12]],[\"day\",[1]],[\"week\",[1]],[\"month\",[1,3,6]],[\"year\",null]]}" ; "<AssertPlaceHolder>" ; } toJSON ( com . vaadin . addon . charts . model . AbstractConfigurationObject ) { try { return com . vaadin . addon . charts . util . ChartSerialization . jsonWriter . writeValueAsString ( object ) ; } catch ( com . fasterxml . jackson . core . JsonProcessingException e ) { e . printStackTrace ( ) ; throw new java . lang . RuntimeException ( ( "Error<sp>while<sp>serializing<sp>" + ( object . getClass ( ) . getSimpleName ( ) ) ) , e ) ; } }
|
org . junit . Assert . assertEquals ( expected , toJSON ( yaxis ) )
|
testEmptyInitialization ( ) { org . databene . contiperf . WaitTimer timer = org . databene . contiperf . timer . ConstantTimer . class . newInstance ( ) ; timer . init ( new double [ 0 ] ) ; for ( int i = 0 ; i < 1000 ; i ++ ) { "<AssertPlaceHolder>" ; } } getWaitTime ( ) { return ( min ) + ( random . nextInt ( range ) ) ; }
|
org . junit . Assert . assertEquals ( 1000 , timer . getWaitTime ( ) )
|
testVerifyKeyCertificateEntry ( ) { com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator gen = new com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator ( ) ; gen . setKeyCertificateAlgorithmValuesHolder ( defaultValues ) ; com . emc . storageos . security . keystore . impl . KeyCertificateEntry entry1 = gen . generateKeyCertificatePair ( ) ; try { new com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator ( ) . verifyKeyCertificateEntry ( entry1 ) ; } catch ( com . emc . storageos . security . exceptions . SecurityException e ) { System . err . println ( e . getMessage ( ) ) ; System . err . println ( e ) ; org . junit . Assert . fail ( ) ; } catch ( com . emc . storageos . svcs . errorhandling . resources . BadRequestException e ) { System . err . println ( e . getMessage ( ) ) ; System . err . println ( e ) ; org . junit . Assert . fail ( ) ; } com . emc . storageos . security . keystore . impl . KeyCertificateEntry entry2 = gen . generateKeyCertificatePair ( ) ; com . emc . storageos . security . keystore . impl . KeyCertificateEntry hybridEntry = new com . emc . storageos . security . keystore . impl . KeyCertificateEntry ( entry1 . getKey ( ) , entry2 . getCertificateChain ( ) ) ; boolean exceptionThrown = false ; try { new com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator ( ) . verifyKeyCertificateEntry ( hybridEntry ) ; } catch ( com . emc . storageos . security . exceptions . SecurityException e ) { org . junit . Assert . fail ( ) ; } catch ( com . emc . storageos . svcs . errorhandling . resources . BadRequestException e ) { exceptionThrown = true ; } "<AssertPlaceHolder>" ; } verifyKeyCertificateEntry ( com . emc . storageos . security . keystore . impl . KeyCertificateEntry ) { java . lang . String signThis = "Sign<sp>this<sp>to<sp>verify<sp>that<sp>the<sp>key<sp>and<sp>certificate<sp>match" ; java . security . Signature signatureFactory = null ; byte [ ] signature ; java . security . PrivateKey key = null ; try { if ( ! ( ( entryToVerify . getCertificateChain ( ) [ 0 ] ) instanceof java . security . cert . X509Certificate ) ) { throw SecurityException . fatals . certificateMustBeX509 ( ) ; } java . security . cert . X509Certificate cert = ( ( java . security . cert . X509Certificate ) ( entryToVerify . getCertificateChain ( ) [ 0 ] ) ) ; key = com . emc . storageos . security . keystore . impl . KeyCertificatePairGenerator . loadPrivateKeyFromBytes ( entryToVerify . getKey ( ) ) ; signatureFactory = java . security . Signature . getInstance ( cert . getSigAlgName ( ) ) ; signatureFactory . initSign ( key ) ; signatureFactory . update ( signThis . getBytes ( ) ) ; signature = signatureFactory . sign ( ) ; signatureFactory . initVerify ( entryToVerify . getCertificateChain ( ) [ 0 ] . getPublicKey ( ) ) ; signatureFactory . update ( signThis . getBytes ( ) ) ; if ( ! ( signatureFactory . verify ( signature ) ) ) { throw APIException . badRequests . keyCertificateVerificationFailed ( ) ; } } catch ( java . security . NoSuchAlgorithmException e ) { throw APIException . badRequests . keyCertificateVerificationFailed ( e ) ; } catch ( java . security . InvalidKeyException e ) { throw APIException . badRequests . keyCertificateVerificationFailed ( e ) ; } catch ( java . security . SignatureException e ) { throw APIException . badRequests . keyCertificateVerificationFailed ( e ) ; } finally { com . emc . storageos . security . helpers . SecurityUtil . clearSensitiveData ( signatureFactory ) ; com . emc . storageos . security . helpers . SecurityUtil . clearSensitiveData ( key ) ; } }
|
org . junit . Assert . assertTrue ( exceptionThrown )
|
encodeEmpty ( ) { "<AssertPlaceHolder>" ; } encode ( java . lang . String ) { return com . github . underscore . lodash . Base32 . INSTANCE . encodeInternal ( data . getBytes ( com . github . underscore . lodash . Base32 . UTF_8 ) ) ; }
|
org . junit . Assert . assertEquals ( "" , com . github . underscore . lodash . Base32 . encode ( "" ) )
|
getNameServiceId ( ) { org . apache . hadoop . hdfs . HdfsConfiguration conf = new org . apache . hadoop . hdfs . HdfsConfiguration ( ) ; conf . set ( org . apache . hadoop . hdfs . DFSConfigKeys . DFS_NAMESERVICE_ID , "nn1" ) ; "<AssertPlaceHolder>" ; } getNamenodeNameServiceId ( org . apache . hadoop . conf . Configuration ) { return org . apache . hadoop . hdfs . DFSUtil . getNameServiceId ( conf , org . apache . hadoop . hdfs . DFSConfigKeys . DFS_NAMENODE_RPC_ADDRESS_KEY ) ; }
|
org . junit . Assert . assertEquals ( "nn1" , org . apache . hadoop . hdfs . DFSUtil . getNamenodeNameServiceId ( conf ) )
|
testSlice4 ( ) { com . ibm . wala . ipa . callgraph . AnalysisScope scope = com . ibm . wala . core . tests . slicer . SlicerTest . findOrCreateAnalysisScope ( ) ; com . ibm . wala . ipa . cha . IClassHierarchy cha = com . ibm . wala . core . tests . slicer . SlicerTest . findOrCreateCHA ( scope ) ; java . lang . Iterable < com . ibm . wala . ipa . callgraph . Entrypoint > entrypoints = com . ibm . wala . ipa . callgraph . impl . Util . makeMainEntrypoints ( scope , cha , TestConstants . SLICE4_MAIN ) ; com . ibm . wala . ipa . callgraph . AnalysisOptions options = com . ibm . wala . core . tests . callGraph . CallGraphTestUtil . makeAnalysisOptions ( scope , entrypoints ) ; com . ibm . wala . ipa . callgraph . CallGraphBuilder < com . ibm . wala . ipa . callgraph . propagation . InstanceKey > builder = com . ibm . wala . ipa . callgraph . impl . Util . makeZeroOneCFABuilder ( Language . JAVA , options , new com . ibm . wala . ipa . callgraph . AnalysisCacheImpl ( ) , cha , scope ) ; com . ibm . wala . ipa . callgraph . CallGraph cg = builder . makeCallGraph ( options , null ) ; com . ibm . wala . ipa . callgraph . CGNode main = com . ibm . wala . core . tests . slicer . SlicerTest . findMainMethod ( cg ) ; com . ibm . wala . ipa . slicer . Statement s = com . ibm . wala . core . tests . slicer . SlicerTest . findCallTo ( main , "foo" ) ; s = com . ibm . wala . examples . drivers . PDFSlice . getReturnStatementForCall ( s ) ; System . err . println ( ( "Statement:<sp>" + s ) ) ; final com . ibm . wala . ipa . callgraph . propagation . PointerAnalysis < com . ibm . wala . ipa . callgraph . propagation . InstanceKey > pointerAnalysis = builder . getPointerAnalysis ( ) ; java . util . Collection < com . ibm . wala . ipa . slicer . Statement > slice = com . ibm . wala . ipa . slicer . Slicer . computeForwardSlice ( s , cg , pointerAnalysis , DataDependenceOptions . FULL , ControlDependenceOptions . NONE ) ; com . ibm . wala . core . tests . slicer . SlicerTest . dumpSlice ( slice ) ; "<AssertPlaceHolder>" ; } toString ( ) { return ( ( super . toString ( ) ) + "<sp>v" ) + ( getValueNumber ( ) ) ; }
|
org . junit . Assert . assertEquals ( slice . toString ( ) , 4 , slice . size ( ) )
|
testParseWikipediaLinksFr ( ) { java . util . Map < java . lang . String , java . lang . String > expected = reader . readCsv ( dictionary . WikipediaLinksParserTest . SAMPLE_OUTPUT_FR ) ; java . util . Map < java . lang . String , java . lang . String > actual = wikipediaLinks . parse ( dictionary . WikipediaLinksParserTest . SAMPLE_INPUT_FR ) ; "<AssertPlaceHolder>" ; } parse ( java . lang . String ) { return parse ( new java . io . File ( path ) ) ; }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testFetchByPrimaryKeyExisting ( ) { com . liferay . blade . samples . jndiservicebuilder . model . Region newRegion = addRegion ( ) ; com . liferay . blade . samples . jndiservicebuilder . model . Region existingRegion = _persistence . fetchByPrimaryKey ( newRegion . getPrimaryKey ( ) ) ; "<AssertPlaceHolder>" ; } addRegion ( ) { long pk = com . liferay . portal . kernel . test . util . RandomTestUtil . nextLong ( ) ; com . liferay . blade . samples . jndiservicebuilder . model . Region region = _persistence . create ( pk ) ; region . setRegionName ( com . liferay . portal . kernel . test . util . RandomTestUtil . randomString ( ) ) ; _regions . add ( _persistence . update ( region ) ) ; return region ; }
|
org . junit . Assert . assertEquals ( existingRegion , newRegion )
|
hashCodeB ( ) { annis . model . TestDataObject . B b = new annis . model . TestDataObject . B ( annis . model . TestDataObject . S1 , annis . model . TestDataObject . C1 ) ; int expected = new org . apache . commons . lang3 . builder . HashCodeBuilder ( ) . append ( annis . model . TestDataObject . C1 ) . append ( annis . model . TestDataObject . S1 ) . toHashCode ( ) ; "<AssertPlaceHolder>" ; } hashCode ( ) { int hash = 5 ; hash = ( 53 * hash ) + ( ( int ) ( ( this . id ) ^ ( ( this . id ) > > > 32 ) ) ) ; return hash ; }
|
org . junit . Assert . assertThat ( b . hashCode ( ) , org . hamcrest . Matchers . is ( expected ) )
|
oneByteInt_writenAsUIntBase128_thenInputStreamReadsCorrectly ( ) { int oneByteInt = 99 ; org . mabb . fontverter . woff . WoffOutputStream out = new org . mabb . fontverter . woff . WoffOutputStream ( ) ; out . writeUIntBase128 ( oneByteInt ) ; byte [ ] data = out . toByteArray ( ) ; int readerResult = readUIntBase128 ( data ) ; "<AssertPlaceHolder>" ; } readUIntBase128 ( byte [ ] ) { org . mabb . fontverter . io . FontDataInput in = new org . mabb . fontverter . io . FontDataInputStream ( data ) ; return in . readUIntBase128 ( ) ; }
|
org . junit . Assert . assertEquals ( oneByteInt , readerResult )
|
testSingleEmptyPartition ( ) { de . hub . cs . dbis . aeolus . spouts . TestOrderedFileInputSpout spout = new de . hub . cs . dbis . aeolus . spouts . TestOrderedFileInputSpout ( ) ; backtype . storm . Config conf = new backtype . storm . Config ( ) ; conf . put ( TestOrderedFileInputSpout . NUMBER_OF_PARTITIONS , new java . lang . Integer ( 1 ) ) ; de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector col = new de . hub . cs . dbis . aeolus . testUtils . TestSpoutOutputCollector ( ) ; spout . open ( conf , mock ( backtype . storm . task . TopologyContext . class ) , new backtype . storm . spout . SpoutOutputCollector ( col ) ) ; spout . nextTuple ( ) ; spout . nextTuple ( ) ; spout . nextTuple ( ) ; "<AssertPlaceHolder>" ; } size ( ) { throw new java . lang . UnsupportedOperationException ( ) ; }
|
org . junit . Assert . assertEquals ( 0 , col . output . size ( ) )
|
checkNextStatus_ConflictingOperation ( ) { boolean isNextStatusDefined = baseProvisioningProcessor . checkNextStatus ( org . oscm . app . iaas . BaseProvisioningProcessorTest . CONTROLLER_ID , "instanceId" , FlowState . VSERVER_CREATING , paramHandler ) ; "<AssertPlaceHolder>" ; verify ( platformService , times ( 1 ) ) . lockServiceInstance ( anyString ( ) , anyString ( ) , any ( org . oscm . app . v2_0 . data . PasswordAuthentication . class ) ) ; } checkNextStatus ( java . lang . String , java . lang . String , org . oscm . app . iaas . data . FlowState , org . oscm . app . iaas . PropertyHandler ) { if ( paramHandler . isParallelProvisioningEnabled ( ) ) { return true ; } java . util . EnumSet < org . oscm . app . iaas . data . FlowState > CONFLICT_STATES = java . util . EnumSet . of ( FlowState . VSERVER_CREATING , FlowState . VSERVER_CREATED , FlowState . VSDISK_CREATING , FlowState . VSDISK_CREATED , FlowState . VSDISK_ATTACHING , FlowState . VSDISK_ATTACHED , FlowState . VSDISK_DETACHING , FlowState . VSDISK_DETACHED , FlowState . VSDISK_DELETING , FlowState . VSDISK_DESTROYED , FlowState . VSERVER_UPDATING , FlowState . VSERVER_UPDATED , FlowState . VSERVER_DELETING , FlowState . VSYSTEM_CREATING , FlowState . VSYSTEM_DELETING , FlowState . VSYSTEM_SCALE_UP , FlowState . VSYSTEM_SCALE_DOWN , FlowState . VNET_DELETING ) ; if ( CONFLICT_STATES . contains ( nextStatus ) ) { return enableExclusiveProcessing ( controllerId , instanceId , paramHandler ) ; } disableExclusiveProcessing ( controllerId , instanceId , paramHandler ) ; return true ; }
|
org . junit . Assert . assertFalse ( isNextStatusDefined )
|
convert_array_to_set_java ( ) { java . lang . String [ ] abcs = new java . lang . String [ ] { "a" , "b" , "c" , "d" } ; java . util . Set < java . lang . String > abcSet = new java . util . HashSet ( java . util . Arrays . asList ( abcs ) ) ; "<AssertPlaceHolder>" ; }
|
org . junit . Assert . assertTrue ( ( ( abcSet . size ( ) ) == 4 ) )
|
implicitlyDisabledElement_updateIsAllowedBySynchronizeProperty_updateIsDone ( ) { com . vaadin . flow . dom . Element element = com . vaadin . flow . dom . ElementFactory . createDiv ( ) ; com . vaadin . flow . component . UI ui = new com . vaadin . flow . component . UI ( ) ; ui . getElement ( ) . appendChild ( element ) ; ui . setEnabled ( false ) ; element . synchronizeProperty ( com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . TEST_PROPERTY , com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . DUMMY_EVENT , DisabledUpdateMode . ALWAYS ) ; com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . sendSynchronizePropertyEvent ( element , ui , com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . TEST_PROPERTY , com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . NEW_VALUE ) ; "<AssertPlaceHolder>" ; } getPropertyRaw ( java . lang . String ) { return getStateProvider ( ) . getProperty ( getNode ( ) , name ) ; }
|
org . junit . Assert . assertEquals ( com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . NEW_VALUE , element . getPropertyRaw ( com . vaadin . flow . server . communication . rpc . MapSyncRpcHandlerTest . TEST_PROPERTY ) )
|
testGetNameWhenUndefined ( ) { "<AssertPlaceHolder>" ; } getValue ( ) { return asString ( getNode ( ) , getPropertyKeys ( ) , com . openshift . internal . restclient . model . VALUE ) ; }
|
org . junit . Assert . assertEquals ( "" , param . getValue ( ) )
|
testRandomStrings ( ) { org . apache . parquet . column . values . deltalengthbytearray . DeltaLengthByteArrayValuesWriter writer = getDeltaLengthByteArrayValuesWriter ( ) ; org . apache . parquet . column . values . deltalengthbytearray . DeltaLengthByteArrayValuesReader reader = new org . apache . parquet . column . values . deltalengthbytearray . DeltaLengthByteArrayValuesReader ( ) ; java . lang . String [ ] values = org . apache . parquet . column . values . Utils . getRandomStringSamples ( 1000 , 32 ) ; org . apache . parquet . column . values . Utils . writeData ( writer , values ) ; org . apache . parquet . io . api . Binary [ ] bin = org . apache . parquet . column . values . Utils . readData ( reader , writer . getBytes ( ) . toInputStream ( ) , values . length ) ; for ( int i = 0 ; i < ( bin . length ) ; i ++ ) { "<AssertPlaceHolder>" ; } } fromString ( java . lang . String ) { for ( org . apache . parquet . column . ParquetProperties . WriterVersion v : org . apache . parquet . column . ParquetProperties . WriterVersion . values ( ) ) { if ( v . shortName . equals ( name ) ) { return v ; } } return org . apache . parquet . column . ParquetProperties . WriterVersion . valueOf ( name ) ; }
|
org . junit . Assert . assertEquals ( org . apache . parquet . io . api . Binary . fromString ( values [ i ] ) , bin [ i ] )
|
shouldGetAllDepartments ( ) { org . egov . infra . admin . master . entity . Department department1 = new org . egov . builder . entities . DepartmentBuilder ( ) . withName ( "test1" ) . withCode ( "test1" ) . build ( ) ; org . egov . infra . admin . master . entity . Department department2 = new org . egov . builder . entities . DepartmentBuilder ( ) . withName ( "test2" ) . withCode ( "test2" ) . build ( ) ; when ( departmentService . getAllDepartments ( ) ) . thenReturn ( java . util . Arrays . asList ( department1 , department2 ) ) ; java . util . List < org . egov . infra . admin . master . entity . Department > list = departmentService . getAllDepartments ( ) ; verify ( departmentRepository ) . findAll ( new org . springframework . data . domain . Sort ( Sort . Direction . ASC , "name" ) ) ; "<AssertPlaceHolder>" ; } size ( ) { return messages . size ( ) ; }
|
org . junit . Assert . assertEquals ( list . size ( ) , 2 )
|
testPauseJob ( ) { java . lang . String jobId = "jobId" ; org . pentaho . platform . web . http . api . resources . JobRequest mockJobRequest = mock ( org . pentaho . platform . web . http . api . resources . JobRequest . class ) ; doReturn ( jobId ) . when ( mockJobRequest ) . getJobId ( ) ; org . pentaho . platform . api . scheduler2 . Job . JobState state = Job . JobState . BLOCKED ; doReturn ( state ) . when ( schedulerResource . schedulerService ) . pauseJob ( jobId ) ; javax . ws . rs . core . Response mockResponse = mock ( javax . ws . rs . core . Response . class ) ; doReturn ( mockResponse ) . when ( schedulerResource ) . buildPlainTextOkResponse ( state . name ( ) ) ; javax . ws . rs . core . Response testResult = schedulerResource . pauseJob ( mockJobRequest ) ; "<AssertPlaceHolder>" ; verify ( schedulerResource . schedulerService , times ( 1 ) ) . pauseJob ( jobId ) ; verify ( schedulerResource , times ( 1 ) ) . buildPlainTextOkResponse ( state . name ( ) ) ; } pauseJob ( java . lang . String ) { org . pentaho . platform . api . scheduler2 . Job job = getJob ( jobId ) ; if ( ( isScheduleAllowed ( ) ) || ( org . pentaho . platform . engine . core . system . PentahoSessionHolder . getSession ( ) . getName ( ) . equals ( job . getUserName ( ) ) ) ) { getScheduler ( ) . pauseJob ( jobId ) ; } job = getJob ( jobId ) ; return job . getState ( ) ; }
|
org . junit . Assert . assertEquals ( mockResponse , testResult )
|
testSessionId ( ) { io . atomix . primitive . session . SessionId sessionId = io . atomix . primitive . session . SessionId . from ( 1 ) ; "<AssertPlaceHolder>" ; } valueOf ( int ) { return java . util . stream . Stream . of ( io . atomix . cluster . messaging . impl . ProtocolVersion . values ( ) ) . filter ( ( v ) -> ( v . version ( ) ) == version ) . findFirst ( ) . orElse ( null ) ; }
|
org . junit . Assert . assertEquals ( java . lang . Long . valueOf ( 1 ) , sessionId . id ( ) )
|
testIsShutdown ( ) { this . mockCtx . checking ( new org . jmock . Expectations ( ) { { oneOf ( workers . get ( 0 ) ) . isShutdown ( ) ; will ( returnValue ( true ) ) ; } } ) ; "<AssertPlaceHolder>" ; } isShutdown ( ) { return this . workers . get ( 0 ) . isShutdown ( ) ; }
|
org . junit . Assert . assertTrue ( this . pool . isShutdown ( ) )
|
testLoopInstructionTransaction ( ) { org . teiid . query . processor . proc . LoopInstruction loop = new org . teiid . query . processor . proc . LoopInstruction ( new org . teiid . query . processor . proc . Program ( false ) { @ org . teiid . query . optimizer . proc . Override public org . teiid . query . optimizer . proc . Boolean requiresTransaction ( boolean transactionalReads ) { return null ; } } , "x" , new org . teiid . query . processor . relational . RelationalPlan ( new org . teiid . query . processor . relational . RelationalNode ( 1 ) { @ org . teiid . query . optimizer . proc . Override protected org . teiid . common . buffer . TupleBatch nextBatchDirect ( ) throws org . teiid . common . buffer . BlockedException , org . teiid . core . TeiidComponentException , org . teiid . core . TeiidProcessingException { return null ; } @ org . teiid . query . optimizer . proc . Override public java . lang . Object clone ( ) { return null ; } } ) , "y" ) ; "<AssertPlaceHolder>" ; } requiresTransaction ( boolean ) { if ( ! ( singleResult ) ) { for ( int i = 0 ; i < ( updatePlans . length ) ; i ++ ) { java . lang . Boolean requires = updatePlans [ i ] . requiresTransaction ( transactionalReads ) ; if ( ( requires != null ) && requires ) { startTxn [ i ] = true ; } } return false ; } boolean possible = false ; for ( int i = 0 ; i < ( updatePlans . length ) ; i ++ ) { java . lang . Boolean requires = updatePlans [ i ] . requiresTransaction ( transactionalReads ) ; if ( requires != null ) { if ( requires ) { return true ; } } else { if ( possible ) { return true ; } possible = true ; } } if ( possible ) { return null ; } return false ; }
|
org . junit . Assert . assertNull ( loop . requiresTransaction ( true ) )
|
testSetSelectionIndex_IgnoredForTooSmallValue ( ) { dropDown . setItems ( org . eclipse . rap . rwt . widgets . DropDown_Test . FOUR_ITEMS ) ; dropDown . setSelectionIndex ( 2 ) ; dropDown . setSelectionIndex ( ( - 2 ) ) ; "<AssertPlaceHolder>" ; } getSelectionIndex ( ) { checkWidget ( ) ; int result = - 1 ; if ( cellSelectionEnabled ) { if ( ( selectedCells . size ( ) ) != 0 ) { result = selectedCells . get ( 0 ) . y ; } } else { if ( ( selectedItems . size ( ) ) != 0 ) { result = items . indexOf ( selectedItems . get ( 0 ) ) ; } } return result ; }
|
org . junit . Assert . assertEquals ( 2 , dropDown . getSelectionIndex ( ) )
|
testSingleItemIteratorRemoval ( ) { if ( ! ( doesCollectionsIteratorSupportRemove ( ) ) ) return ; java . util . Collection list = createEmptyCollection ( ) ; org . glassfish . hk2 . testing . collections . TestCollectionElement one = getElement ( org . glassfish . hk2 . testing . collections . AbstractCollectionTest . ONE ) ; list . add ( one ) ; java . util . Iterator iterator = list . iterator ( ) ; iterator . next ( ) ; iterator . remove ( ) ; "<AssertPlaceHolder>" ; } isEmpty ( ) { return unsortedList . isEmpty ( ) ; }
|
org . junit . Assert . assertTrue ( list . isEmpty ( ) )
|
testGetEnergyScore ( ) { org . openscience . cdk . smiles . SmilesParser sp = new org . openscience . cdk . smiles . SmilesParser ( org . openscience . cdk . DefaultChemObjectBuilder . getInstance ( ) ) ; org . openscience . cdk . interfaces . IAtomContainer target = sp . parseSmiles ( "C\\C=C/Nc1cccc(c1)N(O)\\C=C\\C\\C=C\\C=C/C" ) ; org . openscience . cdk . interfaces . IAtomContainer queryac = sp . parseSmiles ( "Nc1ccccc1" ) ; org . openscience . cdk . smsd . Isomorphism smsd1 = new org . openscience . cdk . smsd . Isomorphism ( org . openscience . cdk . smsd . interfaces . Algorithm . SubStructure , false ) ; smsd1 . init ( queryac , target , true , true ) ; smsd1 . setChemFilters ( false , false , true ) ; java . lang . Double score = 610.0 ; "<AssertPlaceHolder>" ; } getEnergyScore ( int ) { return ( ( bEnergies ) != null ) && ( ! ( bEnergies . isEmpty ( ) ) ) ? bEnergies . get ( key ) : null ; }
|
org . junit . Assert . assertEquals ( score , smsd1 . getEnergyScore ( 0 ) )
|
testDecoratorsInWebInfClasses ( ) { java . util . List < java . lang . String > expected = new java . util . ArrayList < java . lang . String > ( ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . ThirdPartyDecorator . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . GloballyEnabledDecorator1 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . ExtensionEnabledDecorator1 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . GloballyEnabledDecorator4 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . GloballyEnabledDecorator3 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . WebApplicationGlobalDecorator . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . GloballyEnabledDecorator2 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . ExtensionEnabledDecorator2 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . GloballyEnabledDecorator5 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . LegacyDecorator1 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . LegacyDecorator2 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . LegacyDecorator3 . class . getSimpleName ( ) ) ; expected . add ( org . jboss . weld . tests . decorators . ordering . global . DecoratedImpl . class . getSimpleName ( ) ) ; java . util . List < java . lang . String > actual = new java . util . ArrayList < java . lang . String > ( ) ; decorated . getSequence ( actual ) ; "<AssertPlaceHolder>" ; } getSequence ( java . lang . String ) { synchronized ( org . jboss . weld . test . util . ActionSequence . sequences ) { return org . jboss . weld . test . util . ActionSequence . sequences . get ( sequenceName ) ; } }
|
org . junit . Assert . assertEquals ( expected , actual )
|
testAssumeRule ( ) { org . apache . lucene . util . junitcompat . TestReproduceMessage . type = SoreType . ASSUMPTION ; org . apache . lucene . util . junitcompat . TestReproduceMessage . where = SorePoint . RULE ; "<AssertPlaceHolder>" ; } runAndReturnSyserr ( ) { org . junit . runner . JUnitCore . runClasses ( org . apache . lucene . util . junitcompat . TestReproduceMessageWithRepeated . Nested . class ) ; java . lang . String err = getSysErr ( ) ; return err ; }
|
org . junit . Assert . assertEquals ( "" , runAndReturnSyserr ( ) )
|
typedObjectFromDoubleAndInteger ( ) { com . pardot . rhombus . cobject . CField field = new com . pardot . rhombus . cobject . CField ( "test" , "int" ) ; double jsonValue = 1234.5678901234567 ; java . lang . Integer expected = 1234 ; java . lang . Object result = com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndField ( jsonValue , field ) ; "<AssertPlaceHolder>" ; } typedObjectFromValueAndField ( java . lang . Object , com . pardot . rhombus . cobject . CField ) { try { return com . pardot . rhombus . util . JsonUtil . typedObjectFromValueAndFieldType ( jsonValue , field . getType ( ) ) ; } catch ( java . lang . IllegalArgumentException e ) { throw new java . lang . IllegalArgumentException ( ( ( ( ( ( ( ( "Field<sp>" + ( field . getName ( ) ) ) + ":<sp>Unable<sp>to<sp>convert<sp>" ) + jsonValue ) + "<sp>of<sp>type<sp>" ) + ( jsonValue . getClass ( ) ) ) + "<sp>to<sp>C*<sp>type<sp>" ) + ( field . getType ( ) . toString ( ) ) ) ) ; } }
|
org . junit . Assert . assertEquals ( expected , result )
|
testScrollToWithThreeArguments ( ) { final elemental2 . dom . HTMLElement target = mock ( elemental2 . dom . HTMLElement . class ) ; final elemental2 . dom . HTMLElement container = mock ( elemental2 . dom . HTMLElement . class ) ; target . offsetTop = 8 ; container . offsetTop = 4 ; scrollHelper . scrollTo ( target , container , 2 ) ; final java . lang . Double expectedScrollTop = 2.0 ; final java . lang . Double actualScrollTop = container . scrollTop ; "<AssertPlaceHolder>" ; } scrollTo ( elemental2 . dom . Element , elemental2 . dom . Element , int ) { final double targetOffsetTop = ( ( elemental2 . dom . HTMLElement ) ( target ) ) . offsetTop ; final double containerOffsetTop = ( ( elemental2 . dom . HTMLElement ) ( container ) ) . offsetTop ; container . scrollTop = ( targetOffsetTop - containerOffsetTop ) - padding ; }
|
org . junit . Assert . assertEquals ( expectedScrollTop , actualScrollTop )
|
testFlow_ensure_should_return_a_promise ( ) { com . englishtown . promises . Promise < java . lang . Object > p = resolved ( null ) . ensure ( null ) ; "<AssertPlaceHolder>" ; } ensure ( java . lang . Runnable ) { if ( handler == null ) { return this ; } return this . then ( ( x ) -> { handler . run ( ) ; return this ; } , ( t ) -> { handler . run ( ) ; return this ; } ) ; }
|
org . junit . Assert . assertNotNull ( p )
|
testVisibleWhenHiddenFacetSetToAlways ( ) { testMember . addFacet ( new org . apache . isis . core . metamodel . facets . members . hidden . method . HideForContextFacetNone ( testMember ) ) ; testMember . addFacet ( new org . apache . isis . core . metamodel . facets . members . hidden . HiddenFacetAbstract ( org . apache . isis . applib . annotation . When . ALWAYS , org . apache . isis . applib . annotation . Where . ANYWHERE , testMember ) { @ org . apache . isis . core . runtime . system . Override public java . lang . String hiddenReason ( final org . apache . isis . core . metamodel . adapter . ObjectAdapter target , final org . apache . isis . applib . annotation . Where whereContext ) { return null ; } } ) ; final org . apache . isis . core . metamodel . consent . Consent visible = testMember . isVisible ( persistentAdapter , InteractionInitiatedBy . USER , Where . ANYWHERE ) ; "<AssertPlaceHolder>" ; } isAllowed ( ) { return ! ( isVetoed ( ) ) ; }
|
org . junit . Assert . assertTrue ( visible . isAllowed ( ) )
|
setWrongSubstringShouldFalseSearch ( ) { chapter1 . finaltask . SubString testContains = new chapter1 . finaltask . SubString ( ) ; java . lang . String origin = "fdfdfg" ; java . lang . String sub = "fdg" ; boolean result = testContains . contains ( origin , sub ) ; boolean testResult = false ; "<AssertPlaceHolder>" ; } contains ( java . lang . String , java . lang . String ) { char [ ] sub = subStr . toCharArray ( ) ; original = source . toCharArray ( ) ; int count = 0 ; int j = 0 ; for ( int i = 0 ; i < ( original . length ) ; i ++ ) { if ( count == ( sub . length ) ) { break ; } if ( j < ( sub . length ) ) { if ( ( original [ i ] ) == ( sub [ j ] ) ) { count ++ ; j ++ ; } else { count = 0 ; j = 0 ; } } } return count == ( sub . length ) ? true : false ; }
|
org . junit . Assert . assertThat ( result , org . hamcrest . core . Is . is ( testResult ) )
|
testGetInputStream ( ) { java . lang . String message = "message" ; org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest unit = new org . lnu . is . web . filter . logging . ResettableStreamHttpServletRequest ( request ) ; java . io . InputStream is = new java . io . ByteArrayInputStream ( message . getBytes ( ) ) ; java . io . BufferedReader reader = new java . io . BufferedReader ( new java . io . InputStreamReader ( is ) ) ; when ( request . getReader ( ) ) . thenReturn ( reader ) ; unit . setRawData ( message . getBytes ( ) ) ; javax . servlet . ServletInputStream actual = unit . getInputStream ( ) ; "<AssertPlaceHolder>" ; } getInputStream ( ) { if ( ( rawData ) == null ) { rawData = org . apache . commons . io . IOUtils . toByteArray ( this . request . getReader ( ) ) ; servletStream . stream = new java . io . ByteArrayInputStream ( rawData ) ; } return servletStream ; }
|
org . junit . Assert . assertNotNull ( actual )
|
testFilter_okMultiStatus ( ) { org . eclipse . core . runtime . IStatus multi = com . google . cloud . tools . eclipse . util . status . StatusUtil . multi ( com . google . cloud . tools . eclipse . util . status . StatusUtil . class , "test<sp>multi<sp>msg" ) ; "<AssertPlaceHolder>" ; } filter ( org . eclipse . core . runtime . IStatus ) { if ( ! ( status . isMultiStatus ( ) ) ) { return status ; } else if ( status . isOK ( ) ) { return org . eclipse . core . runtime . Status . OK_STATUS ; } org . eclipse . core . runtime . MultiStatus newStatus = new org . eclipse . core . runtime . MultiStatus ( status . getPlugin ( ) , status . getCode ( ) , status . getMessage ( ) , status . getException ( ) ) ; for ( org . eclipse . core . runtime . IStatus child : status . getChildren ( ) ) { if ( ! ( child . isOK ( ) ) ) { newStatus . add ( com . google . cloud . tools . eclipse . util . status . StatusUtil . filter ( child ) ) ; } } return newStatus ; }
|
org . junit . Assert . assertThat ( com . google . cloud . tools . eclipse . util . status . StatusUtil . filter ( multi ) , org . hamcrest . CoreMatchers . is ( org . eclipse . core . runtime . Status . OK_STATUS ) )
|
testDeleteInstanceConcurrencyNoConflict ( ) { final java . lang . String instanceId = createService ( ProvisioningStatus . WAITING_FOR_SYSTEM_MODIFICATION ) ; doReturn ( new org . oscm . provisioning . data . BaseResult ( ) ) . when ( provServiceMock ) . deleteInstance ( eq ( instanceId ) , anyString ( ) , anyString ( ) , any ( org . oscm . provisioning . data . User . class ) ) ; doReturn ( null ) . when ( controllerMock ) . deleteInstance ( anyString ( ) , any ( org . oscm . app . v2_0 . data . ProvisioningSettings . class ) ) ; final org . oscm . provisioning . data . BaseResult result = runTX ( new java . util . concurrent . Callable < org . oscm . provisioning . data . BaseResult > ( ) { @ org . oscm . app . v2_0 . service . Override public org . oscm . provisioning . data . BaseResult call ( ) { return proxy . deleteInstance ( instanceId , organizationId , subscriptionId , null ) ; } } ) ; verify ( controllerMock ) . deleteInstance ( eq ( instanceId ) , any ( org . oscm . app . v2_0 . data . ProvisioningSettings . class ) ) ; "<AssertPlaceHolder>" ; } getRc ( ) { return localRc ; }
|
org . junit . Assert . assertEquals ( 0 , result . getRc ( ) )
|
testGetBerichtViaAndereConstructor ( ) { final nl . bzk . brp . model . bericht . ber . BerichtBericht bericht = new nl . bzk . brp . model . bevraging . bijhouding . GeefDetailsPersoonBericht ( ) ; final nl . bzk . brp . business . regels . context . BerichtRegelContext berichtRegelContext = new nl . bzk . brp . business . regels . context . BerichtRegelContext ( bericht ) ; final nl . bzk . brp . model . bericht . ber . BerichtBericht berichtBericht = berichtRegelContext . getBericht ( ) ; "<AssertPlaceHolder>" ; } getBericht ( ) { return bericht ; }
|
org . junit . Assert . assertEquals ( bericht , berichtBericht )
|
pointIsEqualIfDataIsSameObject ( ) { com . rackspacecloud . blueflood . types . SimpleNumber item = new com . rackspacecloud . blueflood . types . SimpleNumber ( 42 ) ; long timestamp = 1234L ; com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > point = new com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > ( timestamp , item ) ; com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > point2 = new com . rackspacecloud . blueflood . types . Points . Point < com . rackspacecloud . blueflood . types . SimpleNumber > ( timestamp , item ) ; boolean isEqual = point . equals ( point2 ) ; "<AssertPlaceHolder>" ; } equals ( java . lang . Object ) { if ( ! ( other instanceof com . rackspacecloud . blueflood . service . SlotState ) ) { return false ; } com . rackspacecloud . blueflood . service . SlotState that = ( ( com . rackspacecloud . blueflood . service . SlotState ) ( other ) ) ; return this . toString ( ) . equals ( that . toString ( ) ) ; }
|
org . junit . Assert . assertTrue ( isEqual )
|
getMasterUrl_WhenMasterApiRootNotGivenAndPortNNotGiven_ThenProduceCorrectUrl ( ) { final com . github . ywilkof . sparkrestclient . SparkRestClient subject = new com . github . ywilkof . sparkrestclient . SparkRestClient ( ) ; subject . setMasterHost ( "host" ) ; "<AssertPlaceHolder>" ; } getMasterUrl ( ) { final java . lang . String host = com . github . ywilkof . sparkrestclient . Optional . ofNullable ( masterHost ) . filter ( ( s ) -> ! ( s . isEmpty ( ) ) ) . orElseThrow ( ( ) -> new java . lang . IllegalStateException ( "master<sp>host<sp>must<sp>be<sp>set<sp>before<sp>getting<sp>master<sp>url" ) ) ; final com . github . ywilkof . sparkrestclient . Optional < java . lang . String > maybeMasterApiRoot = com . github . ywilkof . sparkrestclient . Optional . ofNullable ( masterApiRoot ) . filter ( ( s ) -> ! ( s . isEmpty ( ) ) ) ; final com . github . ywilkof . sparkrestclient . Optional < java . lang . Integer > maybePort = com . github . ywilkof . sparkrestclient . Optional . ofNullable ( masterPort ) ; if ( ( maybeMasterApiRoot . isPresent ( ) ) && ( maybePort . isPresent ( ) ) ) { return ( ( ( host + ":" ) + ( masterPort ) ) + "/" ) + ( masterApiRoot ) ; } if ( ( ! ( maybeMasterApiRoot . isPresent ( ) ) ) && ( maybePort . isPresent ( ) ) ) { return ( host + ":" ) + ( masterPort ) ; } if ( ( maybeMasterApiRoot . isPresent ( ) ) && ( ! ( maybePort . isPresent ( ) ) ) ) { return ( host + "/" ) + ( masterApiRoot ) ; } return host ; }
|
org . junit . Assert . assertEquals ( "host" , subject . getMasterUrl ( ) )
|
doubleMapping ( ) { com . airhacks . enhydrator . in . Row input = getRow ( ) ; this . cut . addMapping ( 0 , Datatype . DOUBLE ) ; com . airhacks . enhydrator . in . Row output = this . cut . execute ( input ) ; "<AssertPlaceHolder>" ; } getColumnByIndex ( int ) { return this . columnByIndex . get ( index ) ; }
|
org . junit . Assert . assertTrue ( ( ( output . getColumnByIndex ( 0 ) . getValue ( ) ) instanceof java . lang . Double ) )
|
getL2Msg ( ) { com . github . cjm0000000 . mmt . shared . message . local . LocalMsgBean mb = msgBeanMapper . getL2Msg ( 1 , "key" ) ; "<AssertPlaceHolder>" ; } getL2Msg ( int , java . lang . String ) { return ( msgBeanMapper . getL2Msg ( cust_id , msg ) ) == null ? null : msgBeanMapper . getL2Msg ( cust_id , msg ) . getValue ( ) ; }
|
org . junit . Assert . assertNotNull ( mb )
|
getNumberSet_empty ( ) { software . amazon . awssdk . services . dynamodb . document . Item item = new software . amazon . awssdk . services . dynamodb . document . Item ( ) ; item . with ( "test" , new software . amazon . awssdk . services . dynamodb . document . utils . FluentArrayList < java . math . BigDecimal > ( ) ) ; java . util . Set < java . math . BigDecimal > ss = item . getNumberSet ( "test" ) ; "<AssertPlaceHolder>" ; } size ( ) { return map . size ( ) ; }
|
org . junit . Assert . assertTrue ( ( ( ss . size ( ) ) == 0 ) )
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.