### Question:
JavaModule implements NamedElement.WithOptionalName, AnnotationSource { public static JavaModule of(Object module) { if (!JavaType.MODULE.isInstance(module)) { throw new IllegalArgumentException("Not a Java module: " + module); } return new JavaModule((AnnotatedElement) module); } protected  JavaModule(AnnotatedElement module); static JavaModule ofType(Class<?> type); static JavaModule of(Object module); static boolean isSupported(); boolean isNamed(); String getActualName(); InputStream getResourceAsStream(String name); ClassLoader getClassLoader(); Object unwrap(); boolean canRead(JavaModule module); boolean isExported(PackageDescription packageDescription, JavaModule module); boolean isOpened(PackageDescription packageDescription, JavaModule module); AnnotationList getDeclaredAnnotations(); void modify(Instrumentation instrumentation,
                       Set<JavaModule> reads,
                       Map<String, Set<JavaModule>> exports,
                       Map<String, Set<JavaModule>> opens,
                       Set<Class<?>> uses,
                       Map<Class<?>, List<Class<?>>> provides); @Override int hashCode(); @Override boolean equals(Object other); @Override String toString(); static final JavaModule UNSUPPORTED; }### Answer:
@Test(expected = IllegalArgumentException.class) public void testExtractModule() throws Exception { JavaModule.of(mock(Object.class)); }