@Test
	public void testInstanceSettings() throws Exception {

		Data data = DataUtilities.createData(program, addr(10), ByteDataType.dataType, 1,
			ClearDataMode.CLEAR_ALL_CONFLICT_DATA);

		DataType dt = data.getDataType();
		Settings defaultSettings = dt.getDefaultSettings();
		FormatSettingsDefinition.DEF.setChoice(defaultSettings, FormatSettingsDefinition.CHAR);
		EndianSettingsDefinition.DEF.setBigEndian(defaultSettings, false);
		PaddingSettingsDefinition.DEF.setPadded(defaultSettings, true);

		assertEquals(FormatSettingsDefinition.CHAR, data.getLong("format").longValue());
		FormatSettingsDefinition.DEF.setChoice(data, FormatSettingsDefinition.DECIMAL);
		assertEquals(FormatSettingsDefinition.DECIMAL, data.getLong("format").longValue());

		assertEquals(EndianSettingsDefinition.LITTLE, data.getLong("endian").longValue());
		EndianSettingsDefinition.DEF.setChoice(data, EndianSettingsDefinition.BIG);
		assertEquals(EndianSettingsDefinition.BIG, data.getLong("endian").longValue());

		assertEquals(PaddingSettingsDefinition.PADDED_VALUE, data.getLong("padded").longValue());
		PaddingSettingsDefinition.DEF.setChoice(data, PaddingSettingsDefinition.UNPADDED_VALUE);
		assertEquals(PaddingSettingsDefinition.UNPADDED_VALUE, data.getLong("padded").longValue());

		FormatSettingsDefinition.DEF.setChoice(defaultSettings, FormatSettingsDefinition.HEX);
		EndianSettingsDefinition.DEF.clear(defaultSettings);
		PaddingSettingsDefinition.DEF.clear(defaultSettings);

		assertEquals(FormatSettingsDefinition.DECIMAL, data.getLong("format").longValue());
		assertEquals(EndianSettingsDefinition.BIG, data.getLong("endian").longValue());
		assertEquals(PaddingSettingsDefinition.UNPADDED_VALUE, data.getLong("padded").longValue());
	}
Test setting default and instance settings on Data.
Ghidra/Features/Base/src/test.slow/java/ghidra/program/database/data/SettingsTest.java