@Test
public void deleteStateExceptionThrownTest() {

    // Setup:
    doThrow(new MobiException()).when(stateManager).deleteState(any(Resource.class));
    Response response = target().path("states/" + encode(stateId.stringValue()))
            .request().delete();
    assertEquals(response.getStatus(), 500);
}