AbstractFileLineWriter implements FileLineWriter<T> { protected Method[] getMethods() { return methods; } AbstractFileLineWriter(String fileName, Class<T> clazz,
            Map<String, ColumnFormatter> columnFormatterMap); @Override void printHeaderLine(List<String> headerLine); @Override void printDataLine(T t); @Override void printTrailerLine(List<String> trailerLine); @Override void closeFile(); String getFileName(); void setColumnFormatterMap(
            Map<String, ColumnFormatter> columnFormatterMap); abstract char getDelimiter(); abstract char getEncloseChar();  }
@Test public void testGetMethods01() throws Exception { String fileName = "fileName"; Class<AbstractFileLineWriter_Stub01> clazz = AbstractFileLineWriter_Stub01.class; Map<String, ColumnFormatter> columnFormatterMap = new HashMap<String, ColumnFormatter>(); columnFormatterMap.put("int", new IntColumnFormatter()); columnFormatterMap.put("java.lang.String", new NullColumnFormatter()); AbstractFileLineWriter<AbstractFileLineWriter_Stub01> fileLineWriter = new AbstractFileLineWriterImpl01<AbstractFileLineWriter_Stub01>(fileName, clazz, columnFormatterMap); Method[] methods = new Method[] { null, null, null }; ReflectionTestUtils.setField(fileLineWriter, "methods", methods); Method[] result = fileLineWriter.getMethods(); assertNotNull(result); assertSame(methods, result); }