@Test public void checkGetLocoDirectionAdvanced() { NceConsist c = new NceConsist(3, memo); // send a reply the memory read instruction trigged by the constructor above. nnis.sendTestReply(new NceReply(nnis, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), null); c.setConsistType(jmri.Consist.ADVANCED_CONSIST); jmri.DccLocoAddress A = new jmri.DccLocoAddress(200, true); jmri.DccLocoAddress B = new jmri.DccLocoAddress(250, true); c.restore(A, true); // use restore here, as it does not send // any data to the command station nnis.sendTestReply(new NceReply(nnis, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), null); c.restore(B, false); // revese direction. nnis.sendTestReply(new NceReply(nnis, "00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00"), null); Assert.assertTrue("Direction in Advanced Consist", c.getLocoDirection(A)); Assert.assertFalse("Direction in Advanced Consist", c.getLocoDirection(B)); c.dispose(); }