### Question:
ClientQueryGroupBy implements ClientGroupBy<ClientGroupAxis> { @Override public ClientGroupAxis getAxis(ClientGroupAxisEnum name) { if (!ClientGroupAxisEnum.GROUPS.equals(name)) { throw new IllegalArgumentException(String.format("unsupported axis %s for FlatGroupBy", name.toString())); } return getGroupAxis(); } ClientQueryGroupBy();  ClientQueryGroupBy(ClientQueryGroupBy source); @Override ClientQueryGroupBy deepClone(); @XmlTransient ClientGroupAxis getGroupAxis(); @Override ClientGroupAxis getAxis(ClientGroupAxisEnum name); @Override ClientGroupAxis getAxis(int index); @XmlTransient @Override List<ClientGroupAxis> getAxes(); ClientQueryGroupBy setGroups(List<? extends ClientQueryGroup> groups); List<? extends ClientQueryGroup> getGroups(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void getAxisReturnGroupsForGroupsName() { ClientQueryGroupBy instance = createFullyConfiguredInstance(); ClientGroupAxis result = instance.getAxis(ClientGroupAxisEnum.GROUPS); assertEquals(CLIENT_GROUP_AXIS, result); }
@Test public void getAxisThrowExceptionForRowsName() { final ClientQueryGroupBy instance = createFullyConfiguredInstance(); assertThrows(IllegalArgumentException.class, new Executable() { @Override public void execute() { instance.getAxis(ClientGroupAxisEnum.ROWS); } }); }
@Test public void getAxisReturnGroupsFor0Index() { ClientQueryGroupBy instance = createFullyConfiguredInstance(); int axisIndex = 0; ClientGroupAxis result = instance.getAxis(axisIndex); assertEquals(CLIENT_GROUP_AXIS, result); }
@Test public void getAxisThrowExceptionFor1Index() { final ClientQueryGroupBy instance = createFullyConfiguredInstance(); final int axisIndex = 1; assertThrows(IllegalArgumentException.class, new Executable() { @Override public void execute() { instance.getAxis(axisIndex); } }); }