### Question:
TradableList extends PersistableListAsObservable<T> { @Override public Message toProtoMessage() { return protobuf.PersistableEnvelope.newBuilder() .setTradableList(protobuf.TradableList.newBuilder() .addAllTradable(ProtoUtil.collectionToProto(getList(), protobuf.Tradable.class))) .build(); } TradableList(); protected  TradableList(Collection<T> collection); @Override Message toProtoMessage(); static TradableList<Tradable> fromProto(protobuf.TradableList proto,
                                                   CoreProtoResolver coreProtoResolver,
                                                   BtcWalletService btcWalletService); @Override String toString();  }### Answer:
@Test public void protoTesting() { OfferPayload offerPayload = mock(OfferPayload.class, RETURNS_DEEP_STUBS); TradableList<OpenOffer> openOfferTradableList = new TradableList<>(); protobuf.PersistableEnvelope message = (protobuf.PersistableEnvelope) openOfferTradableList.toProtoMessage(); assertEquals(message.getMessageCase(), TRADABLE_LIST); Offer offer = new Offer(offerPayload); OpenOffer openOffer = new OpenOffer(offer); openOfferTradableList.add(openOffer); message = (protobuf.PersistableEnvelope) openOfferTradableList.toProtoMessage(); assertEquals(message.getMessageCase(), TRADABLE_LIST); assertEquals(1, message.getTradableList().getTradableList().size()); }