### Question:
FireflyExtension { String getItemsDefinitionHash() { return getHashFromFile(new File(rootPath, "resources/" + name + "-items.xml"), NO_ITEMS_XML_MD5); } FireflyExtension(String name, File rootPath, FireflyExtensionRepository fireflyExtensionRepository, MigrationRepository migrationRepository, boolean relaxedMode); boolean isUpdateRequired(); boolean isHmcResetRequired(); void onHmcReset(PK migration); void onUpdate(PK migration); @Override String toString();  }### Answer:
@Test(expected = SAXException.class) public void shouldHandleExceptionsWhileParsingItemsDefinition() throws Throwable { FireflyExtension extensionWithInvalidItemsXml = createExtension(EXTENSION_WITH_INVALID_ITEMS_XML, false); try { extensionWithInvalidItemsXml.getItemsDefinitionHash(); } catch (RuntimeException e) { unwrapException(e); } }
@Test public void shouldGetItemsDefinitionHash() throws Exception { String resultHash = fireflyExtension.getItemsDefinitionHash(); assertEquals(generateMD5(ITEMS_XML_CONTENT), resultHash); }
@Test public void shouldGetDefaultItemsDefinitionHashIfNoItemsXmlWasFound() throws Exception { fireflyExtension = createExtension(EXTENSION_WITHOUT_ITEMS_XML, false); String resultHash = fireflyExtension.getItemsDefinitionHash(); assertEquals(NO_ITEMS_XML_MD5, resultHash); }