Add tests for anonymous functionality