Skip to content

Commit

Permalink
Resolve org.mockito.exceptions.misusing.UnnecessaryStubbingException
Browse files Browse the repository at this point in the history
  • Loading branch information
harawata committed Jan 25, 2025
1 parent 4098751 commit 1b2346c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2009-2023 the original author or authors.
* Copyright 2009-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,9 +93,6 @@ void shouldNotCallNextOnClosedResultSet_SimpleResult() throws Exception {
when(rsmd.getColumnLabel(1)).thenReturn("id");
when(rsmd.getColumnType(1)).thenReturn(Types.INTEGER);
when(rsmd.getColumnClassName(1)).thenReturn(Integer.class.getCanonicalName());
when(stmt.getConnection()).thenReturn(conn);
when(conn.getMetaData()).thenReturn(dbmd);
when(dbmd.supportsMultipleResultSets()).thenReturn(false); // for simplicity.

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

0 comments on commit 1b2346c

Please sign in to comment.