public SourceWithMetadata lookupSource(int globalLineNumber, int sourceColumn)
            throws IncompleteSourceWithMetadataException {
        LineToSource lts = this.sourceReferences().stream()
                .filter(lts1 -> lts1.includeLine(globalLineNumber))
                .findFirst()
                .orElseThrow(() -> new IllegalArgumentException("can't find the config segment related to line " + globalLineNumber));
        return new SourceWithMetadata(lts.source.getProtocol(), lts.source.getId(),
                globalLineNumber + 1 - lts.startLine, sourceColumn, lts.source.getText());
    }
@Test
    public void testSourceAndLineRemapping_pipelineDefinedMInMultipleFiles() throws IncompleteSourceWithMetadataException {
        final SourceWithMetadata[] parts = {
                new SourceWithMetadata("file", "/tmp/input", 0, 0, PIPELINE_CONFIG_PART_1),
                new SourceWithMetadata("file", "/tmp/output", 0, 0, PIPELINE_CONFIG_PART_2)
        };
        sut = new PipelineConfig(source, pipelineIdSym, toRubyArray(parts), SETTINGS);

        assertEquals("return the line of first segment", 2, (int) sut.lookupSource(2, 0).getLine());
        assertEquals("return the id of first segment", "/tmp/input", sut.lookupSource(2, 0).getId());
        assertEquals("return the line of second segment", 1, (int) sut.lookupSource(4, 0).getLine());
        assertEquals("return the id of second segment", "/tmp/output", sut.lookupSource(4, 0).getId());
    }