// initialize memory store
DataStore store = DataStore.getInstance();
// create data object (populated with store data)
TestBean test = store.getTest(testId);
if (test == null) {
logger.error("Test {} was not found", testId);
throw new WebApplicationException(Response.Status.NOT_FOUND);
}