### Question:
HtmlSubsetDocumentBuilder extends DocumentBuilder { void setSupportedBlockTypes(Set<BlockType> blockTypes) { checkState(blockStrategyState.isEmpty()); blockStrategies = new BlockStrategies(blockTypes); } HtmlSubsetDocumentBuilder(Writer out, boolean formatting);   HtmlSubsetDocumentBuilder(HtmlDocumentBuilder delegate); void setElementNameOfSpanType(SpanType spanType, String elementName); @Override void beginDocument(); @Override void endDocument(); @Override void flush(); @Override void beginBlock(BlockType type, Attributes attributes); @Override void endBlock(); @Override void beginSpan(SpanType type, Attributes attributes); @Override void endSpan(); @Override void beginHeading(int level, Attributes attributes); @Override void endHeading(); @Override void characters(String text); @Override void entityReference(String entity); @Override void image(Attributes attributes, String url); @Override void link(Attributes attributes, String hrefOrHashName, String text); @Override void imageLink(Attributes linkAttributes, Attributes imageAttributes, String href, String imageUrl); @Override void acronym(String text, String definition); @Override void lineBreak(); @Override void charactersUnescaped(String literal); @Override void horizontalRule();  }### Answer:
@Test(expected = NullPointerException.class) public void setSupportedBlockTypesNull() { builder.setSupportedBlockTypes(null); }
@Test public void blockBulletedListSupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.BULLETED_LIST)); buildList(BlockType.BULLETED_LIST); assertContent("<ul><li>test 0</li><li>test 1</li></ul>"); }
@Test public void blockBulletedListUnsupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH)); buildList(BlockType.BULLETED_LIST); assertContent("<p>test 0</p><p>test 1</p>"); }
@Test public void blockNumericListSupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.NUMERIC_LIST)); buildList(BlockType.NUMERIC_LIST); assertContent("<ol><li>test 0</li><li>test 1</li></ol>"); }
@Test public void blockNumericListUnsupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH)); buildList(BlockType.NUMERIC_LIST); assertContent("<p>test 0</p><p>test 1</p>"); }
@Test public void testTableSupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.TABLE)); buildTable(); assertContent( "<table><tr><td>test 0/0</td><td>test 1/0</td><td>test 2/0</td></tr><tr><td>test 0/1</td><td>test 1/1</td><td>test 2/1</td></tr></table>"); }
@Test public void testTableUnsupported() { builder.setSupportedBlockTypes(Sets.newHashSet(BlockType.PARAGRAPH)); buildTable(); assertContent( "<p>test 0/0</p><p>test 1/0</p><p>test 2/0</p><br/><br/><p>test 0/1</p><p>test 1/1</p><p>test 2/1</p>"); }
@Test public void testParagraphUnsupported() { builder.setSupportedBlockTypes(Collections.<BlockType> emptySet()); assertUnsupportedBlock("test", BlockType.PARAGRAPH); }
@Test public void setSupportedBlockTypesNull() { thrown.expect(NullPointerException.class); builder.setSupportedBlockTypes(null); }