public void ReturnsAnInstanceOfKeyedCollection() { var enumerable = new[] { new Foo { Bar = "abc" } }; var keyedEnumerable = enumerable.AsKeyed(f => f.Bar); Assert.That(keyedEnumerable, Is.InstanceOf<KeyedCollection<string, Foo>>()); }