Messy stubbing out of db transactions; perhaps break down into one or more further unit tests