unit test for extend