@Test public void testAssertNotExistsInPolicyRepositoryStringFunctionOfStringPolicy_Not_Exists() { final String policyId1 = "policyId1"; final String policyId2 = "policyId2"; final PolicyDto p1 = new PolicyDto(); p1.setId(policyId1); final PolicyDto p2 = new PolicyDto(); p2.setId(policyId2); final Function<String, Policy> policyFindFunction = s -> s .equals(policyId1) ? null : new Policy(); AssertionUtils.assertNotExistsInPolicyRepository(policyId1, policyFindFunction); }
public static void assertNotExistsInPolicyRepository( List<PolicyDto> policyDtos, Function<String, Policy> policyFindFunction) { policyDtos .stream() .map(PolicyDto::getId) .forEach( policyId -> assertNotExistsInPolicyRepository(policyId, policyFindFunction)); }
AssertionUtils { public static void assertNotExistsInPolicyRepository( List<PolicyDto> policyDtos, Function<String, Policy> policyFindFunction) { policyDtos .stream() .map(PolicyDto::getId) .forEach( policyId -> assertNotExistsInPolicyRepository(policyId, policyFindFunction)); } }
AssertionUtils { public static void assertNotExistsInPolicyRepository( List<PolicyDto> policyDtos, Function<String, Policy> policyFindFunction) { policyDtos .stream() .map(PolicyDto::getId) .forEach( policyId -> assertNotExistsInPolicyRepository(policyId, policyFindFunction)); }  }
AssertionUtils { public static void assertNotExistsInPolicyRepository( List<PolicyDto> policyDtos, Function<String, Policy> policyFindFunction) { policyDtos .stream() .map(PolicyDto::getId) .forEach( policyId -> assertNotExistsInPolicyRepository(policyId, policyFindFunction)); }  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); }
AssertionUtils { public static void assertNotExistsInPolicyRepository( List<PolicyDto> policyDtos, Function<String, Policy> policyFindFunction) { policyDtos .stream() .map(PolicyDto::getId) .forEach( policyId -> assertNotExistsInPolicyRepository(policyId, policyFindFunction)); }  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);  }