public TopicWithSchema createTopic(TopicWithSchema topicWithSchema) { if (endpoints.findTopics(topicWithSchema, topicWithSchema.isTrackingEnabled()).contains(topicWithSchema.getQualifiedName())) { return topicWithSchema; } assertThat(endpoints.topic().create(topicWithSchema).getStatus()).isEqualTo(CREATED.getStatusCode()); wait.untilTopicCreated(topicWithSchema); return topicWithSchema; }
public TopicWithSchema createTopic(TopicWithSchema topicWithSchema) { if (endpoints.findTopics(topicWithSchema, topicWithSchema.isTrackingEnabled()).contains(topicWithSchema.getQualifiedName())) { return topicWithSchema; } assertThat(endpoints.topic().create(topicWithSchema).getStatus()).isEqualTo(CREATED.getStatusCode()); wait.untilTopicCreated(topicWithSchema); return topicWithSchema; }
private Topic convertToTopic() { return new Topic(this.getQualifiedName(), this.getDescription(), this.getOwner(), this.getRetentionTime(), this.isJsonToAvroDryRunEnabled(), this.getAck(), this.isTrackingEnabled(), this.wasMigratedFromJsonType(), this.isSchemaVersionAwareSerializationEnabled(), this.getContentType(), this.getMaxMessageSize(), this.getPublishingAuth(), this.isSubscribingRestricted(), this.getOfflineStorage()); }