@Test public void getByPolicyIdTest() { Policy policy = getPolicy(); when(policyRepository.findByPolicyIdIgnoreCase("policyId123")).thenReturn(policy); assertThat(policyService.getByPolicyId("policyId123"), is(policy)); }
@Override public Policy getByPolicyId(String policyId) { return policyRepository.findByPolicyIdIgnoreCase(policyId); }
PolicyServiceImpl implements PolicyService, Constants { @Override public Policy getByPolicyId(String policyId) { return policyRepository.findByPolicyIdIgnoreCase(policyId); } }
PolicyServiceImpl implements PolicyService, Constants { @Override public Policy getByPolicyId(String policyId) { return policyRepository.findByPolicyIdIgnoreCase(policyId); }  }
PolicyServiceImpl implements PolicyService, Constants { @Override public Policy getByPolicyId(String policyId) { return policyRepository.findByPolicyIdIgnoreCase(policyId); }  @Override Page<Object[]> getPolicies(final int page, final int size, final String searchTerm); @Override Collection<String> getAllPolicyIds(); @Override String updatePolicies(final UpdatePolicyDetails policyDetails); @Override String createPolicies(final CreatePolicyDetails policyDetails); @Override Policy getByPolicyId(String policyId); }
PolicyServiceImpl implements PolicyService, Constants { @Override public Policy getByPolicyId(String policyId) { return policyRepository.findByPolicyIdIgnoreCase(policyId); }  @Override Page<Object[]> getPolicies(final int page, final int size, final String searchTerm); @Override Collection<String> getAllPolicyIds(); @Override String updatePolicies(final UpdatePolicyDetails policyDetails); @Override String createPolicies(final CreatePolicyDetails policyDetails); @Override Policy getByPolicyId(String policyId);  }