Add unit test for PatternCreator class