Section 23. A sealer or deputy of any city or town or the deputy director or an inspector may, if he so desires, and shall, upon complaint, test the capacity of any container which is used or intended to be used as a measure under sections twenty to twenty-four, inclusive; and if the same does not conform to the law, he shall seize it and enter complaint. The deputy director may, at any time, for due cause, revoke any authority or permit granted by him to any manufacturer under said sections.