PoliciesResourceType { public static ResourceKey policyResource(final CharSequence resourcePath) { return PoliciesModelFactory.newResourceKey(POLICY, resourcePath); } private  PoliciesResourceType(); static ResourceKey policyResource(final CharSequence resourcePath); static ResourceKey thingResource(final CharSequence resourcePath); static ResourceKey messageResource(final CharSequence resourcePath); static final String POLICY; static final String THING; static final String MESSAGE; }
@Test public void tryToGetPolicyResourceWithNullResourcePath() { assertThatExceptionOfType(NullPointerException.class) .isThrownBy(() -> PoliciesResourceType.policyResource(null)) .withMessage("The %s must not be null!", "resource path") .withNoCause(); }
@Test public void policyResourceReturnsExpected() { final ResourceKey expected = createExpectedResourceKey(PoliciesResourceType.POLICY); final ResourceKey actual = PoliciesResourceType.policyResource(RESOURCE_PATH); assertThat(actual).isEqualTo(expected); }