Judge issues writ of mandamus