AttributeSet { @Override public String toString() { StringBuilder sb = new StringBuilder(); String[] queryParams = toQueryParams(); for (int a = 0; a < queryParams.length; a++) { sb.append(a < queryParams.length - 1 ? queryParams[a] + "&" : queryParams[a]); } return sb.toString(); } AttributeSet(Attribute... attributes);  AttributeSet(Collection<Attribute> attributes); void validate(AssignationLevel assignationLevel); AttributeSet filter(Attachment attachment); AttributeSet merge(AttributeSet attributes); Map<String, Object> getMap(); Collection<Attribute> getAttributes(); String[] toQueryParams(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj); static AttributeSet parse(String uriQueries); static AttributeSet parse(String... queryParams); static AttributeSet parse(Collection<String> queryParams);  }
@Test public void should_to_string() { AttributeSet sut = new AttributeSet(new Attribute(Attribute.OBJECT_VERSION, "1.1"), new Attribute(Attribute.MINIMUM_PERIOD, 5L), new Attribute(Attribute.MAXIMUM_PERIOD, 60L)); assertEquals("ver=1.1&pmin=5&pmax=60", sut.toString()); }