### Question:
FormatSettingsProvider { @SuppressWarnings("unchecked") public <T> FormatSettings<T> settings(Class<? extends T> clazz, FormatSettings<Object> defaultSettings) { FormatSettings<T> settings = (FormatSettings<T>) settingsCache.get(clazz); if (settings == null) { settings = (FormatSettings<T>) TYPE_SETTINGS.get(clazz); if (settings == null) { settings = (FormatSettings<T>) defaultSettings; } settingsCache.put(clazz, settings); } return settings; } protected  FormatSettingsProvider(); @SuppressWarnings("unchecked") FormatSettings<T> settings(Class<? extends T> clazz, FormatSettings<Object> defaultSettings); static final FormatSettingsProvider INSTANCE; }### Answer:
@Test public void doubleArray() { FormatSettingsProvider settingsProvider = FormatSettingsProvider.INSTANCE; FormatSettings<Object> defaultSettings = FormatSettings.of(FormatCategory.TEXT, ValueFormatters.UNSUPPORTED); FormatSettings<double[]> settings = settingsProvider.settings(double[].class, defaultSettings); ValueFormatter<double[]> formatter = settings.getFormatter(); double[] array = {1, 2, 3}; assertThat(formatter.formatForDisplay(array)).isEqualTo("[1.0, 2.0, 3.0]"); assertThat(formatter.formatForCsv(array)).isEqualTo("[1.0 2.0 3.0]"); }