PlainFileLineIterator extends AbstractFileLineIterator<Object> { @Override public String[] separateColumns(String fileLineString) { throw new UnsupportedOperationException("separateColumns(String) isn't supported."); } @SuppressWarnings("unchecked")  PlainFileLineIterator(String fileName,
            @SuppressWarnings("rawtypes") Class clazz,
            Map<String, ColumnParser> columnParserMap); @Override String[] separateColumns(String fileLineString); @Override String next(); void skip(int skipLines); @Override List<String> getTrailer(); @Override char getDelimiter(); @Override char getEncloseChar(); @Override int getCurrentLineCount();  }
@Test public void testSeparateColumns01() throws Exception { URL url = this.getClass().getResource("PlainFileLineIterator01.txt"); String fileName = url.getPath(); Class<PlainFileLineIterator_Stub01> clazz = PlainFileLineIterator_Stub01.class; Map<String, ColumnParser> columnParserMap = new HashMap<String, ColumnParser>(); columnParserMap.put("java.lang.String", new NullColumnParser()); PlainFileLineIterator plainFileLineIterator = new PlainFileLineIterator(fileName, clazz, columnParserMap); String fileLineString = "aaa"; try { plainFileLineIterator.separateColumns(fileLineString); fail("UnSupportedOperationExceptionがスローされませんでした"); } catch (UnsupportedOperationException e) { assertSame(UnsupportedOperationException.class, e.getClass()); assertEquals("separateColumns(String) isn't supported.", e .getMessage()); } }