### Question:
GeoTools { public static Hints getDefaultHints() { return Hints.getDefaults(false); } private  GeoTools(); static Version getVersion(); static String getBuildRevision(); static String getBuildTimestamp(); void setLoggerFactory(final LoggerFactory factory); static void init(final Hints hints); static void init(final InitialContext applicationContext); static Hints getDefaultHints(); static synchronized InitialContext getInitialContext(final Hints hints); static String fixName(final String name); static String fixName(final Context context, final String name); static void addFactoryIteratorProvider(final FactoryIteratorProvider provider); static void removeFactoryIteratorProvider(final FactoryIteratorProvider provider); static void addChangeListener(final ChangeListener listener); static void removeChangeListener(final ChangeListener listener); static void fireConfigurationChanged(); static void main(String[] args); static final String CRS_AUTHORITY_EXTRA_DIRECTORY; static final String EPSG_DATA_SOURCE; static final String FORCE_LONGITUDE_FIRST_AXIS_ORDER; }### Answer:
@Test public void testMyHints(){ Hints hints = GeoTools.getDefaultHints(); assertTrue(hints.isEmpty()); assertNull(Hints.putSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE)); try { hints = GeoTools.getDefaultHints(); assertNotNull(hints); assertFalse(hints.isEmpty()); assertEquals(1, hints.size()); final Object value = hints.get(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER); assertTrue(value instanceof Boolean); assertFalse(((Boolean) value).booleanValue()); String text = hints.toString().trim(); assertTrue(text.matches("Hints:\\s+FORCE_LONGITUDE_FIRST_AXIS_ORDER = false")); assertEquals(hints.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE), Boolean.FALSE); text = hints.toString().trim(); assertTrue(text.matches("Hints:\\s+FORCE_LONGITUDE_FIRST_AXIS_ORDER = true")); assertEquals(hints.remove(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER), Boolean.TRUE); text = hints.toString().trim(); assertTrue(text.matches("Hints:\\s+System defaults:\\s+FORCE_LONGITUDE_FIRST_AXIS_ORDER = false")); } finally { assertNotNull(Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER)); } assertTrue(GeoTools.getDefaultHints().isEmpty()); }
@Test public void testSystemHints() { Hints hints = GeoTools.getDefaultHints(); assertNotNull(hints); assertTrue(hints.isEmpty()); System.setProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER, "true"); Hints.scanSystemProperties(); try { hints = GeoTools.getDefaultHints(); assertNotNull(hints); assertFalse(hints.isEmpty()); assertEquals(1, hints.size()); final Object value = hints.get(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER); assertTrue(value instanceof Boolean); assertTrue(((Boolean) value).booleanValue()); } finally { System.clearProperty(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER); assertNotNull(Hints.removeSystemDefault(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER)); } hints = GeoTools.getDefaultHints(); assertNotNull(hints); assertTrue(hints.isEmpty()); }