@After
 public void tearDown() throws Exception {
   if (policy.getId() != null) repository.deleteById(policy.getId());
   for (ComponentPolicy cpuPolicy : cpuPolicies) {
     if (cpuPolicy.getId() != null) repository.deleteComponentPolicy(cpuPolicy);
   }
 }
 @Test
 public void testDeleteById() throws Exception {
   repository.create(policy);
   repository.deleteById(policy.getId());
   policy.setId(null);
 }