### Question:
DefaultProfileService implements ProfileService { public void setJdkInProfile( Profile profile, Installation jdk ) throws ProfileException { Profile stored = getProfile( profile.getId() ); stored.setJdk( jdk ); try { profileDao.updateProfile( stored ); } catch ( ContinuumStoreException e ) { throw new ProfileException( e.getMessage(), 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 testSetJdkInProfile() throws Exception { Profile profile = getProfileService().getProfile( jdk1mvn205.getId() ); getProfileService().setJdkInProfile( profile, jdk2 ); profile = getProfileService().getProfile( jdk1mvn205.getId() ); assertEquals( jdk2.getName(), profile.getJdk().getName() ); assertEquals( jdk2.getVarValue(), profile.getJdk().getVarValue() ); }