Refactored the test and added details to the README