" </servlet-mapping>",
"</web-app>");
assertThat(m_webElement.getChildren()).hasSize(1);
//
List<ServletMappingElement> elements = m_webElement.getServletMappingElements();
ServletMappingElement element = elements.get(0);
assertThat(elements).hasSize(1);
assertEquals("someName", element.getName());
assertEquals("some/pattern", element.getPattern());
// set new "name" value
{
element.setName("newName");
m_webContent = StringUtils.replace(m_webContent, "someName", "newName");
assertUpdatedModuleFile(m_webContent);
}
// set new "pattern" value
{
element.setPattern("new/pattern");
m_webContent = StringUtils.replace(m_webContent, "some/pattern", "new/pattern");
assertUpdatedModuleFile(m_webContent);
}
// toString()
assertEquals(