Add unittest for sample_expected