### Question:
MarathonConfigProcessor { public static void compareAPILists(List<ComponentVO> oldAPIComponentVOs, List<ComponentVO> newAPIComponentVOs, int enviromentId, long regionId) throws SQLException{ logger.debug("Comparing old DB API list and new API list from marathon config"); for(ComponentVO cVo : oldAPIComponentVOs){ int compId = cVo.getComponentId(); boolean isfound = false; for(ComponentVO newCVo : newAPIComponentVOs){ if(newCVo.getComponentId() == compId){ isfound = true; break; } } if(!isfound && cVo.getDelInd() == 0){ DBQueryUtil.updateDelIndForHealthCheck(compId, 1, enviromentId, regionId); } else if(isfound && cVo.getDelInd() == 1){ DBQueryUtil.updateDelIndForHealthCheck(compId, 0, enviromentId, regionId); } } } private  MarathonConfigProcessor(); static void updateApiList(List<EnvironmentVO> environmentVOs); @SuppressWarnings("deprecation") static void updateComponentFromMarathonConfig(String json, int environmentId, long regionId); static void compareAPILists(List<ComponentVO> oldAPIComponentVOs, List<ComponentVO> newAPIComponentVOs, int enviromentId, long regionId);  }### Answer:
@Test public void compareAPILists() throws SQLException { ComponentVO cVo = new ComponentVO(); cVo.setComponentId(1); List<ComponentVO> oldCompList = new ArrayList<ComponentVO>(); List<ComponentVO> newCompList = new ArrayList<ComponentVO>(); oldCompList.add(cVo); newCompList.add(cVo); MarathonConfigProcessor.compareAPILists(oldCompList, newCompList, 2, 1); }