@Test
public void updateStateExceptionThrownTest() {

    // Setup:
    Model state = mf.createModel();
    state.add(vf.createIRI("http://example.com"), vf.createIRI(DCTERMS.TITLE.stringValue()), vf.createLiteral("Title"));
    doThrow(new MobiException()).when(stateManager).updateState(any(Resource.class), any(Model.class));
    Response response = target().path("states/" + encode(stateId.stringValue()))
            .request().put(Entity.json(modelToJsonld(state)));
    assertEquals(response.getStatus(), 500);
}