create agreement finished, with tests