@Override
  public String toString() {
    StringBuilder sb = new StringBuilder("{");
    addField(sb, "\"userUuid\": ", this.userUuid, true);
    addField(sb, "\"userLogin\": ", this.userLogin, true);
    addField(sb, "\"name\": ", this.name, true);
    addField(sb, "\"email\": ", this.email, true);
    addField(sb, "\"isActive\": ", Objects.toString(this.isActive, ""), false);
    addField(sb, "\"scmAccounts\": ", String.join(",", scmAccounts), true);
    addField(sb, "\"externalId\": ", this.externalId, true);
    addField(sb, "\"externalLogin\": ", this.externalLogin, true);
    addField(sb, "\"externalIdentityProvider\": ", this.externalIdentityProvider, true);
    addField(sb, "\"local\": ", Objects.toString(this.local, ""), false);
    addField(sb, "\"lastConnectionDate\": ", this.lastConnectionDate == null ?
      "" : DateUtils.formatDateTime(this.lastConnectionDate), true);
    endString(sb);
    return sb.toString();
  }
@Test
  void toString_givenEmptyScmAccount_returnValidJSON() {
    UserDto userDto = createUserDto();
    userDto.setScmAccounts(emptyList());
    UserNewValue userNewValue = new UserNewValue(userDto);

    String jsonString = userNewValue.toString();

    assertValidJSON(jsonString);
  }