private void expectTokenForReadListToPrefereblyBeHeaderThanQuery( String headerAuthToken, String queryAuthToken, String authTokenExpected) { SpiderInstanceFactorySpy factorySpy = setupInstanceProviderWithFactorySpy(); response = recordEndpoint.readRecordList(headerAuthToken, queryAuthToken, PLACE); SpiderRecordListReaderSpy spiderListReaderSpy = factorySpy.spiderRecordListReaderSpy; assertEquals(spiderListReaderSpy.authToken, authTokenExpected); }
@Test public void testReadRecordListNotFound() { response = recordEndpoint.readRecordList(AUTH_TOKEN, AUTH_TOKEN, "place_NOT_FOUND"); assertResponseStatusIs(Response.Status.NOT_FOUND); }
@Test public void testReadRecordList() { response = recordEndpoint.readRecordList(AUTH_TOKEN, AUTH_TOKEN, PLACE); assertEntityExists(); assertResponseStatusIs(Response.Status.OK); }