switch unit test to use client instead of proxy
refactor ContentFactory to simplify code and allow mimetype to be set for any content type