@Test public void testImmutableDate() { Date now = new Date(); TransactionStoppedEvent event = new TransactionStoppedEvent(CHARGING_STATION_ID, TRANSACTION_ID, IDENTIFYING_TOKEN, METER_STOP, now, NULL_USER_IDENTITY_CONTEXT); event.getTimestamp().setTime(TWO_MINUTES_AGO.getTime()); assertEquals(now, event.getTimestamp()); }
public Date getTimestamp() { return new Date(timestamp.getTime()); }
TransactionStoppedEvent { public Date getTimestamp() { return new Date(timestamp.getTime()); } }
TransactionStoppedEvent { public Date getTimestamp() { return new Date(timestamp.getTime()); } TransactionStoppedEvent(ChargingStationId chargingStationId, TransactionId transactionId, IdentifyingToken identifyingToken, int meterStop, Date timestamp, IdentityContext identityContext); }
TransactionStoppedEvent { public Date getTimestamp() { return new Date(timestamp.getTime()); } TransactionStoppedEvent(ChargingStationId chargingStationId, TransactionId transactionId, IdentifyingToken identifyingToken, int meterStop, Date timestamp, IdentityContext identityContext); ChargingStationId getChargingStationId(); TransactionId getTransactionId(); IdentifyingToken getIdTag(); int getMeterStop(); Date getTimestamp(); IdentityContext getIdentityContext(); }
TransactionStoppedEvent { public Date getTimestamp() { return new Date(timestamp.getTime()); } TransactionStoppedEvent(ChargingStationId chargingStationId, TransactionId transactionId, IdentifyingToken identifyingToken, int meterStop, Date timestamp, IdentityContext identityContext); ChargingStationId getChargingStationId(); TransactionId getTransactionId(); IdentifyingToken getIdTag(); int getMeterStop(); Date getTimestamp(); IdentityContext getIdentityContext();  }