### Question:
ModelRepository { public Optional<Resource> updateModel(final String modeluri, final EObject model) { return loadResource(modeluri).map(res -> { ECollections.setEList(res.getContents(), ECollections.singletonEList(model)); return res; }); } @Inject  ModelRepository(final AdapterFactory adapterFactory, final ServerConfiguration serverConfiguration,
      final ResourceManager resourceManager); void initialize(final String workspaceRoot, final boolean clearResources); Optional<EObject> getModel(final String modeluri); @SuppressWarnings("checkstyle:IllegalCatch") Optional<Resource> loadResource(final String modeluri); Map<URI, EObject> getAllModels(); void addModel(final String modeluri, final EObject model); Optional<Resource> updateModel(final String modeluri, final EObject model); void updateModel(final String modelURI, final CCommand command); void removeModel(final String modeluri); boolean saveModel(final String modeluri); Set<String> getAllModelUris();  }### Answer:
@Test public void updateModel() throws DecodingException { repository.updateModel("SuperBrewer3000.json", CCommandFactory.eINSTANCE.createCommand()); verify(command).execute(); }