@Test(expected = IllegalArgumentException.class) public void testIllegalProductType() { provider.getCentralWavelength("MER_TT"); }
public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); void readAuxData(File auxDataDir); void readCW(InputStream inputStream); float[] getCentralWavelength(final String productType); }
CentralWavelengthProvider { public float[] getCentralWavelength(final String productType) { if (productType.startsWith("MER_RR")) { return centralWavelenthRr; } else if (productType.startsWith("MER_F")) { return generateCentralWavelengthFr(); } else { throw new IllegalArgumentException("'The product has an unsupported product type: " + productType); } } CentralWavelengthProvider(); void readAuxData(File auxDataDir); void readCW(InputStream inputStream); float[] getCentralWavelength(final String productType);  }