XMLPolicyConverter implements PolicyConverter { @Override public boolean canConvert(String name, Element policy) { return false; } @Inject  XMLPolicyConverter(DocumentTools documentTools); @Override String getPolicyTypeExtension(); @Override String getPolicyXML(Policy policy, String policyString); @Override boolean canConvert(String name, Element policy); @Override @SuppressWarnings("squid:S2095") // Should not close the input stream since we are returning it. It should be auto closed by the caller InputStream convertFromPolicyElement(Element policy); static final String EXTENSION; }
@Test void canConvertTest() { assertFalse(xmlPolicyConverter.canConvert("someOtherPolicyName", null)); }