    @Test
    public void parent_and_child_attributes_combine() throws Exception {

        String childId = UUID.randomUUID().toString();
        MetricRecorder.RecorderContext context = new MetricRecorder.RecorderContext(ContextData.withId(ID)
                                      .add(StandardContext.SERVICE, SERVICE_NAME)
                                      .build());

        MetricRecorder.RecorderContext childContext = context.newChild(ContextData.withId(childId)
                .add(StandardContext.OPERATION, OPERATION)
                .build());

        DimensionMapper mapper = new DimensionMapper.Builder()
                .addGlobalDimension(ContextData.ID)
                .addMetric(METRIC, Arrays.asList(StandardContext.SERVICE, StandardContext.OPERATION))
                .build();

        Dimension expectedIdDimension = new Dimension().withName(ContextData.ID.name).withValue(childId);
        Dimension expectedServiceDimension = new Dimension().withName(StandardContext.SERVICE.name).withValue(SERVICE_NAME);
        Dimension expectedOperationDimension = new Dimension().withName(StandardContext.OPERATION.name).withValue(OPERATION);
        List<Dimension> expected = Arrays.asList(expectedIdDimension,
                expectedOperationDimension,
                expectedServiceDimension);

        List<Dimension> dims = mapper.getDimensions(METRIC, childContext);
        assertEquals(expected, dims);
    }