agent: add simple tests to unit state publisher