### Question:
CommandExpectationGroup { public List<String> getExpectations() { return Collections.unmodifiableList(expectations); } CommandExpectationGroup(); protected  CommandExpectationGroup(final boolean maskCommands); void addCommand(final String command); void addCommands(final List<String> commands); void addExpectation(final String expectation); void addExpectations(final List<String> expectations); List<String> getCommands(); List<String> getExpectations(); boolean maskCommands(); @Override String toString();  }### Answer:
@Test public void testGetExpectations() { CommandExpectationGroup commandExpectationGroup = new CommandExpectationGroup(); commandExpectationGroup.addExpectation("solo expectation 1"); commandExpectationGroup.addExpectation("solo expectation 2"); commandExpectationGroup.addExpectations(Arrays .asList(new String[] { "grouped expectation 1", "grouped expectation 2", "grouped expectation 3" })); commandExpectationGroup.addExpectations(Arrays.asList(new String[] { "grouped expectation 4" })); commandExpectationGroup.addExpectation("solo expectation 3"); commandExpectationGroup.addExpectation("solo expectation 4"); commandExpectationGroup .addExpectations(Arrays.asList(new String[] { "grouped expectation 5", "grouped command 6" })); assertThat(commandExpectationGroup.getExpectations()).isEqualTo( Arrays.asList(new String[] { "solo expectation 1", "solo expectation 2", "grouped expectation 1", "grouped expectation 2", "grouped expectation 3", "grouped expectation 4", "solo expectation 3", "solo expectation 4", "grouped expectation 5", "grouped command 6" })); commandExpectationGroup = new CommandExpectationGroup(); commandExpectationGroup .addExpectations(Arrays.asList(new String[] { "grouped expectation 1", "grouped expectation 2" })); commandExpectationGroup.addExpectation("solo expectation 1"); commandExpectationGroup .addExpectations(Arrays.asList(new String[] { "grouped expectation 3", "grouped expectation 4" })); commandExpectationGroup.addExpectation("solo expectation 2"); assertThat(commandExpectationGroup.getExpectations()).isEqualTo( Arrays.asList(new String[] { "grouped expectation 1", "grouped expectation 2", "solo expectation 1", "grouped expectation 3", "grouped expectation 4", "solo expectation 2" })); }