@@ -186,13 +186,6 @@ public void testCreateFile() {
186186 assertEquals (file , TypeHandler .createFile (file .toString ()));
187187 }
188188
189- @ Test
190- public void testOpenFile () throws ParseException , IOException {
191- try (FileInputStream fis = TypeHandler .openFile ("src/test/resources/org/apache/commons/cli/existing-readable.file" )) {
192- IOUtils .consume (fis );
193- }
194- }
195-
196189 @ Test
197190 public void testCreateFiles () {
198191 assertThrows (UnsupportedOperationException .class , () -> TypeHandler .createFiles (null ));
@@ -220,7 +213,7 @@ public void testCreateURL() throws ParseException, MalformedURLException {
220213 @ MethodSource ("createValueTestParameters" )
221214 public void testCreateValue (final String str , final Class <?> type , final Object expected ) throws Exception {
222215 @ SuppressWarnings ("cast" )
223- final Object objectApiTest = ( Object ) type ; // KEEP this cast
216+ final Object objectApiTest = type ; // KEEP this cast
224217 if (expected instanceof Class <?> && Throwable .class .isAssignableFrom ((Class <?>) expected )) {
225218 assertThrows ((Class <Throwable >) expected , () -> TypeHandler .createValue (str , type ));
226219 assertThrows ((Class <Throwable >) expected , () -> TypeHandler .createValue (str , objectApiTest ));
@@ -244,6 +237,13 @@ public void testnstantiableEquals() {
244237 assertEquals (new Instantiable (), new Instantiable ());
245238 }
246239
240+ @ Test
241+ public void testOpenFile () throws ParseException , IOException {
242+ try (FileInputStream fis = TypeHandler .openFile ("src/test/resources/org/apache/commons/cli/existing-readable.file" )) {
243+ IOUtils .consume (fis );
244+ }
245+ }
246+
247247 @ Test
248248 public void testRegister () {
249249 final Map <Class <?>, Converter <?, ? extends Throwable >> map = TypeHandler .createDefaultMap ();
0 commit comments