@Test public void testImmutableDate() { Date now = new Date(); StartTransactionInfo startTransactionInfo = new StartTransactionInfo(EVSE_ID, 0, now, IDENTIFYING_TOKEN_ACCEPTED, Collections.<String, String>emptyMap()); startTransactionInfo.getTimestamp().setTime(TWO_MINUTES_AGO.getTime()); assertEquals(now, startTransactionInfo.getTimestamp()); }
public Date getTimestamp() { return new Date(timestamp.getTime()); }
StartTransactionInfo { public Date getTimestamp() { return new Date(timestamp.getTime()); } }
StartTransactionInfo { public Date getTimestamp() { return new Date(timestamp.getTime()); } StartTransactionInfo(EvseId evseId, int meterStart, Date timestamp, IdentifyingToken identifyingToken, Map<String, String> attributes); }
StartTransactionInfo { public Date getTimestamp() { return new Date(timestamp.getTime()); } StartTransactionInfo(EvseId evseId, int meterStart, Date timestamp, IdentifyingToken identifyingToken, Map<String, String> attributes); EvseId getEvseId(); IdentifyingToken getIdentifyingToken(); int getMeterStart(); Date getTimestamp(); Map<String, String> getAttributes(); }
StartTransactionInfo { public Date getTimestamp() { return new Date(timestamp.getTime()); } StartTransactionInfo(EvseId evseId, int meterStart, Date timestamp, IdentifyingToken identifyingToken, Map<String, String> attributes); EvseId getEvseId(); IdentifyingToken getIdentifyingToken(); int getMeterStart(); Date getTimestamp(); Map<String, String> getAttributes();  }