agent: expand test coverage of UnitStatePublisher, fix clock