Task function ( Long arg0 , Long arg1 , String arg2 , String arg3 ) { Task loc0 = new Task ( ) ; loc0 . setId ( arg0 ) ; loc0 . setAssignee ( null ) ; loc0 . setCloser ( null ) ; loc0 . setCreator ( new Creator ( arg1 ) ) ; loc0 . setTitle ( arg2 ) ; loc0 . setDescription ( arg3 ) ; loc0 . setStatus ( TaskStatus . OPEN ) ; loc0 . setResolution ( null ) ; return loc0 ; }
even though this factory method helps us to hide the state and resolution of an open task , the problem is that the method still has four method parameters . nevertheless , it might make sense to use this if the method is used only by a few test classes and we do n't already a test data builder . concode_field_sep String DESCRIPTION concode_elem_sep Long ASSIGNEE_ID concode_elem_sep Long CLOSER_ID concode_elem_sep Long CREATOR_ID concode_elem_sep String TITLE concode_elem_sep Long ID concode_field_sep Task createTaskThatWasClosedAsDuplicate concode_elem_sep Task createTaskThatWasClosedAsDuplicate concode_elem_sep Task createOpenTaskThatIsAssignedToAssignee concode_elem_sep Task createOpenTaskThatIsAssignedToAssignee