public static Builder builder() {
    return new Builder();
  }
@Test
  public void testBuilderDoesNotCreateInvalidObjects() {
    List<String> listContainingNull = Lists.newArrayList("a", null, null);

    // updated
    assertThatThrownBy(
            () -> UpdateNamespacePropertiesResponse.builder().addUpdated((String) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid updated property: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addUpdated((List<String>) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid updated property list: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addUpdated(listContainingNull).build())
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Invalid updated property: null");

    // removed
    assertThatThrownBy(
            () -> UpdateNamespacePropertiesResponse.builder().addRemoved((String) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid removed property: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addRemoved((List<String>) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid removed property list: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addRemoved(listContainingNull).build())
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Invalid removed property: null");

    // missing
    assertThatThrownBy(
            () -> UpdateNamespacePropertiesResponse.builder().addMissing((String) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid missing property: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addMissing((List<String>) null).build())
        .isInstanceOf(NullPointerException.class)
        .hasMessage("Invalid missing property list: null");

    assertThatThrownBy(
            () ->
                UpdateNamespacePropertiesResponse.builder().addMissing(listContainingNull).build())
        .isInstanceOf(IllegalArgumentException.class)
        .hasMessage("Invalid missing property: null");
  }