"<module>",
" <servlet path='some.path' class='some.class'/>",
"</module>"});
assertThat(m_module.getChildren()).hasSize(1);
// prepare single "<servlet>" element
ServletElement servletElement;
{
List<ServletElement> servletElements = m_module.getServletElements();
assertThat(servletElements).hasSize(1);
servletElement = servletElements.get(0);
}
// current values
assertEquals("some.path", servletElement.getPath());
assertEquals("some.class", servletElement.getClassName());
// set new values
{
servletElement.setPath("new.path");
servletElement.setClassName("new.class");
String expected = StringUtils.replace(m_moduleContent, "some.path", "new.path");
expected = StringUtils.replace(expected, "some.class", "new.class");
assertUpdatedModuleFile(expected);
}
}