public List<DirtyBicycle> getDirtyBicycles(final Year year, final String file) throws PriceReaderException { List<DirtyBicycle> toReturn = new ArrayList<DirtyBicycle>(); HSSFSheet sheet = getSheet(file, 0); List<PriceRow> rows = getPriceRows(sheet, Brand.STELS); for (PriceRow row : rows) { String dirtyName = row.getModelName().trim(); List<SimpleBicycle> km; if (year.equals(Year.YEAR_2016)) { km = knownModels; } else if (year.equals(Year.YEAR_2015)) { km = knownModels2015; } else { LOGGER.error("YEAR is not defined"); return Collections.emptyList(); } for (SimpleBicycle simpleBicycle : km) { if (simpleBicycle.getDirtyModel().equals(dirtyName.trim())) { DirtyBicycle bicycle = new DirtyBicycle(simpleBicycle); bicycle.setPrice(getRoundedPrice(row.getRetailPrice())); bicycle.setDescription(row.getDescription()); bicycle.setProdCode(CodeGenerator.generateCode(bicycle)); toReturn.add(bicycle); } } } return toReturn; }