@Test
public void testRuleCreationFromStringReader() throws Exception {

    // given
    Path ruleDescriptor = Paths.get("src/test/resources/adult-rule." + fileExtension);
    Reader adultRuleDescriptorAsReader = new StringReader(new String(Files.readAllBytes(ruleDescriptor)));
    // when
    Rule adultRule = factory.createRule(adultRuleDescriptorAsReader);
    // then
    assertThat(adultRule.getName()).isEqualTo("adult rule");
    assertThat(adultRule.getDescription()).isEqualTo("when age is greater than 18, then mark as adult");
    assertThat(adultRule.getPriority()).isEqualTo(1);
}