GaseousAbsorptionAlgo { String[] gasToComputeForBand(String bandName) { GasToCompute gasToCompute = GasToCompute.valueOf(bandName); return gasToCompute.getGasBandToCompute(); }    }
@Test public void testGetGasToComputeForABand() { assertArrayEquals(new String[]{"NO2"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_01")); assertArrayEquals(new String[]{"NO2"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_02")); assertArrayEquals(new String[]{"NO2", "H2O", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_03")); assertArrayEquals(new String[]{"O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_04")); assertArrayEquals(new String[]{"H2O", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_05")); assertArrayEquals(new String[]{"O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_06")); assertArrayEquals(new String[]{"O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_07")); assertArrayEquals(new String[]{"H2O", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_08")); assertArrayEquals(new String[]{"O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_09")); assertArrayEquals(new String[]{"H2O", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_10")); assertArrayEquals(new String[]{"H2O", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_11")); assertArrayEquals(new String[]{"O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_12")); assertArrayEquals(new String[]{"O2", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_13")); assertArrayEquals(new String[]{"O2", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_14")); assertArrayEquals(new String[]{"O2", "O3"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_15")); assertArrayEquals(new String[]{"O2", "O3", "H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_16")); assertArrayEquals(new String[]{"H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_17")); assertArrayEquals(new String[]{"H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_18")); assertArrayEquals(new String[]{"H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_19")); assertArrayEquals(new String[]{"H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_20")); assertArrayEquals(new String[]{"H2O"}, gaseousAbsorptionAlgo.gasToComputeForBand("gaseous_absorp_21")); }
@Test(expected = IllegalArgumentException.class) public void testGasToComputeDoesNotExist() { assertArrayEquals(null, gaseousAbsorptionAlgo.gasToComputeForBand("dummy1")); }