ChipJavaPinCommand implements PinCommand { @Override public File path(Pin pin) { return new File(Commands.PATH.command(pin)); }  @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);  }
@Test public void testPath() throws Exception { try { ChipJavaPinCommand cmd = new ChipJavaPinCommand(); assert cmd.path(getPin()).equals("/sys/class/gpio/gpioP1"); } catch (PinCommandException e) { dealWithException(e); } }