Add unit test and update the README