@Test
public final void testReducedLineLocation() {

    LocationReferenceHolder encLocRef = null;
    LineLocation inputLocation = td.getLineLocationReducibleOffsets();
    int lengtIn = 0;
    for (Line l : inputLocation.getLocationLines()) {
        lengtIn += l.getLineLength();
    }
    int pOffIn = inputLocation.getPositiveOffset();
    int nOffIn = inputLocation.getNegativeOffset();
    encLocRef = encodeLocation(inputLocation);
    assertTrue(encLocRef.isValid());
    int lengthOut = 0;
    for (LocationReferencePoint lrp : encLocRef.getLRPs()) {
        lengthOut += lrp.getDistanceToNext();
    }
    Offsets offOut = encLocRef.getRawLocationReferenceData().getOffsets();
    assertTrue(lengtIn > lengthOut);
    assertTrue(pOffIn != offOut.getPositiveOffset(0));
    assertTrue(nOffIn != offOut.getNegativeOffset(0));
    // The central location length is the stretch between the offset points
    int locationLengthIn = lengtIn - pOffIn - nOffIn;
    int locationLengthOut = lengthOut - offOut.getPositiveOffset(0)
            - offOut.getNegativeOffset(0);
    // ... it should remain the same after pruning
    assertTrue(locationLengthIn == locationLengthOut);
}