@Test
public void shouldConvertFeatureSetsAsJsonStringBytes() throws InvalidProtocolBufferException {

  int nrOfFeatureSet = 1;
  int nrOfFeatures = 1;
  List<FeatureSetProto.FeatureSet> featureSets =
      IntStream.range(1, nrOfFeatureSet + 1)
          .mapToObj(i -> newFeatureSet(nrOfFeatures))
          .collect(Collectors.toList());
  String expectedOutputString =
      "{\"entities\":[{\"name\":\"entity\",\"valueType\":2}],"
          + "\"features\":[{\"name\":\"feature1\",\"valueType\":6}],"
          + "\"source\":{"
          + "\"type\":1,"
          + "\"kafkaSourceConfig\":{"
          + "\"bootstrapServers\":\"somebrokers:9092\","
          + "\"topic\":\"sometopic\"}}}";
  FeatureSetJsonByteConverter byteConverter = new FeatureSetJsonByteConverter();
  assertEquals(expectedOutputString, new String(byteConverter.toByte(featureSets)));
}