refactor raw and object tests