def test_get_resolved_mappings_emptylist(mocker):
    store = ModelStore()
    obj = mocker.patch('ice_commons.store.models.create_instance',
                       return_value=MeasurementsResolutionNER())
    expected = mocker.patch.object(obj.return_value,
                                   'resolve',
                                   return_value=[])
    resp = store.get_resolved_mappings([{
        'resolutionClass': 'i',
        'name': 'Weight'
    }], 'karan weighs around 68 kgs')
    assert resp == expected.return_value
def test_get_resolved_mappings_with_null(mocker):
    store = ModelStore()
    mocker.patch('ice_commons.store.models.create_instance', return_value=None)
    resp = store.get_resolved_mappings([], None)
    assert resp == []