GitMvResponse implements CommandResponse { @Override public String toString() { StringBuffer buffer = new StringBuffer(); if (null != source) { buffer.append("Source: "); buffer.append(source.getName()); buffer.append(" "); } if (null != destination) { buffer.append("Destination: "); buffer.append(destination.getName()); buffer.append(" "); } if ((message.length()!=0)) { buffer.append("Message: "); buffer.append(message.toString()); } return buffer.toString(); }  String getComment(); File getDestination(); File getSource(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testGitMvValidResponse() { source = fileOne; destination = fileTwo; options.setOptN(true); options.setOptF(true); try { GitMvResponse response = gitMv.mv(repoDirectory, options, source, destination); assertEquals("response", "Source: " + source.getPath() + " Destination: " + destination.getPath() + " Message: Warning: destination exists; will overwrite!", response.toString()); } catch (Exception e) { assertNull("Exception not expected", e); } source = fileOne; destination = new File("fileThree"); options.setOptN(true); try { GitMvResponse response = gitMv.mv(repoDirectory, options, source, destination); assertEquals("response", "Source: " + source.getPath() + " Destination: " + destination.getPath() + " ", response.toString()); } catch (Exception e) { assertNull("Exception not expected", e); } }