### Question:
PhylipReader extends AbstractSpectreReader { @Override public DistanceMatrix readDistanceMatrix(File file) throws IOException { if (file == null) { throw new NullPointerException("Must specify a phylip file to read"); } if (!file.exists()) { throw new IOException("Phylip file does not exist: " + file.getAbsolutePath()); } if (!file.canRead()) { throw new IOException("Phylip file cannot be read: " + file.getAbsolutePath()); } List<String> inLines = FileUtils.readLines(file, "UTF-8"); return alternativeParser(inLines); }  @Override DistanceMatrix readDistanceMatrix(File file); @Override String[] commonFileExtensions(); @Override String getIdentifier(); @Override boolean acceptsDataType(SpectreDataType spectreDataType);  }### Answer:
@Test public void testPhylipReader() throws IOException { File testFile = FileUtils.toFile(PhylipReaderTest.class.getResource("/colors.phy")); DistanceMatrix distanceMatrix = new PhylipReader().readDistanceMatrix(testFile); assertTrue(distanceMatrix.size() == 10); }
@Test public void testMultiLine() throws IOException { File testFile = FileUtils.toFile(PhylipReaderTest.class.getResource("/multi-line.phy")); DistanceMatrix distanceMatrix = new PhylipReader().readDistanceMatrix(testFile); assertTrue(distanceMatrix.size() == 25); }