@Test
public void getStateTest() {

    Response response = target().path("states/" + encode(stateId.stringValue())).request().get();
    assertEquals(response.getStatus(), 200);
    verify(stateManager).stateExistsForUser(eq(stateId), anyString());
    verify(stateManager).getState(stateId);
    try {
        String str = response.readEntity(String.class);
        assertEquals(str, modelToJsonld(stateModel));
    } catch (Exception e) {
        fail("Expected no exception, but got: " + e.getMessage());
    }
}