def METHOD_NAME(self):
    parent_id1 = uuid.uuid4().hex
    parent_id2 = uuid.uuid4().hex
    child_id = uuid.uuid4().hex
    [child, parent1, parent2] = self.factory.create_or_update_case(CaseStructure(
        case_id=child_id,
        indices=[
            CaseIndex(CaseStructure(case_id=parent_id1, attrs={'create': True}),
                      identifier='parent1'),
            CaseIndex(CaseStructure(case_id=parent_id2, attrs={'create': True}),
                      identifier='parent2')
        ],
        attrs={'create': True}
    ))
    spec = {
        'type': 'nested',
        'argument_expression': {
            'type': 'indexed_case',
            'case_expression': {
                'type': 'identity'
            },
            'index': 'parent1'
        },
        'value_expression': {
            'type': 'property_name',
            'property_name': '_id'
        }
    }
    self.assertEqual(
        ExpressionFactory.from_spec(spec)(child.to_json(), self.context),
        parent_id1
    )
    spec['argument_expression']['index'] = 'parent2'
    self.assertEqual(
        ExpressionFactory.from_spec(spec)(child.to_json(), self.context),
        parent_id2
    )