Fix test failures in APEWebserviceTest