@Override
  public boolean equals(final Object o) {
    if (this == o) {
      return true;
    }

    if (o == null || getClass() != o.getClass()) {
      return false;
    }

    final CreateConnector that = (CreateConnector) o;
    return Objects.equals(name, that.name)
        && Objects.equals(config, that.config)
        && Objects.equals(notExists, that.notExists)
        && Objects.equals(type, that.type);
  }
@Test
  public void testEquals() {
    new EqualsTester()
        .addEqualityGroup(
            new CreateConnector(Optional.of(SOME_LOCATION), NAME, CONFIG, CreateConnector.Type.SOURCE, false),
            new CreateConnector(Optional.of(OTHER_LOCATION), NAME, CONFIG, CreateConnector.Type.SOURCE, false),
            new CreateConnector(NAME, CONFIG, CreateConnector.Type.SOURCE, false)
        )
        .addEqualityGroup(
            new CreateConnector(OTHER_NAME, CONFIG, CreateConnector.Type.SOURCE, false)
        )
        .addEqualityGroup(
            new CreateConnector(NAME, OTHER_CONFIG, CreateConnector.Type.SOURCE, false)
        )
        .addEqualityGroup(
            new CreateConnector(NAME, CONFIG, CreateConnector.Type.SINK, false)
        )
        .addEqualityGroup(
            new CreateConnector(NAME, CONFIG, CreateConnector.Type.SOURCE, true)
        )
        .testEquals();
  }