### Question:
LowercaseWithDashesDefinitionBuilderImpl implements ResourceDefinitionBuilder { @Override public final ResourceDefinition convert(final String data) { final String title = data; String name = data; name = StringUtils.stripToEmpty(name); name = StringUtils.lowerCase(name); name = StringUtils.replace(name, "&", " and "); name = StringUtils.replace(name, "/", " or "); name = StringUtils.replace(name, "%", " percent "); name = name.replaceAll("[^a-z0-9-]+", "-"); name = StringUtils.stripEnd(name, "-"); name = StringUtils.stripStart(name, "-"); final BasicResourceDefinition dataDefinition = new BasicResourceDefinition(name); dataDefinition.setTitle(title); return dataDefinition; }  @Override final ResourceDefinition convert(final String data); @Override boolean accepts(String data); static final String NAME; }### Answer:
@Test public void testConvert() throws Exception { final String expectedTitle = "?! This is @ crazy title # WITH funky (& weird/bizarre) chArs!? in it!!!! "; final String expectedName = "this-is-crazy-title-with-funky-and-weird-or-bizarre-chars-in-it"; ResourceDefinition actual = builder.convert(expectedTitle); assertEquals(expectedTitle, actual.getTitle()); assertEquals(expectedName, actual.getName()); }