### Question:
SimpleResolver implements PropertyResolver { @Override @Nullable public String resolve(@Nullable final String name) { String result = null; if (properties != null && name != null) { result = properties.get(name); } return result; } SimpleResolver(@NotNull final Map<String, String> properties); @Override @Nullable String resolve(@Nullable final String name);  }### Answer:
@Test public void testResolve1() { assertEquals("value1", new SimpleResolver(props).resolve("key1")); assertEquals("value2", new SimpleResolver(props).resolve("key2")); }
@Test public void testNotFound() { assertNull(new SimpleResolver(props).resolve("unknownKey")); assertNull(new SimpleResolver(props).resolve(null)); }
@SuppressWarnings("ConstantConditions") @Test public void testNoProps() { assertNull(new SimpleResolver(emptyMap()).resolve("key1")); assertNull(new SimpleResolver(emptyMap()).resolve(null)); assertNull(new SimpleResolver(null).resolve(null)); }