AbstractFileLineIterator implements
                                              FileLineIterator<T> { @Override public void remove() { throw new UnsupportedOperationException("remove() isn't supported."); } AbstractFileLineIterator(String fileName, Class<T> clazz,
            Map<String, ColumnParser> columnParserMap); @Override boolean hasNext(); @Override T next(); @Override void remove(); @Override void closeFile(); @Override List<String> getHeader(); @Override List<String> getTrailer(); @Override void skip(int skipLines); int getCurrentLineCount();  }
@Test public void testRemove01() throws Exception { URL url = this.getClass().getResource( "AbstractFileLineIterator_next06.txt"); String fileName = url.getPath(); Map<String, ColumnParser> columnParserMap = new HashMap<String, ColumnParser>(); columnParserMap.put("java.lang.String", new NullColumnParser()); AbstractFileLineIteratorImpl02<AbstractFileLineIterator_Stub07> fileLineIterator = new AbstractFileLineIteratorImpl02<AbstractFileLineIterator_Stub07>( fileName, AbstractFileLineIterator_Stub07.class, columnParserMap); try { fileLineIterator.remove(); fail("UnsupportedOperationExceptionがスローされませんでした。"); } catch (UnsupportedOperationException e) { assertEquals(UnsupportedOperationException.class, e.getClass()); assertEquals("remove() isn't supported.", e.getMessage()); } }