### Question:
ExtensionStore { public String deleteExtension(final String extensionName, String currentUser) throws FalconException { ExtensionType extensionType = AbstractExtension.isExtensionTrusted(extensionName) ? ExtensionType.TRUSTED : ExtensionType.CUSTOM; if (extensionType.equals(ExtensionType.TRUSTED)) { throw new ValidationException(extensionName + " is trusted cannot be deleted."); } else if (!metaStore.checkIfExtensionExists(extensionName)) { throw new FalconException("Extension:" + extensionName + " is not registered with Falcon."); } else if (!metaStore.getDetail(extensionName).getExtensionOwner().equals(currentUser)) { throw new FalconException("User: " + currentUser + " is not allowed to delete extension: " + extensionName); } else { metaStore.deleteExtension(extensionName); return "Deleted extension:" + extensionName; } } private  ExtensionStore(); static ExtensionMetaStore getMetaStore(); static ExtensionStore get(); Map<String, String> getExtensionResources(final String extensionName); String getExtensionLibPath(final String extensionName); String getExtensionResource(final String resourcePath); String deleteExtension(final String extensionName, String currentUser); String registerExtension(final String extensionName, final String path, final String description,
                                    String extensionOwner); String getResource(final String extensionResourcePath); Path getExtensionStorePath(); boolean isExtensionStoreInitialized(); String updateExtensionStatus(final String extensionName, String currentUser, ExtensionStatus status);  }### Answer:
@Test public void testDeleteExtension() throws IOException, URISyntaxException, FalconException { String extensionPath = EXTENSION_PATH + "testDelete"; createLibs(extensionPath); createReadmeAndJar(extensionPath); createMETA(extensionPath); store = ExtensionStore.get(); store.registerExtension("toBeDeleted", STORAGE_URL + extensionPath, "test desc", "falconUser"); Assert.assertTrue(store.getResource(STORAGE_URL + extensionPath + "/README").equals("README")); store.deleteExtension("toBeDeleted", "falconUser"); ExtensionMetaStore metaStore = new ExtensionMetaStore(); Assert.assertEquals(metaStore.getAllExtensions().size(), 0); }