DAStatementWriter extends AbstractDAWriter<T> { public T end() throws IOException { commons.append(";"); commons.newLine(); return parent; } DAStatementWriter(FileContext fileContext, T parent, int indentOffset);   DAStatementWriter(CommonMethods commonMethods, T parent); DAStatementWriter<T> start(); DAStatementWriter<T> append(CharSequence s); DAStatementWriter<T> append(char c); DAStatementWriter<T> appendType(DAType type); DAStatementWriter<T> appendTypeArgs(List<DAType> typeArgs); DAStatementWriter<T> appendParamValues(@Nonnull List<DAParameter> params,
                                                @Nullable Function<DAParameter, String> parameterNameFunction); DAStatementWriter<T> appendParamValues(@Nonnull List<DAParameter> params); T end();  }
@Test public void end_returns_parent_writer() throws Exception { FileContextTestImpl fileContext = new FileContextTestImpl(); DAWriter parent = new DAWriter() { }; DAStatementWriter<DAWriter> classWriter = new DAStatementWriter<DAWriter>(fileContext, parent, 1); assertThat(classWriter.end()).isSameAs(parent); }