Refactored DocumentEntityTest