File tree Expand file tree Collapse file tree
spring-jdbc/src/test/java/org/springframework/jdbc/core/simple Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,8 +212,7 @@ void queryForIntegerWithIndexedParamAndOptionalValue() throws Exception {
212212 .param (1 , 3 )
213213 .query ().optionalValue ();
214214
215- assertThat (value .isPresent ()).isTrue ();
216- assertThat (value .get ()).isEqualTo (22 );
215+ assertThat (value ).contains (22 );
217216 verify (connection ).prepareStatement ("SELECT AGE FROM CUSTMR WHERE ID = ?" );
218217 verify (preparedStatement ).setObject (1 , 3 );
219218 verify (resultSet ).close ();
@@ -229,7 +228,7 @@ void queryForIntegerWithIndexedParamAndNonExistingValue() throws Exception {
229228 .param (1 , 3 )
230229 .query ().optionalValue ();
231230
232- assertThat (value . isPresent ()). isFalse ();
231+ assertThat (value ). isEmpty ();
233232 verify (connection ).prepareStatement ("SELECT AGE FROM CUSTMR WHERE ID = ?" );
234233 verify (preparedStatement ).setObject (1 , 3 );
235234 verify (resultSet ).close ();
You can’t perform that action at this time.
0 commit comments