@Test
public void deleteInstance(@Mocked final PriamInstance instance) {

    new Expectations() {
        {
            config.getAppName();
            result = APP_NAME;
            factory.getInstance(APP_NAME, instanceInfo.getRegion(), NODE_ID);
            result = instance;
            factory.delete(instance);
        }
    };
    Response response = resource.deleteInstance(NODE_ID);
    assertEquals(204, response.getStatus());
}