Fixed capabilities checks in tests