Hi Mike,
it's a good point, adressing a testing framework. I've played around with a local test-class ... (with some limited fun only) ... but for workflow it might makes some sense to create some decicated report for a repeated solution.
In that particular class, the constructor can do both: Either you feed it with a document number OR you feed it with all database tables, if the caller had already read them completly. The last one is used during ME21N, when the document is not yet written, and you still want to create an object instance :-) ... There's also a factory-method for that, which then in turns calls the constructor...
The "bad" design here, is that there's a public constructor, as the mentioned factory method is the if_workflow~find_by_lpor( ) . But the Workflow Builder requires a public constructor, otherwise it crashes badly with a short dump ... and that's ... design :-) (because an empty constructor call is executed, instead of an empty find_by_lpor() call)
Best wishes
Florin