PlaceRequest { @Override public String toString() { return "PlaceRequest(nameToken=" + nameToken + ", params=" + params + ")"; } private  PlaceRequest(String nameToken, Map<String, String> params); String getNameToken(); String getParameter(String key, String defaultValue); Set<String> getParameterNames(); boolean matchesNameToken(PlaceRequest other); boolean matchesNameToken(String nameToken); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); static Builder of(String nameToken);  }
@Test public void testToString() { PlaceRequest request = new PlaceRequest.Builder() .nameToken("nameToken") .with("name1", "value1") .with("name2", "value2") .build(); String result = request.toString(); assertNotNull(result); assertEquals("PlaceRequest(nameToken=nameToken, params={name1=value1, name2=value2})", result); }