### Question:
JcrValidNameDefinitionBuilderImpl implements ResourceDefinitionBuilder { @Override public final ResourceDefinition convert(final String data) { final String name = StringUtils.lowerCase(JcrUtil.createValidName(StringUtils.strip(data))); final BasicResourceDefinition dataDefinition = new BasicResourceDefinition(name); dataDefinition.setTitle(data); 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_titlewithfunkyweirdbizarrecharsinit"; ResourceDefinition actual = builder.convert(expectedTitle); assertEquals(expectedTitle, actual.getTitle()); assertEquals(expectedName, actual.getName()); }