Write ert tests
update