### Question:
HtmlLanguageBuilder { public HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName) { checkNotNull(spanType, "Must provide a spanType"); checkNotNull(alternativeTagName, "Must provide an alternativeTagName"); spanTypeToElementNameSubstitution.put(spanType, alternativeTagName); return this; } HtmlLanguageBuilder(); HtmlLanguageBuilder name(String name); HtmlLanguageBuilder add(BlockType blockType); HtmlLanguageBuilder add(SpanType spanType); HtmlLanguageBuilder addSubstitution(SpanType spanType, String alternativeTagName); HtmlLanguageBuilder addHeadings(int level); HtmlLanguageBuilder addSpanFont(); HtmlLanguageBuilder setXhtmlStrict(boolean xhtmlStrict); HtmlLanguageBuilder document(String prefix, String suffix); HtmlLanguage create();  }### Answer:
@Test public void addSpanSubstitutionNullAlternative() { thrown.expect(NullPointerException.class); thrown.expectMessage("Must provide an alternativeTagName"); builder.addSubstitution(SpanType.BOLD, (String) null); }
@Test public void addSpanSubstitutionNullSpanType() { thrown.expect(NullPointerException.class); thrown.expectMessage("Must provide a spanType"); builder.addSubstitution((SpanType) null, "bold"); }
@Test public void addSpanSubstitution() { assertNotNull(builder.addSubstitution(SpanType.BOLD, "bold")); assertSame(builder, builder.addSubstitution(SpanType.BOLD, "bold")); }