### Question:
DownloadRepositoryImpl implements DownloadRepository, Constants { @Override public List<Map<String, Object>> getFiltersFromDb(int serviceId) throws DataException { String ruleIdWithTargetTypeQuery = "SELECT serviceName,serviceEndpoint FROM pac_v2_ui_download_filters where serviceId = " + serviceId + ""; return rdsepository.getDataFromPacman(ruleIdWithTargetTypeQuery); }  @Override List<Map<String, Object>> getFiltersFromDb(int serviceId);  }### Answer:
@Test public void getFiltersFromDbTest() throws Exception{ List<Map<String, Object>> filters=new ArrayList<>(); Map<String,Object>filter=new HashMap<>(); filter.put("serviceId", "1"); filter.put("serviceName", "policyViolation"); filter.put("serviceEndpoint", "serviceEndpoint"); filters.add(filter); when( rdsepository.getDataFromPacman(anyString())).thenReturn(filters); List<Map<String,Object>>filtersfromDb= downloadRepositoryImpl.getFiltersFromDb(1); assertTrue(filtersfromDb.size()>0); }