@Test public void resolve() throws ComponentLookupException { assertNull(this.mocker.getComponentUnderTest().resolve(null, null)); assertNull(this.mocker.getComponentUnderTest().resolve(new ResourceReference("path", ResourceType.PATH), null)); }
@Override public EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters) { if (resourceReference == null) { return null; } if (this.componentManagerProvider.get().hasComponent(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme())) { EntityReferenceResolver<ResourceReference> resolver; try { resolver = this.componentManagerProvider.get().getInstance(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme()); } catch (ComponentLookupException e) { throw new RuntimeException( String.format("Unknown error when trying to load resolver for reference [%s]", resourceReference), e); } return resolver.resolve(resourceReference, type, parameters); } return null; }
DefaultResourceReferenceEntityReferenceResolver implements EntityReferenceResolver<ResourceReference> { @Override public EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters) { if (resourceReference == null) { return null; } if (this.componentManagerProvider.get().hasComponent(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme())) { EntityReferenceResolver<ResourceReference> resolver; try { resolver = this.componentManagerProvider.get().getInstance(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme()); } catch (ComponentLookupException e) { throw new RuntimeException( String.format("Unknown error when trying to load resolver for reference [%s]", resourceReference), e); } return resolver.resolve(resourceReference, type, parameters); } return null; } }
DefaultResourceReferenceEntityReferenceResolver implements EntityReferenceResolver<ResourceReference> { @Override public EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters) { if (resourceReference == null) { return null; } if (this.componentManagerProvider.get().hasComponent(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme())) { EntityReferenceResolver<ResourceReference> resolver; try { resolver = this.componentManagerProvider.get().getInstance(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme()); } catch (ComponentLookupException e) { throw new RuntimeException( String.format("Unknown error when trying to load resolver for reference [%s]", resourceReference), e); } return resolver.resolve(resourceReference, type, parameters); } return null; }  }
DefaultResourceReferenceEntityReferenceResolver implements EntityReferenceResolver<ResourceReference> { @Override public EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters) { if (resourceReference == null) { return null; } if (this.componentManagerProvider.get().hasComponent(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme())) { EntityReferenceResolver<ResourceReference> resolver; try { resolver = this.componentManagerProvider.get().getInstance(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme()); } catch (ComponentLookupException e) { throw new RuntimeException( String.format("Unknown error when trying to load resolver for reference [%s]", resourceReference), e); } return resolver.resolve(resourceReference, type, parameters); } return null; }  @Override EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters); }
DefaultResourceReferenceEntityReferenceResolver implements EntityReferenceResolver<ResourceReference> { @Override public EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters) { if (resourceReference == null) { return null; } if (this.componentManagerProvider.get().hasComponent(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme())) { EntityReferenceResolver<ResourceReference> resolver; try { resolver = this.componentManagerProvider.get().getInstance(TYPE_RESOURCEREFERENCE, resourceReference.getType().getScheme()); } catch (ComponentLookupException e) { throw new RuntimeException( String.format("Unknown error when trying to load resolver for reference [%s]", resourceReference), e); } return resolver.resolve(resourceReference, type, parameters); } return null; }  @Override EntityReference resolve(ResourceReference resourceReference, EntityType type, Object... parameters); static final ParameterizedType TYPE_RESOURCEREFERENCE; }