update test_guard
switch to standard test naming
move test to util
moved setup_logger code from agent; added test