    @Test
    public void testEnable() throws Exception {

        Pin a = new Pin("P1", new TestPinCommand() {
            @Override
            public Pin.Mode getMode(Pin pin) throws PinCommandException {
                return Pin.Mode.OUT;
            }

            @Override
            public boolean read(Pin pin) throws PinCommandException {
                return true;
            }
        });
        a.write(false);

        a.disable();
        try {
            a.write(false);
            assert false;
        } catch (PinCommandException e) {
            assert true;
        }
    }