Result { public boolean isAllowed() { return allowed; } Result(@Nonnull URI resource, boolean allowed); URI getResource(); boolean isAllowed();  }
@Test public void givenResourceAllowed_whenIsAllowed_thenReturnsTrue() { Result result = new Result(VALID_RESOURCE, true); assertThat(result.isAllowed(), equalTo(true)); }
@Test public void givenResourceDisallowed_whenIsAllowed_thenReturnsFalse() { Result result = new Result(VALID_RESOURCE, false); assertThat(result.isAllowed(), equalTo(false)); }