AcmeUserActionRequiredException extends AcmeServerException { public AcmeUserActionRequiredException(Problem problem, @Nullable URI tosUri) { super(problem); this.tosUri = tosUri; } AcmeUserActionRequiredException(Problem problem, @Nullable URI tosUri); @Nullable URI getTermsOfServiceUri(); URL getInstance();  }
@Test public void testAcmeUserActionRequiredException() throws MalformedURLException { URI type = URI.create("urn:ietf:params:acme:error:userActionRequired"); String detail = "Accept new TOS"; URI tosUri = URI.create("http: URL instanceUrl = new URL("http: Problem problem = createProblem(type, detail, instanceUrl); AcmeUserActionRequiredException ex = new AcmeUserActionRequiredException(problem, tosUri); assertThat(ex.getType(), is(type)); assertThat(ex.getMessage(), is(detail)); assertThat(ex.getTermsOfServiceUri(), is(tosUri)); assertThat(ex.getInstance(), is(instanceUrl)); }