added JUnit tests for tag detector/generator methods