### Question:
TradeStatistics2 implements ProcessOncePersistableNetworkPayload, PersistableNetworkPayload,
        CapabilityRequiringPayload, Comparable<TradeStatistics2> { public boolean isValid() { boolean excludedFailedTrade = offerId.equals("6E5KOI6O-3a06a037-6f03-4bfa-98c2-59f49f73466a-112"); boolean depositTxIdValid = depositTxId == null || !depositTxId.isEmpty(); return tradeAmount > 0 && tradePrice > 0 && !excludedFailedTrade && depositTxIdValid; } TradeStatistics2(OfferPayload offerPayload,
                            Price tradePrice,
                            Coin tradeAmount,
                            Date tradeDate,
                            String depositTxId,
                            Map<String, String> extraDataMap);  TradeStatistics2(OfferPayload.Direction direction,
                            String baseCurrency,
                            String counterCurrency,
                            String offerPaymentMethod,
                            long offerDate,
                            boolean offerUseMarketBasedPrice,
                            double offerMarketPriceMargin,
                            long offerAmount,
                            long offerMinAmount,
                            String offerId,
                            long tradePrice,
                            long tradeAmount,
                            long tradeDate,
                            @Nullable String depositTxId,
                            @Nullable byte[] hash,
                            @Nullable Map<String, String> extraDataMap); byte[] createHash(); protobuf.TradeStatistics2 toProtoTradeStatistics2(); @Override protobuf.PersistableNetworkPayload toProtoMessage(); static TradeStatistics2 fromProto(protobuf.TradeStatistics2 proto); @Override byte[] getHash(); @Override boolean verifyHashSize(); @Override Capabilities getRequiredCapabilities(); Date getTradeDate(); Price getTradePrice(); String getCurrencyCode(); Coin getTradeAmount(); Volume getTradeVolume(); boolean isValid(); @Override int compareTo(@NotNull TradeStatistics2 o); @Override String toString(); @SuppressWarnings("SpellCheckingInspection")
    static final String MEDIATOR_ADDRESS; @SuppressWarnings("SpellCheckingInspection")
    static final String REFUND_AGENT_ADDRESS; }### Answer:
@Test public void isValid_WithDepositTxId() { TradeStatistics2 tradeStatistic = make(dayZeroTrade); assertTrue(tradeStatistic.isValid()); }
@Test public void isValid_WithEmptyDepositTxId() { TradeStatistics2 tradeStatistic = make(dayZeroTrade.but(withNull(depositTxId))); assertTrue(tradeStatistic.isValid()); }