The API of DependencyResolver is documented.
SerialDependencyResolver#getFreeModule throws IllegalArgumentException in all cases when a well-formed module is passed in that is not being processed.
DependencyResolver#getFreeModule: another cause of an IllegalStateException thrown is documented.