houseSeriesOne.setPolicyType(policyTypeHouse);
policyTypeHouse.getTypeSeries().add(houseSeriesOne);
entityManager.persist(policyTypeHouse);
for (long i = 1; i <= 5; i++) {
final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
blankPolicy.setInventoryPolicyState(BlankState.FILLED);
blankPolicy.setAgent(agent.getEmployee());
entityManager.persist(blankPolicy);
}
for (long i = 6; i <= 10; i++) {
final BlankPolicy blankPolicy = new BlankPolicy(new PolicyId(houseSeriesOne, i));
entityManager.persist(blankPolicy);
}
final Long retrivedEmptyBlankPolicyCount = policyService.checkExistanceOfEmptyPolicies(houseSeriesOne, 1, 10);
assertTrue(retrivedEmptyBlankPolicyCount == 5);