Transaction observer implementation, tests and transaction factory