@Test public void execute() throws Exception { WikiCreationRequest request = new WikiCreationRequest(); request.setWikiId("wikiId"); request.setAlias("wikiAlias"); request.setOwnerId("owner"); request.setFailOnExist(true); mocker.getComponentUnderTest().execute(request); verify(wikiManager).create("wikiId", "wikiAlias", "owner", true); request.setFailOnExist(false); mocker.getComponentUnderTest().execute(request); verify(wikiManager).create("wikiId", "wikiAlias", "owner", false); }
@Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { wikiManager.create(request.getWikiId(), request.getAlias(), request.getOwnerId(), request.isFailOnExist()); } catch (WikiManagerException e) { throw new WikiCreationException(String.format("Failed to create the wiki [%s].", request.getWikiId()), e); } }
CreateWikiStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { wikiManager.create(request.getWikiId(), request.getAlias(), request.getOwnerId(), request.isFailOnExist()); } catch (WikiManagerException e) { throw new WikiCreationException(String.format("Failed to create the wiki [%s].", request.getWikiId()), e); } } }
CreateWikiStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { wikiManager.create(request.getWikiId(), request.getAlias(), request.getOwnerId(), request.isFailOnExist()); } catch (WikiManagerException e) { throw new WikiCreationException(String.format("Failed to create the wiki [%s].", request.getWikiId()), e); } }  }
CreateWikiStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { wikiManager.create(request.getWikiId(), request.getAlias(), request.getOwnerId(), request.isFailOnExist()); } catch (WikiManagerException e) { throw new WikiCreationException(String.format("Failed to create the wiki [%s].", request.getWikiId()), e); } }  @Override void execute(WikiCreationRequest request); @Override int getOrder(); }
CreateWikiStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { wikiManager.create(request.getWikiId(), request.getAlias(), request.getOwnerId(), request.isFailOnExist()); } catch (WikiManagerException e) { throw new WikiCreationException(String.format("Failed to create the wiki [%s].", request.getWikiId()), e); } }  @Override void execute(WikiCreationRequest request); @Override int getOrder();  }