@Test(dependsOnMethods = "applyPolicy")
public void addProfile() throws Exception{

    int tenantId = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantId();
    profile = new Profile();
    profile.setTenantId(tenantId);
    profile.setCreatedDate(new Timestamp(System.currentTimeMillis()));
    profile.setDeviceType(DEVICE_TYPE_A);
    List<ProfileFeature> profileFeatures = new ArrayList<ProfileFeature>();
    ProfileFeature profileFeature = new ProfileFeature();
    profileFeature.setContent("{'enable':'true'}");
    profileFeature.setDeviceType(DEVICE_TYPE_A);
    profileFeature.setFeatureCode(POLICY1_FEATURE1_CODE);
    profileFeatures.add(profileFeature);
    profile.setProfileFeaturesList(profileFeatures);
    profile.setProfileName("tp_profile2");
    profile.setUpdatedDate(new Timestamp(System.currentTimeMillis()));
    Profile profile1 = policyManagerService.addProfile(profile);
    Assert.assertNotNull(profile1);
    Assert.assertEquals("tp_profile2",profile1.getProfileName());
}