ParameterReader { public List<String> readParameters(final String baseKey, final boolean otherRaw) { if (otherRaw) { return readParameters(baseKey + RAW_KEY); } else { return readParameters(baseKey + NON_RAW_KEY); } }  List<String> readParameters(final String baseKey, final boolean otherRaw);  }
@Test public void readParameters_invalidBasekey() { ParameterReader pr = new ParameterReader(); List<String> expectedRaw = new ArrayList<String>(); List<String> paramsRaw = pr.readParameters("invalid.key", true); assertThat(paramsRaw, is(expectedRaw)); List<String> expectedNonRaw = new ArrayList<String>(); List<String> paramsNonRaw = pr.readParameters("invalid.key", false); assertThat(paramsNonRaw, is(expectedNonRaw)); }
@Test public void readParameters_basekey1() { ParameterReader pr = new ParameterReader(); List<String> expectedRaw = Arrays.asList("-6"); List<String> paramsRaw = pr.readParameters("key1", true); assertThat(paramsRaw, is(expectedRaw)); List<String> expectedNonRaw = Arrays.asList("-6", "-T", "-o", "1", "-w"); List<String> paramsNonRaw = pr.readParameters("key1", false); assertThat(paramsNonRaw, is(expectedNonRaw)); }