Implemented a combine() method and added a test class.