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_mixed() {
        // given
        Document embedded = new Document("<!InputRef(1)!>", "<!DynamicParameter(0)!>");
        Document doc = new Document("<!InputRef(0)!>", embedded);

        // when
        List<Object> arguments = singletonList("dwa");
        Object[] inputs = {"jeden", "test"};
        String[] externalNames = {"col1", "col2"};
        JetSqlRow inputRow = new JetSqlRow(getInternalSerializationService(), inputs);
        Bson result = PlaceholderReplacer.replacePlaceholders(doc, evalContext(arguments), inputRow, externalNames, true);

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

        Document expected = new Document("col1", new Document("col2", "dwa"));
        assertThat(result).isEqualTo(expected);
    }