@Test public void execute() throws Exception { WikiCreationRequest request = new WikiCreationRequest(); request.setWikiId("wikiId"); List<String> members = new ArrayList<>(); request.setMembers(members); mocker.getComponentUnderTest().execute(request); verify(wikiUserManager).addMembers(members, "wikiId"); }
@Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { String wikId = request.getWikiId(); if (request.getMembers() != null) { wikiUserManager.addMembers(request.getMembers(), wikId); } } catch (WikiUserManagerException e) { throw new WikiCreationException( String.format("Failed to add members to the wiki [%s].", request.getWikiId()), e); } }
AddUsersStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { String wikId = request.getWikiId(); if (request.getMembers() != null) { wikiUserManager.addMembers(request.getMembers(), wikId); } } catch (WikiUserManagerException e) { throw new WikiCreationException( String.format("Failed to add members to the wiki [%s].", request.getWikiId()), e); } } }
AddUsersStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { String wikId = request.getWikiId(); if (request.getMembers() != null) { wikiUserManager.addMembers(request.getMembers(), wikId); } } catch (WikiUserManagerException e) { throw new WikiCreationException( String.format("Failed to add members to the wiki [%s].", request.getWikiId()), e); } }  }
AddUsersStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { String wikId = request.getWikiId(); if (request.getMembers() != null) { wikiUserManager.addMembers(request.getMembers(), wikId); } } catch (WikiUserManagerException e) { throw new WikiCreationException( String.format("Failed to add members to the wiki [%s].", request.getWikiId()), e); } }  @Override void execute(WikiCreationRequest request); @Override int getOrder(); }
AddUsersStep implements WikiCreationStep { @Override public void execute(WikiCreationRequest request) throws WikiCreationException { try { String wikId = request.getWikiId(); if (request.getMembers() != null) { wikiUserManager.addMembers(request.getMembers(), wikId); } } catch (WikiUserManagerException e) { throw new WikiCreationException( String.format("Failed to add members to the wiki [%s].", request.getWikiId()), e); } }  @Override void execute(WikiCreationRequest request); @Override int getOrder();  }