### Question:
SecurityServiceImpl implements SecurityService { @Override public Response findAllSecurityConfig(HttpHeaders headers) { ArrayList<SecurityConfig> securityConfigs = securityRepository.findAll(); if (securityConfigs != null && !securityConfigs.isEmpty()) { return new Response<>(1, success, securityConfigs); } return new Response<>(0, "No Content", null); }  @Override Response findAllSecurityConfig(HttpHeaders headers); @Override Response addNewSecurityConfig(SecurityConfig info, HttpHeaders headers); @Override Response modifySecurityConfig(SecurityConfig info, HttpHeaders headers); @Override Response deleteSecurityConfig(String id, HttpHeaders headers); @Override Response check(String accountId, HttpHeaders headers);  }### Answer:
@Test public void testFindAllSecurityConfig1() { ArrayList<SecurityConfig> securityConfigs = new ArrayList<>(); securityConfigs.add(new SecurityConfig()); Mockito.when(securityRepository.findAll()).thenReturn(securityConfigs); Response result = securityServiceImpl.findAllSecurityConfig(headers); Assert.assertEquals(new Response<>(1, "Success", securityConfigs), result); }
@Test public void testFindAllSecurityConfig2() { Mockito.when(securityRepository.findAll()).thenReturn(null); Response result = securityServiceImpl.findAllSecurityConfig(headers); Assert.assertEquals(new Response<>(0, "No Content", null), result); }