static Document replacePlaceholders(Document doc, ExpressionEvalContext evalContext, JetSqlRow inputRow,
                                        String[] externalNames, boolean forRow) {
        Object[] values = inputRow.getValues();
        return replacePlaceholders(doc, evalContext, values, externalNames, forRow);
    }
@Test
    public void replaces_input_ref_makes_reference() {
        // given
        Document embedded = new Document("test", "<!InputRef(1)!>");
        Document doc = new Document("<!InputRef(0)!>", embedded);

        List<Object> arguments = Collections.emptyList();

        // when
        Object[] inputs = {"jeden", "dwa"};
        String[] externalNames = {"jeden", "col2"};
        JetSqlRow inputRow = new JetSqlRow(getInternalSerializationService(), inputs);
        Bson result = PlaceholderReplacer.replacePlaceholders(doc, evalContext(arguments), inputRow, externalNames, false);

        // then
        assertThat(result).isInstanceOf(Document.class);

        Document expected = new Document("jeden", new Document("test", "$col2"));
        assertThat(result).isEqualTo(expected);
    }