class XmlCredentialsUtil {

    public static XMLConfiguration createXmlConfiguration(final String fileName) {
        try {
            return new XMLConfiguration(IntegrityUtil.ensure(fileName, "Must provide a file name"));
        } catch (final ConfigurationException configurationException) {
            throw new RuntimeException("Trouble using file name [" + fileName + "]", configurationException);
        }
    }

}

class XmlCredentialsUtilTest {

    @Test(expected = RuntimeException.class)
    public void test_createXmlConfiguration_emptyString() {

        XmlCredentialsUtil.createXmlConfiguration("");
    }

}