Updated test for apply functionality