agent manager tests rewritten with less integration.