use of com.auth0.json.mgmt.logevents.LogEvent in project auth0-java by auth0.
the class LogEventsEntityTest method shouldGetLogEvent.
@Test
public void shouldGetLogEvent() throws Exception {
Request<LogEvent> request = api.logEvents().get("1");
assertThat(request, is(notNullValue()));
server.jsonResponse(MGMT_LOG_EVENT, 200);
LogEvent response = request.execute();
RecordedRequest recordedRequest = server.takeRequest();
assertThat(recordedRequest, hasMethodAndPath("GET", "/api/v2/logs/1"));
assertThat(recordedRequest, hasHeader("Content-Type", "application/json"));
assertThat(recordedRequest, hasHeader("Authorization", "Bearer apiToken"));
assertThat(response, is(notNullValue()));
}
Aggregations