hasDomain and hasRange don't add domains and ranges, they just return true if the propert has the specified domain and range. This is explained in the Javadoc for these methods, and follows the typical naming convention in Java that methods beginning with has- or is- return true if an object satisfies some condition.
You should use addDomain and addRange instead. That is, instead of
bandComposedBy.hasDomain(Band);
bandComposedBy.hasRange(Guitarist);
bandComposedBy.hasRange(Bassist);
bandComposedBy.hasRange(Keyboardist);
bandComposedBy.hasRange(Vocalist);
you should use:
bandComposedBy.addDomain(Band);
bandComposedBy.addRange(Guitarist);
bandComposedBy.addRange(Bassist);
bandComposedBy.addRange(Keyboardist);
bandComposedBy.addRange(Vocalist);