@Test void whenClosingTheResourceAfterParsingFailsThenReturnsResultQuietly() { final Reader mockReader = mock(Reader.class, invocationOnMock -> { throw new IOException(); }); final PmdRuleSet result = PmdRuleSets.from(mockReader, messages); assertThat(result) .isNotNull() .extracting("rules") .asList() .isEmpty(); }
public static PmdRuleSet from(Reader configReader, ValidationMessages messages) { return createQuietly(new XmlRuleSetFactory(configReader, messages)); }
PmdRuleSets { public static PmdRuleSet from(Reader configReader, ValidationMessages messages) { return createQuietly(new XmlRuleSetFactory(configReader, messages)); } }
PmdRuleSets { public static PmdRuleSet from(Reader configReader, ValidationMessages messages) { return createQuietly(new XmlRuleSetFactory(configReader, messages)); }  }
PmdRuleSets { public static PmdRuleSet from(Reader configReader, ValidationMessages messages) { return createQuietly(new XmlRuleSetFactory(configReader, messages)); }  static PmdRuleSet from(Reader configReader, ValidationMessages messages); static PmdRuleSet from(ActiveRules activeRules, String repositoryKey); static PmdRuleSet from(RulesProfile rulesProfile, String repositoryKey); }
PmdRuleSets { public static PmdRuleSet from(Reader configReader, ValidationMessages messages) { return createQuietly(new XmlRuleSetFactory(configReader, messages)); }  static PmdRuleSet from(Reader configReader, ValidationMessages messages); static PmdRuleSet from(ActiveRules activeRules, String repositoryKey); static PmdRuleSet from(RulesProfile rulesProfile, String repositoryKey);  }