either need to assert the right instance type here (to avoid potential classcast if used incorrectly or differently in the future, since it is protected and not private) OR change the signature of this to expect NamedByteArrayResource and also change the signature of locateApplicationContexts(..) to return NamedByteArrayResource