ThriftSender extends ThriftSenderBase implements Sender { protected int calculateSpanSize(io.jaegertracing.thriftjava.Span span) throws SenderException { try { return getSize(span); } catch (Exception e) { throw new SenderException("ThriftSender failed writing Span to memory buffer.", e, 1); } } ThriftSender(ProtocolType protocolType, int maxPacketSize); @Override int append(JaegerSpan span); abstract void send(Process process, List<io.jaegertracing.thriftjava.Span> spans); @Override int flush(); @Override int close();  }
@Test(expected = SenderException.class) public void calculateSpanSizeNull() throws Exception { ThriftSender sender = new ThriftSender(ProtocolType.Compact, 0) { @Override public void send(Process process, List<Span> spans) throws SenderException { } }; sender.calculateSpanSize(null); }