Correcting failing unit test