### Question:
Profill { protected PropertyMatcher createPropertyMatcher(FillingProvider provider) { ProvideFillingFor pff = provider.getClass().getAnnotation(ProvideFillingFor.class); if (pff == null) { throw new InternalException(Profill.class, "E-PROFILL#0001"); } return new PropertyMatcher(pff.annotation(), pff.name(), pff.type()); } Profill(); void makeSafeAgainstMultiThreadedAccess(); void addFillingProvider(FillingProvider provider); void fill(Object bean); boolean isTryToInstantiateIfNestedPropertyIsNull(); void setTryToInstantiateIfNestedPropertyIsNull(boolean value);  }### Answer:
@Test public void 無効なFillingProviderでPropertyMatcherを作成しようとするとE$PROFILL$0001が発生する() { boolean called = false; try { profill.createPropertyMatcher(new FillingProvider() { @Override public Object provide(MatchedProperty property, Object bean) { return null; } }); } catch (InternalException ex) { assertThat(ex.getCode(), is("E-PROFILL#0001")); called = true; } assertThat(called, is(true)); }
@Test public void 有効なFillingProviderでPropertyMatcherを作成できる() { PropertyMatcher matcher = profill.createPropertyMatcher(new ValidFillingProvider()); assertThat(matcher.getAnnotation() == Action.class, is(true)); assertThat(matcher.getName(), is("test")); assertThat(matcher.getType() == String.class, is(true)); }