Added tests for the new functionality