OAuthToken { public Map<String,String> getAttributes(){ return attributes; } OAuthToken(String token, String secret);  OAuthToken(String token, String secret, Map<String,String> attributes); String getToken(); String getSecret(); EncodedPair getAttribute(String name); Map<String,String> getAttributes(); @Override String toString();  }
@Test(expected=UnsupportedOperationException.class) public void shouldBeImmutable() { toTest.getAttributes().put("a", "b"); }