1212
1313import static org .assertj .core .api .Assertions .assertThat ;
1414import static org .junit .jupiter .api .io .CleanupMode .NEVER ;
15+ import static org .junit .jupiter .params .converter .LocaleConversionFormat .ISO_639 ;
1516import static org .mockito .Mockito .mock ;
1617import static org .mockito .Mockito .only ;
1718import static org .mockito .Mockito .times ;
@@ -95,7 +96,7 @@ void cachesDefaultDisplayNameGenerator() {
9596 CustomDisplayNameGenerator customDisplayNameGenerator = new CustomDisplayNameGenerator ();
9697 when (delegate .getDefaultDisplayNameGenerator ()).thenReturn (customDisplayNameGenerator );
9798
98- // call `cache.getDefaultDisplayNameGenerator()` twice to verify the delegate method is called only once.
99+ // call twice to verify the delegate method is called only once.
99100 assertThat (cache .getDefaultDisplayNameGenerator ()).isSameAs (customDisplayNameGenerator );
100101 assertThat (cache .getDefaultDisplayNameGenerator ()).isSameAs (customDisplayNameGenerator );
101102
@@ -107,7 +108,7 @@ void cachesDefaultTestMethodOrderer() {
107108 final Optional <MethodOrderer > methodOrderer = Optional .of (new MethodOrderer .MethodName ());
108109 when (delegate .getDefaultTestMethodOrderer ()).thenReturn (methodOrderer );
109110
110- // call `cache.getDefaultTestMethodOrderer()` twice to verify the delegate method is called only once.
111+ // call twice to verify the delegate method is called only once.
111112 assertThat (cache .getDefaultTestMethodOrderer ()).isSameAs (methodOrderer );
112113 assertThat (cache .getDefaultTestMethodOrderer ()).isSameAs (methodOrderer );
113114
@@ -118,7 +119,7 @@ void cachesDefaultTestMethodOrderer() {
118119 void cachesDefaultTempDirCleanupMode () {
119120 when (delegate .getDefaultTempDirCleanupMode ()).thenReturn (NEVER );
120121
121- // call `cache.getDefaultTempStrategyDirCleanupMode()` twice to verify the delegate method is called only once.
122+ // call twice to verify the delegate method is called only once.
122123 assertThat (cache .getDefaultTempDirCleanupMode ()).isSameAs (NEVER );
123124 assertThat (cache .getDefaultTempDirCleanupMode ()).isSameAs (NEVER );
124125
@@ -130,13 +131,24 @@ void cachesDefaultTempDirFactorySupplier() {
130131 Supplier <TempDirFactory > supplier = mock ();
131132 when (delegate .getDefaultTempDirFactorySupplier ()).thenReturn (supplier );
132133
133- // call `cache.getDefaultTempDirFactorySupplier()` twice to verify the delegate method is called only once.
134+ // call twice to verify the delegate method is called only once.
134135 assertThat (cache .getDefaultTempDirFactorySupplier ()).isSameAs (supplier );
135136 assertThat (cache .getDefaultTempDirFactorySupplier ()).isSameAs (supplier );
136137
137138 verify (delegate , only ()).getDefaultTempDirFactorySupplier ();
138139 }
139140
141+ @ Test
142+ void cachesDefaultLocaleConversionFormat () {
143+ when (delegate .getDefaultLocaleConversionFormat ()).thenReturn (ISO_639 );
144+
145+ // call twice to verify the delegate method is called only once.
146+ assertThat (cache .getDefaultLocaleConversionFormat ()).isSameAs (ISO_639 );
147+ assertThat (cache .getDefaultLocaleConversionFormat ()).isSameAs (ISO_639 );
148+
149+ verify (delegate , only ()).getDefaultLocaleConversionFormat ();
150+ }
151+
140152 @ Test
141153 void doesNotCacheRawParameters () {
142154 when (delegate .getRawConfigurationParameter ("foo" )).thenReturn (Optional .of ("bar" )).thenReturn (
0 commit comments