### Question:
DefaultUpgradeService implements UpgradeService { protected List<UpgradeHandler> getHandlersForVersion(String version) { boolean found = MIN_SUPPORTED_VERSION.equals(version); List<UpgradeHandler> handlerList = new ArrayList<>(); for(Map.Entry<String, UpgradeHandler> entry : handlers.entrySet()) { if(entry.getKey().equals(version)) { found = true; continue; } if(!found) { continue; } handlerList.add(entry.getValue()); } return handlerList; } DefaultUpgradeService(@Inject List<UpgradeHandler> handlerList); @Override UpgradeMetaData getUpgradeType(Resource resource); @Override Resource upgradeProject(Resource resource); static final String UNKNOWN_VERSION; static final String MIN_SUPPORTED_VERSION; }### Answer:
@Test public void getHandlersForVersion() throws Exception { List<UpgradeHandler> handlers = upgradeService.getHandlersForVersion("6"); assertEquals(4, handlers.size()); handlers = upgradeService.getHandlersForVersion("9"); assertEquals(1, handlers.size()); assertEquals("10", handlers.get(0).getVersion()); }