### Question:
PatchingRepositoryImpl implements PatchingRepository, Constants { @Override public List<Map<String, Object>> getExecAndDirectorInfo() throws DataException { try{ return elasticSearchRepository .getSortedDataFromES("aws_apps", "apps", null, null, null, Arrays.asList("appTag", DIRECTOR, EXCUTIVE_SPONSOR), null, null); } catch(Exception e){ throw new DataException(e); } }  @Override List<Map<String, Object>> getPatchingProgress(String assetGroup,
            LocalDate startDate, LocalDate endDate); @Override List<Map<String, Object>> getIssueInfo(String assetGroup); List<Map<String, Object>> getClosedIssueInfo(String assetGroup,
            int size); @Override List<Map<String, Object>> getInstanceInfo(String assetGroup,
            Map<String, String> filters); @Override List<Map<String, Object>> getExecAndDirectorInfo(); @Override long getInstanceInfoCount(String assetGroup,
            Map<String, String> filters, String searchText); @Override String getAmilAvailDate(int year, int quarter); @Override int getPatchingWindow(); @Override Map<String, Long> getQuartersWithPatchingData(String assetGroup); Map<String, Object> addParentConditionPatching(String targetType); @Override List<Map<String, Object>> getOnpremIssueInfo(String assetGroup); @Override List<Map<String, Object>> getOnpremResourceInfo(String assetGroup,
            Map<String, String> filters); @Override Map<String, Object> getDirectorsAndExcutiveSponsers(String appTag,
            String appType); @Override Map<String, Long> getNonCompliantNumberForAgAndResourceType(
            String assetGroup, String resourceType); @Override List<Map<String, Object>> getPatchingPercentForDateRange(String assetGroup, LocalDate fromDate,
			LocalDate toDate);  }### Answer:
@Test public void getExecAndDirectorInfoTest() throws Exception { List<Map<String, Object>> executvesAndDirectorsInfo = new ArrayList<>(); Map<String, Object> executiveInfo = new HashMap<>(); executiveInfo.put("apptag", "app1"); executiveInfo.put("executive", "Mark"); executiveInfo.put("director", "Mats"); executvesAndDirectorsInfo.add(executiveInfo); when( elasticSearchRepository.getSortedDataFromES(anyString(), anyString(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject())).thenReturn(executvesAndDirectorsInfo); patchingRepositoryImpl.getExecAndDirectorInfo(); when( elasticSearchRepository.getSortedDataFromES(anyString(), anyString(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject(), anyObject())).thenThrow(new RuntimeException()); assertThatThrownBy(() -> patchingRepositoryImpl.getExecAndDirectorInfo()).isInstanceOf(DataException.class); }