### Question:
SurfaceConfig { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + image.hashCode(); result = prime * result + icon.hashCode(); return result; } SurfaceConfig(String image, String icon); static SurfaceConfig imports(Configurer configurer); static SurfaceConfig imports(Xml root); static Xml exports(SurfaceConfig config); String getImage(); Optional<String> getIcon(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static final String NODE_SURFACE; static final String ATT_IMAGE; static final String ATT_ICON; }### Answer:
@Test void testHashCode() { final SurfaceConfig hash = new SurfaceConfig("image", "icon"); assertHashEquals(hash, new SurfaceConfig("image", "icon")); assertHashEquals(new SurfaceConfig("image", null), new SurfaceConfig("image", null)); assertHashNotEquals(hash, new Object()); assertHashNotEquals(hash, new SurfaceConfig("", "icon")); assertHashNotEquals(hash, new SurfaceConfig("image", "")); assertHashNotEquals(new SurfaceConfig("image", "icon"), new SurfaceConfig("image", null)); assertHashNotEquals(new SurfaceConfig("image", null), new SurfaceConfig("image", "icon")); }