### Question:
HtmlLanguageBuilder { public HtmlLanguageBuilder add(BlockType blockType) { blockTypes.add(checkNotNull(blockType, "Must provide a blockType")); 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 addBlockTypeNull() { thrown.expect(NullPointerException.class); thrown.expectMessage("Must provide a blockType"); builder.add((BlockType) null); }
@Test public void addBlockType() { assertNotNull(builder.add(BlockType.PARAGRAPH)); assertSame(builder, builder.add(BlockType.PARAGRAPH)); }
@Test public void addSpanTypeNull() { thrown.expect(NullPointerException.class); thrown.expectMessage("Must provide a spanType"); builder.add((SpanType) null); }
@Test public void addSpanType() { assertNotNull(builder.add(SpanType.BOLD)); assertSame(builder, builder.add(SpanType.BOLD)); }