### Question:
urn_perun_facility_attribute_def_def_passwdScpDestinationFile extends FacilityAttributesModuleAbstract implements FacilityAttributesModuleImplApi { @Override public void checkAttributeSyntax(PerunSessionImpl perunSession, Facility facility, Attribute attribute) throws WrongAttributeValueException { String path = attribute.valueAsString(); if (path == null) return; Matcher matcher = pattern.matcher(path); if (!matcher.matches()) throw new WrongAttributeValueException(attribute, "Bad path to destination of file in attribute format " + path); }  @Override void checkAttributeSyntax(PerunSessionImpl perunSession, Facility facility, Attribute attribute); @Override void checkAttributeSemantics(PerunSessionImpl perunSession, Facility facility, Attribute attribute); @Override Attribute fillAttribute(PerunSessionImpl perunSession, Facility facility, AttributeDefinition attribute); @Override AttributeDefinition getAttributeDefinition();  }### Answer:
@Test(expected = WrongAttributeValueException.class) public void testCheckAttributeSyntaxWithIncorrectValue() throws Exception { System.out.println("testCheckAttributeSyntaxWithIncorrectValue()"); attributeToCheck.setValue("bad_example"); classInstance.checkAttributeSyntax(session, facility, attributeToCheck); }
@Test public void testCheckAttributeSyntaxCorrect() throws Exception { System.out.println("testCheckAttributeSyntaxCorrect()"); attributeToCheck.setValue("/example"); classInstance.checkAttributeSyntax(session, facility, attributeToCheck); }