tweaked handling of logging in broker
added a couple of unittests to worker, skipped for now
added more unittests for broker