Add unittest for binary type