RpcSystemFileCommandsHelper extends SymbolicLinkHelper { @Override public boolean setWritable(String fileName, boolean writable) { return new File(fileName).setWritable(writable); }  @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 setWritable() throws Exception { boolean setWritable = rpcSystemFileCommandsHelper.setWritable(mockFile.toString(), true); assertThat(setWritable, is(true)); setWritable = rpcSystemFileCommandsHelper.setWritable(mockFile.toString(), false); assertThat(setWritable, is(true)); setWritable = rpcSystemFileCommandsHelper.setWritable(noExistFileName, true); assertThat(setWritable, is(false)); }