@Test(expected = UnsupportedOperationException.class) public void paramsShouldBeImmutableCopy() { Map<String, String> attributes = new HashMap<>(); attributes.put("key", "value"); new StartTransactionInfo(EVSE_ID, 0, new Date(), IDENTIFYING_TOKEN_ACCEPTED, attributes).getAttributes().put("key2", "value2"); }
public Map<String, String> getAttributes() { return attributes; }
StartTransactionInfo { public Map<String, String> getAttributes() { return attributes; } }
StartTransactionInfo { public Map<String, String> getAttributes() { return attributes; } StartTransactionInfo(EvseId evseId, int meterStart, Date timestamp, IdentifyingToken identifyingToken, Map<String, String> attributes); }
StartTransactionInfo { public Map<String, String> getAttributes() { return attributes; } 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 Map<String, String> getAttributes() { return attributes; } 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();  }