### Question:
ClassTypeDiscoverer { public ClassType getBy(String localPart) { final ClassType classType = classTypeStore.findBy(localPart); if (classType == null) { throw new ClassTypeNotFoundException("Cannot find class type for localPart: " + localPart); } return classType; } ClassTypeDiscoverer(QNameBuilder qNameBuilder); ClassType discoverFor(ClassMetadata classMetadata); ClassType getBy(String localPart); Map<String, ClassType> getAllByLocalPart();  }### Answer:
@Test(expected = ClassTypeNotFoundException.class) public void givenNonExistingLocalPart_whenFind_thenThrowException() { classTypeDiscoverer.getBy("nonExistingLocalPart"); }