IllegalSegmentReferences implements SegmentReferences { @Override public SegmentId getSegmentId(int reference) { throw new IllegalStateException("invalid use"); }  @Override SegmentId getSegmentId(int reference); @NotNull @Override Iterator<SegmentId> iterator();  }
@Test(expected = IllegalStateException.class) public void getSegmentIdShouldBeIllegal() throws Exception { new IllegalSegmentReferences().getSegmentId(1); }