UaaAuthenticationDetails implements Serializable { @Override public String toString() { StringBuilder sb = new StringBuilder(); if (origin != null) { sb.append("remoteAddress=").append(origin); } if (clientId != null) { if (sb.length() > 0) { sb.append(", "); } sb.append("clientId=").append(clientId); } if (sessionId != null) { if (sb.length() > 0) { sb.append(", "); } sb.append("sessionId=<SESSION>"); } return sb.toString(); } private  UaaAuthenticationDetails();  UaaAuthenticationDetails(HttpServletRequest request);  UaaAuthenticationDetails(HttpServletRequest request, String clientId);  UaaAuthenticationDetails(@JsonProperty("addNew") boolean addNew,
                                    @JsonProperty("clientId") String clientId,
                                    @JsonProperty("origin") String origin,
                                    @JsonProperty("sessionId") String sessionId); String getOrigin(); String getSessionId(); String getClientId(); boolean isAddNew(); void setAddNew(boolean addNew); UaaLoginHint getLoginHint(); void setLoginHint(UaaLoginHint loginHint); Map<String, String[]> getParameterMap(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static final String ADD_NEW; static final UaaAuthenticationDetails UNKNOWN; }
@Test void testToStringDoesNotContainSessionId() { UaaAuthenticationDetails details = new UaaAuthenticationDetails(false, "clientid", "origin", "1234"); String toString = details.toString(); assertTrue(toString.contains("sessionId=<SESSION>")); }