class ExecutionResultSerializer {

    public void finish()
    {
        try
        {
            ensureDocumentOpen();
            if ( currentState != State.ERRORS_WRITTEN )
            {
                errors( Collections.emptyList() );
            }
            out.writeEndObject();
            out.flush();
        }
        catch ( IOException e )
        {
            loggedIOException( e );
        }
    }

    public  ExecutionResultSerializer( OutputStream output, URI baseUri, LogProvider logProvider,
            TransitionalPeriodTransactionMessContainer container );

}