RawImageReader { public String getDcrawBin() { if (dcrawBin != null) { return dcrawBin; } String dcrawEnv = System.getenv().get(DCRAW_ENV_VAR); if (dcrawEnv != null) { return dcrawEnv; } if (System.getProperty("os.name").startsWith("Windows")) { return "dcraw.exe"; } else { return "dcraw"; } } RawImageReader();  RawImageReader(String dcrawBin); String getDcrawBin(); BufferedImage read(final String file, final List<String> params); boolean canDecode(final String file); static final String DCRAW_ENV_VAR; }
@Test public void dgetDcrawBin_var() { RawImageReader r = new RawImageReader("test-path"); String dcrawBin = r.getDcrawBin(); assertEquals("test-path", dcrawBin); }