DSpaceCommandLineParameter { @Override public boolean equals(Object other) { if (other == null) { return false; } if (other.getClass() != DSpaceCommandLineParameter.class) { return false; } return StringUtils.equals(this.getName(), ((DSpaceCommandLineParameter) other).getName()) && StringUtils .equals(this.getValue(), ((DSpaceCommandLineParameter) other).getValue()); } DSpaceCommandLineParameter(String key, String value); protected  DSpaceCommandLineParameter(String parameter); String getName(); void setName(String key); String getValue(); void setValue(String value); String toString(); static String concatenate(List<DSpaceCommandLineParameter> parameterList); @Override boolean equals(Object other); @Override int hashCode(); static String SEPARATOR; }
@Test public void equalsTest() { String key = "-c"; String value = "test"; DSpaceCommandLineParameter dSpaceCommandLineParameter = new DSpaceCommandLineParameter(key, value); DSpaceCommandLineParameter dSpaceCommandLineParameter1 = new DSpaceCommandLineParameter(key, value); assertThat("toStringTest 0", dSpaceCommandLineParameter.getName(), equalTo(key)); assertThat("toStringTest 1", dSpaceCommandLineParameter.getValue(), equalTo(value)); assertThat("toStringTest 0", dSpaceCommandLineParameter1.getName(), equalTo(key)); assertThat("toStringTest 1", dSpaceCommandLineParameter1.getValue(), equalTo(value)); assertTrue(dSpaceCommandLineParameter.equals(dSpaceCommandLineParameter1)); }