fixed client to accept various status codes
entity, collection + factory + tests