PwmSettingXml { static XmlElement readSettingXml( final PwmSetting setting ) { final String expression = "/settings/setting[@key=\"" + setting.getKey() + "\"]"; return xmlDocCache.get().evaluateXpathToElement( expression ) .orElseThrow( () -> new IllegalStateException( "PwmSetting.xml is missing setting for key '" + setting.getKey() + "'" ) ); }   static final String SETTING_XML_FILENAME; }
@Test public void testSettingElementIsInXml() { for ( final PwmSetting pwmSetting : PwmSetting.values() ) { final XmlElement element = PwmSettingXml.readSettingXml( pwmSetting ); Assert.assertNotNull( "no XML settings node in PwmSetting.xml for setting " + pwmSetting.getKey(), element ); } }