### Question:
ReportOptionRestApi { public void deleteReportOption( @Nullable String reportUnitUri, @Nullable String optionId) throws IOException, HttpException { Utils.checkNotNull(reportUnitUri, "Report uri should not be null"); Utils.checkNotNull(optionId, "Option id should not be null"); HttpUrl url = new PathResolver.Builder() .addPath("rest_v2") .addPath("reports") .addPaths(reportUnitUri) .addPath("options") .addPath(optionId) .build() .resolve(mNetworkClient.getBaseUrl()); Request request = new Request.Builder() .addHeader("Accept", "application/json; charset=UTF-8") .delete() .url(url) .build(); mNetworkClient.makeCall(request); } ReportOptionRestApi(NetworkClient networkClient); @NotNull Set<ReportOptionEntity> requestReportOptionsList(
            @NotNull String reportUnitUri); @NotNull ReportOptionEntity createReportOption(
            @NotNull String reportUnitUri,
            @NotNull String optionLabel,
            @NotNull List<ReportParameter> parameters,
            boolean overwrite); void updateReportOption(
            @NotNull String reportUnitUri,
            @NotNull String optionId,
            @NotNull List<ReportParameter> parameters); void deleteReportOption(
            @Nullable String reportUnitUri,
            @Nullable String optionId);  }### Answer:
@Test public void deleteReportOptionShouldNotAllowNullReportUri() throws Exception { mExpectedException.expect(NullPointerException.class); mExpectedException.expectMessage("Report uri should not be null"); restApiUnderTest.deleteReportOption(null, "option_id"); }
@Test public void deleteReportOptionShouldNotAllowNullOptionId() throws Exception { mExpectedException.expect(NullPointerException.class); mExpectedException.expectMessage("Option id should not be null"); restApiUnderTest.deleteReportOption("any_id", null); }
@Test public void apiShouldDeleteReportOption() throws Exception { mWebMockRule.enqueue(MockResponseFactory.create200()); restApiUnderTest.deleteReportOption("/any/uri", "option_id"); RecordedRequest request = mWebMockRule.get().takeRequest(); assertThat(request.getPath(), is("/rest_v2/reports/any/uri/options/option_id")); assertThat(request.getMethod(), is("DELETE")); }
@Test public void deleteReportOptionShouldThrowRestErrorFor500() throws Exception { mExpectedException.expect(HttpException.class); mWebMockRule.enqueue(MockResponseFactory.create500()); restApiUnderTest.deleteReportOption("any_id", "option_id"); }