Esp3RdVersionCommand extends AbstractEsp3Command { public DeviceID getChipID() { if(response == null) { return null; } return ((Esp3RdVersionResponse)response).getChipID(); } Esp3RdVersionCommand(); @Override Esp3RdVersionResponse createResponseFromPacket(Esp3Packet response); @Override Esp3RdVersionResponse getResponse(); Esp3RdVersionResponse.Version getAppVersion(); Esp3RdVersionResponse.Version getApiVersion(); DeviceID getChipID(); String getAppDescription();  }
@Test public void testRepeatedSend() throws Exception { TestProcessor processor = new TestProcessor(response); Esp3RdVersionCommand command = new Esp3RdVersionCommand(); command.send(processor); processor = new TestProcessor(null); command.send(processor); Assert.assertEquals(Esp3ResponsePacket.ReturnCode.RET_CODE_NOT_SET, command.getReturnCode()); Assert.assertNull(command.getChipID()); processor = new TestProcessor(response); command.send(processor); Assert.assertEquals(returnCode, command.getReturnCode()); Assert.assertEquals(chipID, command.getChipID()); }