Refactored some tests and added tests for getDetails().