fixed unit tests with ajax handler