risdenk commented on a change in pull request #201: KNOX-2131 - Fixed 
sonarcloud bugs
URL: https://github.com/apache/knox/pull/201#discussion_r347509601
 
 

 ##########
 File path: 
gateway-shell/src/test/java/org/apache/knox/gateway/shell/table/KnoxShellTableTest.java
 ##########
 @@ -365,6 +373,67 @@ public Object answer() {
     verify(connection, statement, resultSet, metadata);
   }
 
+  @Test
+  public void testJDBCBuilderUsingConnectionString() throws Exception {
+    final String connectionUrl = "testConnectionUrl";
+    ResultSetMetaData metadata = createMock(ResultSetMetaData.class);
+    try (Connection connection = 
EasyMock.createNiceMock(Connection.class);Statement statement = 
createMock(Statement.class);ResultSet resultSet = createMock(ResultSet.class)){
+      PowerMock.mockStatic(DriverManager.class);
 
 Review comment:
   Can you add a comment to this line about how need PowerMock since EasyMock 
can't mock statics?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to