@Test public void whenSelectActionOpenProjectsThenResultMessageFileOpen() { try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { System.setOut(new PrintStream(out)); manager.select("opr"); assertThat(out.toString(), is(String.format("OpenProject%s", sep))); } catch (IOException ioe) { ioe.printStackTrace(); } }
public void select(String key) { for (Action action : actions) { if (action.getKey().equals(key)) { action.execute(); break; } } }
ActionManager { public void select(String key) { for (Action action : actions) { if (action.getKey().equals(key)) { action.execute(); break; } } } }
ActionManager { public void select(String key) { for (Action action : actions) { if (action.getKey().equals(key)) { action.execute(); break; } } }  }
ActionManager { public void select(String key) { for (Action action : actions) { if (action.getKey().equals(key)) { action.execute(); break; } } }  void init(); void select(String key); ArrayList<Action> getActions(); }
ActionManager { public void select(String key) { for (Action action : actions) { if (action.getKey().equals(key)) { action.execute(); break; } } }  void init(); void select(String key); ArrayList<Action> getActions();  }