AnsiReader extends StandardReader { public static boolean isEnvelopeSegment(String segmentType) { return "ISA".equals(segmentType) || "GS".equals(segmentType) || "ST".equals(segmentType) || "SE".equals(segmentType) || "GE".equals(segmentType) || "IEA".equals(segmentType) || "TA1".equals(segmentType); }  static boolean isEnvelopeSegment(String segmentType); @Override void preview(); @Override ReplyGenerator getAckGenerator(); @Override ReplyGenerator getAlternateAckGenerator();  }
@Test public void recognizesEnvelopeSegments() { assertTrue(AnsiReader.isEnvelopeSegment("ISA")); assertTrue(AnsiReader.isEnvelopeSegment("GS")); assertTrue(AnsiReader.isEnvelopeSegment("ST")); assertTrue(AnsiReader.isEnvelopeSegment("SE")); assertTrue(AnsiReader.isEnvelopeSegment("GE")); assertTrue(AnsiReader.isEnvelopeSegment("IEA")); assertTrue(AnsiReader.isEnvelopeSegment("TA1")); assertFalse(AnsiReader.isEnvelopeSegment("REF")); }