Added a test case of method buildPattern. Added two methods ruleBasedLearn and doIt (not finished yet).