@Test
  public void testDeleteAndLoadMemento()
      throws TimeoutException, InterruptedException, IOException {
    Entities.destroy(entity);

    BrooklynMemento reloadedMemento = loadMemento();

    assertNotNull(reloadedMemento);
    assertFalse(Iterables.contains(reloadedMemento.getEntityIds(), entity.getId()));
    assertEquals(Iterables.getOnlyElement(reloadedMemento.getLocationIds()), location.getId());
  }
Beispiel #2
0
 @AfterMethod(alwaysRun = true)
 public void tearDown() {
   if (app != null) Entities.destroy(app);
   if (managementContext instanceof ManagementContextInternal)
     ((ManagementContextInternal) managementContext).terminate();
 }