ResourcePathTypeResolver implements TypeResolver { @Override public String resolveProperty(String resourcePath, String property) { return readAsProperties(resourcePath).getProperty(property); } ResourcePathTypeResolver();  ResourcePathTypeResolver(String resourceBasePath); @Override String resolveProperty(String resourcePath, String property); @Override T resolve(String resourcePath, String property); @Override Map<String, T> resolveAll(String resourcePath, String property, String keyProperty);  }
@Test public void testResolveProperty() { Assert.assertEquals(new ResourcePathTypeResolver().resolveProperty("mocks/foo", TypeResolver.DEFAULT_TYPE_PROPERTY), Foo.class.getName()); Assert.assertEquals(new ResourcePathTypeResolver().resolveProperty("mocks/foo", "name"), "fooMock"); Assert.assertEquals(new ResourcePathTypeResolver().resolveProperty("META-INF/mocks/foo", "name"), "fooMock"); Assert.assertEquals(new ResourcePathTypeResolver("META-INF/mocks").resolveProperty("foo", TypeResolver.DEFAULT_TYPE_PROPERTY), Foo.class.getName()); Assert.assertEquals(new ResourcePathTypeResolver("META-INF/mocks").resolveProperty("foo", "name"), "fooMock"); Assert.assertEquals(new ResourcePathTypeResolver("META-INF/mocks").resolveProperty("META-INF/mocks/foo", "name"), "fooMock"); Assert.assertEquals(new ResourcePathTypeResolver("META-INF/mocks").resolveProperty("bar", "name"), "barMock"); }