### Question:
Xsd2UmlPluginDefault implements Xsd2UmlHostedPlugin { @Override public final String nameFromSimpleTypeRestriction(final QName simpleType, final QName base) { if (simpleType == null) { throw new IllegalArgumentException("simpleType"); } if (base == null) { throw new IllegalArgumentException("base"); } return nameFromSchemaTypeName(simpleType).concat(" restricts ").concat(nameFromSchemaTypeName(base)); }  @Override final String nameFromComplexTypeExtension(final QName complexType, final QName base); @Override String nameFromSchemaAttributeName(final QName name); @Override String nameFromSchemaElementName(final QName name); @Override String nameFromSchemaTypeName(final QName name); @Override final String nameFromSimpleTypeRestriction(final QName simpleType, final QName base);  }### Answer:
@Test public void testNameFromSimpleTypeRestriction() throws Exception { String restriction = defaultPlugin.nameFromSimpleTypeRestriction(complexType, name); Assert.assertEquals("complexType restricts name", restriction); }
@Test(expected = IllegalArgumentException.class) public void testValidNameFromSimpleTypeRestriction() throws Exception { defaultPlugin.nameFromSimpleTypeRestriction(null, name); }
@Test(expected = IllegalArgumentException.class) public void testvalidNameFromBaseTypeRestriction() throws Exception { defaultPlugin.nameFromSimpleTypeRestriction(name, null); }