### Question:
ColumnDescriptorStage implements TranslationStage { @Override public void perform(TranslatorContext context) { int i = 0; for(ResultNodeDescriptor resultNode : context.getResultNodeList()) { context.getSelectBuilder().result(resultNode::getNode); if(!resultNode.isInDataRow()) { continue; } String name; DbAttribute attribute = resultNode.getDbAttribute(); if(attribute != null) { name = attribute.getName(); } else { name = "c" + i++; } ColumnDescriptor descriptor = new ColumnDescriptor(name, resultNode.getJdbcType(), resultNode.getJavaType()); descriptor.setAttribute(attribute); descriptor.setDataRowKey(resultNode.getDataRowKey()); context.getColumnDescriptors().add(descriptor); } }  @Override void perform(TranslatorContext context);  }### Answer:
@Test public void perform() { TranslatableQueryWrapper wrapper = new MockQueryWrapperBuilder() .withDistinct(true) .withMetaData(new MockQueryMetadataBuilder() .withSuppressDistinct() .build()) .build(); TranslatorContext context = new MockTranslatorContext(wrapper); context.addResultNode(new EmptyNode()); context.addResultNode(new EmptyNode(), "key"); context.addResultNode(new EmptyNode(), false, PropertyFactory.COUNT, "key2"); ColumnDescriptorStage stage = new ColumnDescriptorStage(); stage.perform(context); assertEquals(1, context.getColumnDescriptors().size()); ColumnDescriptor descriptor = context.getColumnDescriptors().iterator().next(); assertEquals("key", descriptor.getDataRowKey()); }