Prepare to return StatementMock for nullifying DB write during testing

I'm attempting to mock the EntityManager so when I run unit tests on my Services, I don't want flush() to actually write to the DB.
I've narrowed down my issue to this file and this line not returning a StatementMock as a normal DriverConnection would return a Statement.