@SuppressWarnings("unchecked") @Before public void setUp() { directory = context.mock(Directory.class); mockOutput = context.mock(IndexOutput.class); fieldNameFilterConverter = context.mock(IFieldNameFilterConverter.class); geoRecordSerializer = context.mock(IGeoRecordSerializer.class); config.setGeoFileExtension("gto"); treeSet = new TreeSet<GeoRecord>( new Comparator<GeoRecord>() { @Override public int compare(GeoRecord o1, GeoRecord o2) { return o1.lowOrder - o2.lowOrder; } }); String segmentName = "01"; info = new GeoSegmentInfo(); info.setFieldNameFilterConverter(fieldNameFilterConverter); info.setGeoVersion(GeoVersion.CURRENT_VERSION); info.setSegmentName(segmentName); }