Add tests for the new assignment method