### Question:
FontElementStrategy extends SpanHtmlElementStrategy { @Override public SpanStrategy spanStrategy() { return new FontSpanStrategy(); } FontElementStrategy(); @Override SpanStrategy spanStrategy();  }### Answer:
@Test public void hasSpanStrategy() { assertNotNull(strategy.spanStrategy()); }
@Test public void spanStrategyBuildsNonHtml() { EventDocumentBuilder builder = new EventDocumentBuilder(); SpanStrategy spanStrategy = strategy.spanStrategy(); spanStrategy.beginSpan(builder, SpanType.SPAN, new Attributes(null, null, "color: red", null)); builder.characters("test"); spanStrategy.endSpan(builder); assertEquals( Arrays.asList(new BeginSpanEvent(SpanType.SPAN, new Attributes(null, null, "color: red", null)), new CharactersEvent("test"), new EndSpanEvent()), builder.getDocumentBuilderEvents().getEvents()); }
@Test public void stateful() { assertNotSame(strategy.spanStrategy(), strategy.spanStrategy()); }
@Test public void spanStrategyBuildsNonHtml() { EventDocumentBuilder builder = new EventDocumentBuilder(); SpanStrategy spanStrategy = strategy.spanStrategy(); spanStrategy.beginSpan(builder, SpanType.SPAN, new Attributes(null, null, "color: red", null)); builder.characters("test"); spanStrategy.endSpan(builder); assertEquals(Arrays.asList(new BeginSpanEvent(SpanType.SPAN, new Attributes(null, null, "color: red", null)), new CharactersEvent("test"), new EndSpanEvent()), builder.getDocumentBuilderEvents().getEvents()); }