### Question:
QualityKey { public void withNameDo(NameClosure closure) { closure.execute(name); } QualityKey(Type type, Name name); static QualityKey ForTypeAndName(String type, String name); @Override boolean equals(Object o); @Override int hashCode(); void withTypeDo(TypeClosure closure); void withNameDo(NameClosure closure); @Override String toString();  }### Answer:
@Test public void operatesOnClosureWithName() throws Exception { NameClosure closure = mock(NameClosure.class); firstKey.withNameDo(closure); verify(closure).execute(new Name("name")); }