@Test public void testImmutableDate() { Date now = new Date(); RequestFirmwareUpdateCommand command = new RequestFirmwareUpdateCommand(CHARGING_STATION_ID, UPDATE_LOCATION, now, BOOT_NOTIFICATION_ATTRIBUTES, ROOT_IDENTITY_CONTEXT); command.getRetrieveDate().setTime(TWO_MINUTES_AGO.getTime()); assertEquals(now, command.getRetrieveDate()); }
public Date getRetrieveDate() { return new Date(retrieveDate.getTime()); }
RequestFirmwareUpdateCommand { public Date getRetrieveDate() { return new Date(retrieveDate.getTime()); } }
RequestFirmwareUpdateCommand { public Date getRetrieveDate() { return new Date(retrieveDate.getTime()); } RequestFirmwareUpdateCommand(ChargingStationId chargingStationId, String updateLocation, Date retrieveDate, Map<String, String> attributes, IdentityContext identityContext); }
RequestFirmwareUpdateCommand { public Date getRetrieveDate() { return new Date(retrieveDate.getTime()); } RequestFirmwareUpdateCommand(ChargingStationId chargingStationId, String updateLocation, Date retrieveDate, Map<String, String> attributes, IdentityContext identityContext); ChargingStationId getChargingStationId(); String getUpdateLocation(); Date getRetrieveDate(); Map<String, String> getAttributes(); IdentityContext getIdentityContext(); @Override int hashCode(); @Override boolean equals(Object obj); }
RequestFirmwareUpdateCommand { public Date getRetrieveDate() { return new Date(retrieveDate.getTime()); } RequestFirmwareUpdateCommand(ChargingStationId chargingStationId, String updateLocation, Date retrieveDate, Map<String, String> attributes, IdentityContext identityContext); ChargingStationId getChargingStationId(); String getUpdateLocation(); Date getRetrieveDate(); Map<String, String> getAttributes(); IdentityContext getIdentityContext(); @Override int hashCode(); @Override boolean equals(Object obj);  }