### Question:
EdmAssociationSetImplProv extends EdmNamedImplProv implements EdmAssociationSet, EdmAnnotatable { @Override public EdmAssociationSetEnd getEnd(final String role) throws EdmException { AssociationSetEnd end; if (associationSet.getEnd1().getRole().equals(role)) { end = associationSet.getEnd1(); } else if (associationSet.getEnd2().getRole().equals(role)) { end = associationSet.getEnd2(); } else { return null; } EdmEntitySet entitySet = edmEntityContainer.getEntitySet(end.getEntitySet()); if (entitySet == null) { throw new EdmException(EdmException.COMMON); } return new EdmAssociationSetEndImplProv(end, entitySet); } EdmAssociationSetImplProv(final EdmImplProv edm, final AssociationSet associationSet,
      final EdmEntityContainer edmEntityContainer); @Override EdmAssociation getAssociation(); @Override EdmAssociationSetEnd getEnd(final String role); @Override EdmEntityContainer getEntityContainer(); @Override EdmAnnotations getAnnotations();  }### Answer:
@Test public void testAssociationSet() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; assertEquals("associationSetName", associationSet.getName()); assertEquals("end1Role", associationSet.getEnd("end1Role").getRole()); assertEquals(null, associationSet.getEnd("endWrongRole")); }
@Test(expected = EdmException.class) public void testAssociationSetNoEntity() throws Exception { EdmAssociationSet associationSet = edmAssociationSet; associationSet.getEnd("end2Role"); }