@Test public void testConvert() { final ModelConverter<PeerMetric, types.Metric.PeerMetric> converter = new PeerMetricConverterFactory().create(); final Metric.PeerMetric rpcPeerMetric = Metric.PeerMetric.newBuilder() .setPeerID(ByteString.EMPTY) .build(); final PeerMetric actual = PeerMetric.newBuilder().peerId(Base58Utils.encode(new byte[0])).build(); final PeerMetric expected = converter.convertToDomainModel(rpcPeerMetric); assertEquals(expected, actual); }
public ModelConverter<PeerMetric, Metric.PeerMetric> create() { return new ModelConverter<>(domainConverter, rpcConverter); }
PeerMetricConverterFactory { public ModelConverter<PeerMetric, Metric.PeerMetric> create() { return new ModelConverter<>(domainConverter, rpcConverter); } }
PeerMetricConverterFactory { public ModelConverter<PeerMetric, Metric.PeerMetric> create() { return new ModelConverter<>(domainConverter, rpcConverter); }  }
PeerMetricConverterFactory { public ModelConverter<PeerMetric, Metric.PeerMetric> create() { return new ModelConverter<>(domainConverter, rpcConverter); }  ModelConverter<PeerMetric, Metric.PeerMetric> create(); }
PeerMetricConverterFactory { public ModelConverter<PeerMetric, Metric.PeerMetric> create() { return new ModelConverter<>(domainConverter, rpcConverter); }  ModelConverter<PeerMetric, Metric.PeerMetric> create();  }