### Question:
UserProfileManager extends ApsEntityManager implements IUserProfileManager { @Override public IUserProfile getDefaultProfileType() { IUserProfile profileType = (IUserProfile) super.getEntityPrototype(SystemConstants.DEFAULT_PROFILE_TYPE_CODE); if (null == profileType) { List<String> entityTypes = new ArrayList<>(); entityTypes.addAll(this.getEntityPrototypes().keySet()); if (!entityTypes.isEmpty()) { Collections.sort(entityTypes); profileType = (IUserProfile) super.getEntityPrototype(entityTypes.get(0)); } } return profileType; }  @Override IApsEntity getEntity(String entityId); @Override IUserProfile getDefaultProfileType(); @Override IUserProfile getProfileType(String typeCode); @Override @CacheEvict(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "'UserProfile_'.concat(#username)") void addProfile(String username, IUserProfile profile); @Override @CacheEvict(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "'UserProfile_'.concat(#username)") void deleteProfile(String username); @Override @Cacheable(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "'UserProfile_'.concat(#username)") @CacheableInfo(groups = "'UserProfileTypes_cacheGroup'") IUserProfile getProfile(String username); @Override @CacheEvict(value = ICacheInfoManager.DEFAULT_CACHE_NAME, key = "'UserProfile_'.concat(#username)") void updateProfile(String username, IUserProfile profile); @Override @CacheInfoEvict(value = ICacheInfoManager.DEFAULT_CACHE_NAME, groups = "'UserProfileTypes_cacheGroup'") void removeEntityPrototype(String entityTypeCode); @Override @CacheInfoEvict(value = ICacheInfoManager.DEFAULT_CACHE_NAME, groups = "'UserProfileTypes_cacheGroup'") void updateEntityPrototype(IApsEntity entityType); void setProfileDAO(IUserProfileDAO profileDAO); void setEntitySearcherDAO(IEntitySearcherDAO entitySearcherDAO);  }### Answer:
@Test public void testGetDefaultProfileType() throws ApsSystemException { when(entityTypeFactory.extractEntityType( SystemConstants.DEFAULT_PROFILE_TYPE_CODE, UserProfile.class, configItemName, this.entityTypeDom, userProfileManager.getName(), this.entityDom)) .thenReturn(this.createFakeProfile(SystemConstants.DEFAULT_PROFILE_TYPE_CODE)); IUserProfile userProfile = userProfileManager.getDefaultProfileType(); assertThat(userProfile, is(not(nullValue()))); assertThat(userProfile.getAttributeList().size(), is(1)); }