SensorCoefficientManager { public void setURL(URL location) throws IOException { Guardian.assertNotNull("location", location); URL mapFileURL; String file = null; try { file = SystemUtils.convertToLocalPath(location.getPath() + "/" + mapFileName); mapFileURL = new URL(location.getProtocol(), location.getHost(), file); } catch (MalformedURLException e) { throw new IOException("Unable to open coefficient map file from URL '" + file + "'", e); } setLocationPath(location); try (InputStream in = mapFileURL.openStream()) { final CsvReader csvReader = new CsvReader(new InputStreamReader(in), fieldSeparators); String[] record; SensorDb sensorDb; BandDb bandDb; while ((record = csvReader.readRecord()) != null) { sensorDb = getSensorDb(record[0]); if (sensorDb == null) { sensorDb = new SensorDb(record[0]); sensors.add(sensorDb); } bandDb = new BandDb(record[1], record[2], record[3]); sensorDb.addBand(bandDb); } } } SensorCoefficientManager();  SensorCoefficientManager(URL location); void setURL(URL location); URL getCoefficientFile(String sensor, String bandName, AEROSOL_TYPE aerosolType); static final String AER_DES_NAME; static final String AER_CONT_NAME; static final String MERIS_NAME; static final String AATSR_NAME; }
@Test(expected = IllegalArgumentException.class) public void testSetURLWithNull() throws IOException { SensorCoefficientManager mgr = new SensorCoefficientManager(); mgr.setURL(null); }