### Question:
ScriptConfigurationService implements ScriptingService { @Override public void delete(String uuid) throws ScriptException { failIfUuidDoesNotExist(uuid); dataStore.delete(uuid); } @Inject  ScriptConfigurationService(@Named("ScriptLogger") Logger logger,
                                      @Assisted Subject subject, @Assisted String realm,
                                      ScriptingDataStoreFactory dataStoreFactory); @Override ScriptConfiguration create(ScriptConfiguration config); @Override void delete(String uuid); @Override Set<ScriptConfiguration> getAll(); @Override Set<ScriptConfiguration> get(QueryFilter<String> queryFilter); @Override ScriptConfiguration get(String uuid); @Override ScriptConfiguration update(ScriptConfiguration config);  }### Answer:
@Test public void shouldFailIfUuidDoesNotExistOnDelete() throws ScriptException { String uuid = "1234567890"; when(dataStore.containsUuid(anyString())).thenReturn(false); try { service.delete(uuid); fail("shouldFailIfUuidDoesNotExistOnDelete"); } catch (ScriptException e) { assertEquals(e.getScriptErrorCode(), SCRIPT_UUID_NOT_FOUND); } }
@Test public void shouldFailIfUuidDoesNotExistOnGet() throws ScriptException { String uuid = "1234567890"; when(dataStore.containsUuid(anyString())).thenReturn(false); try { service.delete(uuid); fail("shouldFailIfUuidDoesNotExistOnGet"); } catch (ScriptException e) { assertEquals(e.getScriptErrorCode(), SCRIPT_UUID_NOT_FOUND); } }