KeyValueFileReader { public String[] loadKeyValues() throws IOException { List<String> result = new LinkedList<String>(); try { String line; while ((line = reader.readLine()) != null) { result.add(line); } } finally { cleanup(); } return result.toArray(new String[0]); } KeyValueFileReader(final File keyValueFile); String[] loadKeyValues();  }
@Test public final void testLoadKeyValues() throws IOException { File file = dataUtils.createDataFile("v0_6/allowed-key-values.txt"); String[] expected = {"box_type.lamp_box", "box_type.wall"}; String[] actual = new KeyValueFileReader(file).loadKeyValues(); Assert.assertArrayEquals(expected, actual); }