@Test public void testCreateRecordConversionException() { response = recordEndpoint.createRecordUsingAuthTokenWithRecord( "someToken78678567", PLACE, jsonToCreateFromConversionException); assertResponseStatusIs(Response.Status.BAD_REQUEST); }
@Test public void testCreateNonExistingRecordType() { String type = "recordType_NON_EXCISTING"; response = recordEndpoint.createRecordUsingAuthTokenWithRecord( "dummyNonAuthorizedToken", type, jsonToCreateFrom); assertResponseStatusIs(Response.Status.NOT_FOUND); }
@Test public void testCreateRecordUnauthorized() { setNotAuthorized(); response = recordEndpoint.createRecordUsingAuthTokenWithRecord( "dummyNonAuthorizedToken", PLACE, jsonToCreateFrom); assertResponseStatusIs(Response.Status.FORBIDDEN); }