RpcSystemFileCommandsHelper extends SymbolicLinkHelper { @Override public boolean canExecute(String fileName) { return Files.isExecutable(Paths.get(fileName)); }  @Override boolean setWritable(String fileName, boolean writable); @Override boolean setReadable(String fileName, boolean readable, boolean ownerOnly); @Override boolean setOwnerReadOnly(String fileName); @Override boolean setExecutable(String fileName, boolean executable, boolean ownerOnly); @Override boolean canExecute(String fileName); @Override boolean isSymlink(String fileName);  }
@Test public void canExecute() throws Exception { boolean canExecute = rpcSystemFileCommandsHelper.canExecute(mockFile.toString()); assertThat(canExecute, is(true)); canExecute = rpcSystemFileCommandsHelper.canExecute(noExistFileName); assertThat(canExecute, is(false)); }