Unit testing for agent phase 1