added unit test for the extend method