Refactor and improve tests for Cylon.IO.DigitalPin