EngineConfig { @Override public int hashCode() { return Objects.hashCode(botId); } EngineConfig();  EngineConfig(
      String botId,
      String botName,
      String emergencyStopCurrency,
      BigDecimal emergencyStopBalance,
      int tradeCycleInterval); String getBotId(); void setBotId(String botId); String getBotName(); void setBotName(String botName); String getEmergencyStopCurrency(); void setEmergencyStopCurrency(String emergencyStopCurrency); BigDecimal getEmergencyStopBalance(); void setEmergencyStopBalance(BigDecimal emergencyStopBalance); int getTradeCycleInterval(); void setTradeCycleInterval(int tradeCycleInterval); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCodeWorksAsExpected() { final EngineConfig engineConfig1 = new EngineConfig( BOT_ID, BOT_NAME, EMERGENCY_STOP_CURRENCY, EMERGENCY_STOP_BALANCE, TRADE_CYCLE_INTERVAL); final EngineConfig engineConfig2 = new EngineConfig( "different-id", BOT_NAME, EMERGENCY_STOP_CURRENCY, EMERGENCY_STOP_BALANCE, TRADE_CYCLE_INTERVAL); final EngineConfig engineConfig3 = new EngineConfig( BOT_ID, "different-name", EMERGENCY_STOP_CURRENCY, EMERGENCY_STOP_BALANCE, TRADE_CYCLE_INTERVAL); assertEquals(engineConfig1.hashCode(), engineConfig1.hashCode()); assertNotEquals(engineConfig1.hashCode(), engineConfig2.hashCode()); assertEquals(engineConfig1.hashCode(), engineConfig3.hashCode()); }