ProjectSearchParams { @Override public String toString() { return "ProjectSearchParams{" + "name='" + name + '\'' + ", type=" + type + ", businessUnit='" + businessUnit + '\'' + ", tag='" + tag + '\'' + '}'; } private  ProjectSearchParams(Builder builder); String getName(); SW360ProjectType getType(); String getBusinessUnit(); String getTag(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static Builder builder(); static final ProjectSearchParams ALL_PROJECTS; }
@Test public void testToString() { ProjectSearchParams params = ProjectSearchParams.builder() .withName("projectName") .withType(SW360ProjectType.INNER_SOURCE) .withTag("projectTag") .withBusinessUnit("projectUnit") .build(); String s = params.toString(); assertThat(s).contains(params.getName(), params.getBusinessUnit(), params.getType().toString(), params.getTag()); }