### Question:
ReportExecutionRestApi { @NotNull public ReportExecutionDescriptor requestReportExecutionDetails(@NotNull String executionId) throws IOException, HttpException { Utils.checkNotNull(executionId, "Execution id should not be null"); HttpUrl url = mNetworkClient.getBaseUrl().resolve("rest_v2/reportExecutions") .newBuilder() .addPathSegment(executionId) .build(); Request request = new Request.Builder() .addHeader("Accept", "application/json; charset=UTF-8") .get() .url(url) .build(); com.squareup.okhttp.Response response = mNetworkClient.makeCall(request); return mNetworkClient.deserializeJson(response, ReportExecutionDescriptor.class); } ReportExecutionRestApi(NetworkClient networkClient); @NotNull ReportExecutionDescriptor runReportExecution(@NotNull ReportExecutionRequestOptions executionOptions); @NotNull ReportExecutionDescriptor requestReportExecutionDetails(@NotNull String executionId); @NotNull ExecutionStatus requestReportExecutionStatus(@NotNull String executionId); boolean cancelReportExecution(@NotNull String executionId); boolean updateReportExecution(@NotNull String executionId,
                                         @NotNull List<ReportParameter> params);  }### Answer:
@Test public void executionIdShouldNotBeNullForRequestExecutionDetails() throws Exception { mExpectedException.expect(NullPointerException.class); mExpectedException.expectMessage("Execution id should not be null"); restApiUnderTest.requestReportExecutionDetails(null); }
@Test public void shouldRequestReportExecutionDetails() throws Exception { MockResponse response = MockResponseFactory.create200().setBody(reportExecutionDetailsResponse.asString()); mWebMockRule.enqueue(response); ReportExecutionDescriptor details = restApiUnderTest.requestReportExecutionDetails(EXEC_ID); assertThat(details, is(notNullValue())); RecordedRequest request = mWebMockRule.get().takeRequest(); assertThat(request, containsHeader("Accept", "application/json; charset=UTF-8")); assertThat(request, hasPath("/rest_v2/reportExecutions/f3a9805a-4089-4b53-b9e9-b54752f91586")); assertThat(request, wasMethod("GET")); }