ReportProps { @Override public boolean equals(Object o) { final ReportProps p = (ReportProps) o; return this.name.equals(p.getName()); } ReportProps(String name, Optional<String> templateLocation,
			Optional<String> datasourceKey,
			Optional<Map<String, String>> imageMapping,
			Optional<String> baseClasspathSqlScriptResources,
			Optional<String> sqlScriptFileName); @Override boolean equals(Object o); String getDatasourceKey(); Optional<Map<String, String>> getImageMapping(); String getName(); String getSqlScriptFileLocation(); String getTemplateUrl(); @Override int hashCode(); static final String DEFAULT_REPORT_TEMPLATE_LOCATION; static final String DEFAULT_BASE_CLASSPATH_SQL_SCRIPT_RESOURCES; static final String SQL_SCRIPT_FORMAT; static final String REPORT_TEMPLATE_FORMAT; static final String DEFAULT_DATASOURCE_KEY; }
@Test public void testEqualsObject() { final ReportProps other = new ReportProps(name, Optional.empty(), Optional.empty(), Optional.empty(), baseClasspathSqlScriptResources, sqlScriptFileName); final ReportProps other2 = new ReportProps(name + "others", Optional.empty(), Optional.empty(), Optional.empty(), baseClasspathSqlScriptResources, sqlScriptFileName); final boolean equals1 = sut.equals(other); final boolean equals2 = sut.equals(other2); assertTrue(equals1); assertFalse(equals2); }