### Question:
PropertyAuthorityFactory extends WKTParsingAuthorityFactory implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory { @Override protected synchronized void dispose(final boolean shutdown) { definitions.clear(); super.dispose(shutdown); } PropertyAuthorityFactory(final URL definitionFile,
            final Citation... authorities);  PropertyAuthorityFactory(final Collection<URL> definitionFiles,
            final Citation... authorities);  PropertyAuthorityFactory(final Hints userHints, final Hints.FileKey directoryKey,
            final Class<?> resourceLoader, final String filename, final Citation... authorities); @SuppressWarnings({"unchecked","rawtypes"}) protected  PropertyAuthorityFactory(final Citation... authorities);   }### Answer:
@Test public void testDefaultHints() throws IOException, FactoryException { final URL resources = PropertyEpsgFactory.class.getResource(FILENAME_XY); assertNotNull(FILENAME_XY, resources); PropertyAuthorityFactory factory = new PropertyAuthorityFactory(resources, Citations.EPSG); assertEquals(1, factory.getAuthorityCodes(null).size()); CoordinateReferenceSystem crs = factory.createCoordinateReferenceSystem("42101"); CoordinateSystem cs = crs.getCoordinateSystem(); assertEquals(AxisDirection.EAST, cs.getAxis(0).getDirection()); assertEquals(AxisDirection.NORTH, cs.getAxis(1).getDirection()); factory.dispose(false); }
@Test public void testDefaultHintsWithAxis() throws IOException, FactoryException, IncommensurableException { final URL r1 = PropertyEpsgFactory.class.getResource(FILENAME_XY); final URL r2 = PropertyEpsgFactory.class.getResource(FILENAME); assertNotNull(FILENAME_XY, r1); assertNotNull(FILENAME, r2); final List<URL> resources = Arrays.asList(new URL[] {r1, r2}); PropertyAuthorityFactory factory = new PropertyAuthorityFactory(resources, Citations.EPSG); assertEquals(3, factory.getAuthorityCodes(null).size()); CoordinateReferenceSystem crs = factory.createCoordinateReferenceSystem("3035"); assertEquals("ETRS89 / ETRS-LAEA", crs.getName().getCode()); assertEquals("EPSG:3035", IdentifiedObjects.getIdentifierOrName(crs)); CoordinateSystem cs = crs.getCoordinateSystem(); assertEquals(AxisDirection.NORTH, cs.getAxis(0).getDirection()); assertEquals(AxisDirection.EAST, cs.getAxis(1).getDirection()); crs = factory.createCoordinateReferenceSystem("27572"); assertEquals("NTF (Paris) / Lambert zone II", crs.getName().getCode()); assertEquals("EPSG:27572", IdentifiedObjects.getIdentifierOrName(crs)); cs = ((ProjectedCRS) crs).getBaseCRS().getCoordinateSystem(); assertEquals(AxisDirection.NORTH, cs.getAxis(0).getDirection()); assertEquals(AxisDirection.EAST, cs.getAxis(1).getDirection()); assertEquals("Expected grade units", 1, cs.getAxis(0).getUnit().getConverterToAny(Units.GRAD).convert(1), 1E-8); factory.dispose(false); }