### Question:
ScriptConfigurationDataStore implements ScriptingDataStore { @Override public boolean containsName(String name) throws ScriptException { try { ServiceConfig config = getSubOrgConfig(); Set<String> configNames = config.getSubConfigNames(); for (String configName : configNames) { if (name.equals(getMapAttr(config.getSubConfig(configName).getAttributes(), SCRIPT_NAME))) { return true; } } config = getSubGlobalConfig(); configNames = config.getSubConfigNames(); for (String configName : configNames) { if (name.equals(getMapAttr(config.getSubConfig(configName).getAttributes(), SCRIPT_NAME))) { return true; } } } catch (SSOException | SMSException e) { throw createAndLogError(logger, FIND_BY_NAME_FAILED, e, name, realm); } return false; } @Inject  ScriptConfigurationDataStore(@Named("ScriptLogger") Logger logger,
                                        @Assisted Subject subject, @Assisted String realm); @Override void save(ScriptConfiguration config); @Override void delete(String uuid); @Override Set<ScriptConfiguration> getAll(); @Override ScriptConfiguration get(String uuid); @Override boolean containsUuid(String uuid); @Override boolean containsName(String name); @Override Set<ScriptConfiguration> get(QueryFilter<String> queryFilter);  }### Answer:
@Test public void shouldFailIfConfigDoesNotExistOnContainsName() throws ScriptException { String name = "MyJavaScript"; try { dataStore.containsName(name); fail("shouldFailIfConfigDoesNotExistOnContainsName"); } catch (ScriptException e) { assertEquals(e.getScriptErrorCode(), FIND_BY_NAME_FAILED); } }