RouteOptionParser extends AbstractProxyOptionParser implements ProxyRouteParser { @Override public String getFinalStation() { if(nodes != null && nodes.length > 0) { return nodes[nodes.length - 1]; } else { return "last-stop"; } }  @Override PROXY_OPTION option(); @Override void removeNextNodes(); @Override String getContent(); @Override List<ProxyEndpoint> getNextEndpoints(); @Override String getFinalStation(); @Override RouteOptionParser read(String option); @Override String output();  }
@Test public void testGetFinalStation() { Assert.assertEquals("TCP: parser = new RouteOptionParser().read("ROUTE TCP: Assert.assertEquals("TCP: parser = new RouteOptionParser().read("ROUTE"); Assert.assertEquals("last-stop", parser.getFinalStation()); }