@Test
	public void testDefaultSettingsOnTypedef() throws Exception {
		DataType byteDT = dataMgr.resolve(ByteDataType.dataType, null);
		SettingsDefinition[] settingsDefinitions = byteDT.getSettingsDefinitions();
		Settings settings = byteDT.getDefaultSettings();
		FormatSettingsDefinition.DEF.setChoice(settings, FormatSettingsDefinition.OCTAL);

		TypedefDataType tdt = new TypedefDataType("ByteTypedef", byteDT);
		TypeDef td = (TypeDef) dataMgr.addDataType(tdt, null);

		SettingsDefinition[] sdefs = td.getSettingsDefinitions();
		assertTrue(sdefs.length >= settingsDefinitions.length);  // TypeDef may add some of its own

		Settings defSettings = td.getDefaultSettings();
		assertEquals(FormatSettingsDefinition.OCTAL,
			FormatSettingsDefinition.DEF.getChoice(defSettings));

		FormatSettingsDefinition.DEF.setChoice(defSettings, FormatSettingsDefinition.DECIMAL);
		assertEquals(FormatSettingsDefinition.DECIMAL,
			FormatSettingsDefinition.DEF.getChoice(defSettings));

		FormatSettingsDefinition.DEF.setChoice(settings, FormatSettingsDefinition.HEX);

		assertEquals(FormatSettingsDefinition.DECIMAL,
			FormatSettingsDefinition.DEF.getChoice(defSettings)); // unchanged

	}
Test setting default and instance settings on Data.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/data/SettingsTest.java