public void testAddProfile()
throws Exception
{
List installations = installationDao.getAllInstallations();
Profile newProfile = createTestProfile( "testAddProfile", "testAddProfile desc", 5, false, false,
(Installation) installations.get( 1 ), (Installation) installations
.get( 2 ) );
Profile copy = createTestProfile( newProfile );
profileDao.addProfile( newProfile );
copy.setId( newProfile.getId() );
List profiles = profileDao.getAllProfilesByName();
Profile retrievedProfile = (Profile) profiles.get( profiles.size() - 1 );
assertProfileEquals( copy, retrievedProfile );
assertInstallationEquals( testInstallationMaven20a3, retrievedProfile.getBuilder() );
assertInstallationEquals( testInstallationJava14, retrievedProfile.getJdk() );
}