Added an assert.
Made tests pass.