### Question:
LauncherConfig { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + level; result = prime * result + rate; result = prime * result + launchables.hashCode(); return result; } LauncherConfig(int level, int rate, Collection<LaunchableConfig> launchables); static List<LauncherConfig> imports(Configurer configurer); static LauncherConfig imports(Xml node); static Xml exports(LauncherConfig config); int getLevel(); int getRate(); Iterable<LaunchableConfig> getLaunchables(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static final String NODE_LAUNCHER; static final String ATT_LEVEL; static final String ATT_RATE; }### Answer:
@Test void testHashCode() { final LaunchableConfig launchable = new LaunchableConfig("media", 10, 1, 2, new Force(1.0, 2.0)); final LauncherConfig launcher = new LauncherConfig(0, 1, Arrays.asList(launchable)); assertHashEquals(launcher, launcher); assertHashEquals(launcher, new LauncherConfig(0, 1, Arrays.asList(launchable))); assertHashNotEquals(launcher, new LauncherConfig(0, 0, Arrays.asList(launchable))); assertHashNotEquals(launcher, new LauncherConfig(0, 1, new ArrayList<LaunchableConfig>())); assertHashNotEquals(launcher, new LauncherConfig(1, 0, Arrays.asList(launchable))); }