Finish adding unit tests