AssertionUtils { public static void assertPoliciesNotEmpty(final List<Policy> policies, final String policyId, final String wildcard) { if (policies == null || policies.size() == 0) { final StringBuilder errorBuilder = new StringBuilder(); errorBuilder.append( "Policy/PolicySet cannot be found with given ID: ").append( policyId); if (StringUtils.hasText(wildcard)) { errorBuilder.append("; wildcard: ").append(wildcard); } throw new PolicyNotFoundException(errorBuilder.toString()); } }  static void assertNotExistsInPolicyRepository(
			List<PolicyDto> policyDtos,
			Function<String, Policy> policyFindFunction); static void assertNotExistsInPolicyRepository(String policyId,
			Function<String, Policy> policyFindFunction); static void assertPoliciesNotEmpty(final List<Policy> policies,
			final String policyId, final String wildcard); static void assertPolicyId(String policyId); static void assertPolicyIdConsistency(String requestPolicyId,
			final String policyContentPolicyId); static void assertPolicyNotNull(final Policy policy,
			final String policyId); static void assertUniqueIds(List<PolicyDto> policyDtos);  }
@Test public void testAssertPoliciesNotEmpty_Empty_Throws_PolicyNotFoundException() { thrown.expect(PolicyNotFoundException.class); final String policyId = "policyId"; final String wildcard = "wildcard"; final List<Policy> policies = Collections.emptyList(); AssertionUtils.assertPoliciesNotEmpty(policies, policyId, wildcard); }
@Test public void testAssertPoliciesNotEmpty_Not_Empty() { final Policy policy = new Policy(); final String policyId = "policyId"; final String wildcard = "wildcard"; final List<Policy> policies = Arrays.asList(policy); AssertionUtils.assertPoliciesNotEmpty(policies, policyId, wildcard); }