Add unit tests for Bamboo triggering. Fixed some bugs.