### Question:
GenerateDiagramFormsSessionCommand extends AbstractClientSessionCommand<EditorSession> { @Override public <V> void execute(Callback<V> callback) { formGenerationManager.call(this::call); callback.onSuccess(); } protected  GenerateDiagramFormsSessionCommand(); @Inject  GenerateDiagramFormsSessionCommand(final ClientFormGenerationManager formGenerationManager); @Override void execute(Callback<V> callback); @Override boolean accepts(final ClientSession session);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testGenerate() { final ClientSessionCommand.Callback callback = mock(ClientSessionCommand.Callback.class); tested.execute(callback); verify(formGenerationService, times(1)).generateAllForms(eq(diagram)); verify(callback, times(1)).onSuccess(); verify(callback, never()).onError(anyObject()); }