// Path: src/main/java/io/vertx/kafka/client/common/TopicPartition.java
// @DataObject
// public class TopicPartition {
// 
//   private String topic;
//   private int partition;
// 
//   /**
//    * Constructor
//    */
//   public TopicPartition() {
//   }
// 
//   /**
//    * Constructor
//    *
//    * @param topic the topic name
//    * @param partition the partition number
//    */
//   public TopicPartition(String topic, int partition) {
//     this.topic = topic;
//     this.partition = partition;
//   }
// 
//   /**
//    * Constructor (from JSON representation)
//    *
//    * @param json  JSON representation
//    */
//   public TopicPartition(JsonObject json) {
//     this.topic = json.getString("topic");
//     this.partition = json.getInteger("partition");
//   }
// 
//   /**
//    * Constructor (copy)
//    *
//    * @param that  object to copy
//    */
//   public TopicPartition(TopicPartition that) {
//     this.topic = that.topic;
//     this.partition = that.partition;
//   }
// 
//   /**
//    * @return  the topic name
//    */
//   public String getTopic() {
//     return this.topic;
//   }
// 
//   /**
//    * Set the topic name
//    *
//    * @param topic the topic name
//    * @return  current instance of the class to be fluent
//    */
//   public TopicPartition setTopic(String topic) {
//     this.topic = topic;
//     return this;
//   }
// 
//   /**
//    * @return  the partition number
//    */
//   public int getPartition() {
//     return this.partition;
//   }
// 
//   /**
//    * Set the partition number
//    *
//    * @param partition the partition number
//    * @return  current instance of the class to be fluent
//    */
//   public TopicPartition setPartition(int partition) {
//     this.partition = partition;
//     return this;
//   }
// 
//   /**
//    * Convert object to JSON representation
//    *
//    * @return  JSON representation
//    */
//   public JsonObject toJson() {
//     return new JsonObject().put("topic", this.topic).put("partition", this.partition);
//   }
// 
//   @Override
//   public String toString() {
// 
//     return "TopicPartition{" +
//       "topic=" + this.topic +
//       ", partition=" + this.partition +
//       "}";
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) return true;
//     if (o == null || getClass() != o.getClass()) return false;
// 
//     TopicPartition that = (TopicPartition) o;
// 
//     if (partition != that.partition) return false;
//     return topic != null ? topic.equals(that.topic) : that.topic == null;
//   }
// 
//   @Override
//   public int hashCode() {
//     int result = 1;
//     result = 31 * result + partition;
//     result = 31 * result + (topic != null ? topic.hashCode() : 0);
//     return result;
//   }
// }


import io.vertx.core.json.JsonObject;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
import io.vertx.kafka.client.common.TopicPartition;
import org.junit.Test;
import org.junit.runner.RunWith;
/*
 * Copyright 2018 Red Hat Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.vertx.kafka.client.tests;


@RunWith(VertxUnitRunner.class)
public class TopicPartitionTest {

  @Test
  public void testEquality(final TestContext context) {
// Path: src/main/java/io/vertx/kafka/client/common/TopicPartition.java
// @DataObject
// public class TopicPartition {
// 
//   private String topic;
//   private int partition;
// 
//   /**
//    * Constructor
//    */
//   public TopicPartition() {
//   }
// 
//   /**
//    * Constructor
//    *
//    * @param topic the topic name
//    * @param partition the partition number
//    */
//   public TopicPartition(String topic, int partition) {
//     this.topic = topic;
//     this.partition = partition;
//   }
// 
//   /**
//    * Constructor (from JSON representation)
//    *
//    * @param json  JSON representation
//    */
//   public TopicPartition(JsonObject json) {
//     this.topic = json.getString("topic");
//     this.partition = json.getInteger("partition");
//   }
// 
//   /**
//    * Constructor (copy)
//    *
//    * @param that  object to copy
//    */
//   public TopicPartition(TopicPartition that) {
//     this.topic = that.topic;
//     this.partition = that.partition;
//   }
// 
//   /**
//    * @return  the topic name
//    */
//   public String getTopic() {
//     return this.topic;
//   }
// 
//   /**
//    * Set the topic name
//    *
//    * @param topic the topic name
//    * @return  current instance of the class to be fluent
//    */
//   public TopicPartition setTopic(String topic) {
//     this.topic = topic;
//     return this;
//   }
// 
//   /**
//    * @return  the partition number
//    */
//   public int getPartition() {
//     return this.partition;
//   }
// 
//   /**
//    * Set the partition number
//    *
//    * @param partition the partition number
//    * @return  current instance of the class to be fluent
//    */
//   public TopicPartition setPartition(int partition) {
//     this.partition = partition;
//     return this;
//   }
// 
//   /**
//    * Convert object to JSON representation
//    *
//    * @return  JSON representation
//    */
//   public JsonObject toJson() {
//     return new JsonObject().put("topic", this.topic).put("partition", this.partition);
//   }
// 
//   @Override
//   public String toString() {
// 
//     return "TopicPartition{" +
//       "topic=" + this.topic +
//       ", partition=" + this.partition +
//       "}";
//   }
// 
//   @Override
//   public boolean equals(Object o) {
//     if (this == o) return true;
//     if (o == null || getClass() != o.getClass()) return false;
// 
//     TopicPartition that = (TopicPartition) o;
// 
//     if (partition != that.partition) return false;
//     return topic != null ? topic.equals(that.topic) : that.topic == null;
//   }
// 
//   @Override
//   public int hashCode() {
//     int result = 1;
//     result = 31 * result + partition;
//     result = 31 * result + (topic != null ? topic.hashCode() : 0);
//     return result;
//   }
// }


// Path: src/test/java/io/vertx/kafka/client/tests/TopicPartitionTest.java
import io.vertx.core.json.JsonObject;
import io.vertx.ext.unit.TestContext;
import io.vertx.ext.unit.junit.VertxUnitRunner;
import io.vertx.kafka.client.common.TopicPartition;
import org.junit.Test;
import org.junit.runner.RunWith;

/*
 * Copyright 2018 Red Hat Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.vertx.kafka.client.tests;


@RunWith(VertxUnitRunner.class)
public class TopicPartitionTest {

  @Test
  public void testEquality(final TestContext context) {
    final TopicPartition t1 = new TopicPartition("topic1", 0);