@Test
public void testUninstall() throws EntityNotFoundException {

    EnvironmentInstance env = new EnvironmentInstance();
    ApplicationInstance app = new ApplicationInstance();
    when(environmentInstanceManager.load(any(String.class), any(String.class))).thenReturn(env);
    when(applicationInstanceManager.load(any(String.class), any(String.class))).thenReturn(app);
    Mockito.doNothing()
            .when(applicationInstanceAsyncManager)
            .uninstall(any(ClaudiaData.class), any(String.class), any(String.class), any(Task.class),
                    any(String.class));
    Task tasks = new Task();
    tasks.setStatus(TaskStates.RUNNING);
    when(taskManager.createTask(any(Task.class))).thenReturn(tasks);
    task = applicationInstanceResource.uninstall(org, vdc, "env", "APP", callback);
    assertNotNull(task);
    assertEquals(task.getStatus(), TaskStates.RUNNING);
}