Added proper test for HMM building