### Question:
DefaultProfileService implements ProfileService { public void deleteProfile( int profileId ) throws ProfileException { try { profileDao.removeProfile( getProfile( profileId ) ); } catch ( Exception e ) { throw new ProfileException( "Cannot remove the profile", e ); } }  void updateProfile( Profile profile ); void updateProfileCheckDuplicateName( Profile profile, boolean checkDuplicateName ); Profile addProfile( Profile profile ); void deleteProfile( int profileId ); List<Profile> getAllProfiles(); Profile getProfile( int profileId ); void setBuilderInProfile( Profile profile, Installation builder ); void setJdkInProfile( Profile profile, Installation jdk ); void addEnvVarInProfile( Profile profile, Installation envVar ); void addInstallationInProfile( Profile profile, Installation installation ); void removeInstallationFromProfile( Profile profile, Installation installation ); Profile getProfileWithName( String profileName ); boolean alreadyExistsProfileName( Profile profile );  }### Answer:
@Test public void testDeleteProfile() throws Exception { Profile defaultProfile = new Profile(); defaultProfile.setName( "default profile" ); Profile getted = getProfileService().addProfile( defaultProfile ); int id = getted.getId(); assertNotNull( getProfileService().getProfile( id ) ); getProfileService().deleteProfile( id ); assertNull( getProfileService().getProfile( id ) ); }