Skip to content

Commit 1b2346c

Browse files
committed
Resolve org.mockito.exceptions.misusing.UnnecessaryStubbingException
1 parent 4098751 commit 1b2346c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/test/java/org/apache/ibatis/executor/resultset/DefaultResultSetHandlerTest2.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2009-2023 the original author or authors.
2+
* Copyright 2009-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -93,9 +93,6 @@ void shouldNotCallNextOnClosedResultSet_SimpleResult() throws Exception {
9393
when(rsmd.getColumnLabel(1)).thenReturn("id");
9494
when(rsmd.getColumnType(1)).thenReturn(Types.INTEGER);
9595
when(rsmd.getColumnClassName(1)).thenReturn(Integer.class.getCanonicalName());
96-
when(stmt.getConnection()).thenReturn(conn);
97-
when(conn.getMetaData()).thenReturn(dbmd);
98-
when(dbmd.supportsMultipleResultSets()).thenReturn(false); // for simplicity.
9996

10097
final List<Object> results = resultSetHandler.handleResultSets(stmt);
10198
assertEquals(0, results.size());

0 commit comments

Comments
 (0)