### Question:
DefaultProfileService implements ProfileService { public void updateProfile( Profile profile ) throws ProfileException, AlreadyExistsProfileException { if ( alreadyExistsProfileName( profile ) ) { throw new AlreadyExistsProfileException( "profile with name " + profile.getName() + " already exists" ); } try { Profile stored = getProfile( profile.getId() ); stored.setActive( profile.isActive() ); stored.setBuilder( profile.getBuilder() ); stored.setBuildWithoutChanges( profile.isBuildWithoutChanges() ); stored.setDescription( profile.getDescription() ); stored.setJdk( profile.getJdk() ); stored.setName( profile.getName() ); stored.setEnvironmentVariables( profile.getEnvironmentVariables() ); stored.setBuildAgentGroup( profile.getBuildAgentGroup() ); 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 testUpdateProfile() throws Exception { Profile profile = getProfileService().getProfile( jdk1mvn205.getId() ); assertEquals( jdk1mvn205Name, profile.getName() ); String newName = "new name"; profile.setName( newName ); getProfileService().updateProfile( profile ); Profile getted = getProfileService().getProfile( jdk1mvn205.getId() ); assertNotNull( getted ); assertEquals( newName, getted.getName() ); }