ChipSystemPinCommand implements PinCommand { @Override public void write(Pin pin, boolean value) throws PinCommandException { try { if (value) RuntimeCommandExec.exec(Commands.WRITE_HIGH.command(pin)); else RuntimeCommandExec.exec(Commands.WRITE_LOW.command(pin)); } catch (RuntimeCommandException e) { throw new PinCommandException(e); } }  @Override Pin.Mode getMode(Pin pin); @Override void setMode(Pin pin, Pin.Mode mode); @Override void enable(Pin pin); @Override void disable(Pin pin); @Override boolean read(Pin pin); @Override void write(Pin pin, boolean value); @Override File path(Pin pin); static void led(boolean on);  }
@Test public void testWrite() throws Exception { try { ChipSystemPinCommand cmd = new ChipSystemPinCommand(); cmd.write(getPin(), false); assert true; } catch (PinCommandException e) { dealWithException(e); } }