TODO: debug this unit test at a later date