### Question:
GetterReferMetadataCreator implements ReferMetadataCreator { @Override public boolean isApplicable(Type type, String ref) { Class<?> classType = getRawType(type); List<String> gettersNames = createGettersNames(classType, ref); return gettersNames.stream() .flatMap(getter -> Arrays.stream(classType.getMethods()) .filter(method -> method.getParameterCount() == 0) .filter(method -> method.getName().equals(getter))) .findFirst() .isPresent(); }  @Override boolean isApplicable(Type type, String ref); @Override ReferMetadata getReferMetadata(Type type, String path);  }### Answer:
@Test void shouldCheckIfApplicableForClassWithGetter() { GetterReferMetadataCreator getterBased = new GetterReferMetadataCreator(); boolean applicable = getterBased.isApplicable(SimpleGetterClass.class, "field"); assertThat(applicable).isTrue(); }
@Test void shouldCheckIfApplicableForClassWithBooleanGetter() { GetterReferMetadataCreator getterBased = new GetterReferMetadataCreator(); boolean applicable = getterBased.isApplicable(BooleanFieldGetterClass.class, "field"); assertThat(applicable).isTrue(); }
@Test void shouldCheckIfApplicableForClassWithoutGetter() { GetterReferMetadataCreator getterBased = new GetterReferMetadataCreator(); boolean applicable = getterBased.isApplicable(NoGetterClass.class, "field"); assertThat(applicable).isFalse(); }