Add tests for extend