test register & de-register a device