public Object locateService()

in src/main/java/org/apache/sling/commons/testing/osgi/MockComponentContext.java [79:87]


    public Object locateService(String name, ServiceReference reference) {
        // the constant is from Sling Core, but we don't want to have a dep just because of this
        String referenceName = (String) reference.getProperty("sling.core.servletName");
        if (referenceName != null && referenceName.equals(name)) {
            return this.servlet;
        }

        return services.get(reference);
    }