test_class.declarator: connectionMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private Connection connectionMock;
test_class.type: Connection
test_class.var_name: connectionMock
test_class.declarator: daoMock
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private DatabaseAccessObject daoMock;
test_class.type: DatabaseAccessObject
test_class.var_name: daoMock
test_class.file: engine/schema/src/test/java/com/cloud/upgrade/dao/DbUpgradeUtilsTest.java
test_class.identifier: DbUpgradeUtilsTest
test_case.body: @Test
      public void testDropTableColumnsIfExistWhenNoKeysAreSupplied() throws Exception {
          Connection conn = connectionMock;
          String tableName = "tableName";
          List<String> columns = new ArrayList<String>();
  
          DbUpgradeUtils.dropTableColumnsIfExist(conn, tableName, columns);
  
          verify(daoMock, times(0)).columnExists(eq(conn), eq(tableName), anyString());
          verify(daoMock, times(0)).dropColumn(eq(conn), eq(tableName), anyString());
      }
test_case.class_method_signature: DbUpgradeUtilsTest.testDropTableColumnsIfExistWhenNoKeysAreSupplied()
test_case.full_signature: @Test public void testDropTableColumnsIfExistWhenNoKeysAreSupplied()
test_case.identifier: testDropTableColumnsIfExistWhenNoKeysAreSupplied
test_case.invocations: dropTableColumnsIfExist columnExists verify times eq eq anyString dropColumn verify times eq eq anyString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDropTableColumnsIfExistWhenNoKeysAreSupplied()
focal_class.declarator: dao = new DatabaseAccessObject()
focal_class.modifier: private static
focal_class.original_string: private static DatabaseAccessObject dao = new DatabaseAccessObject();
focal_class.type: DatabaseAccessObject
focal_class.var_name: dao
focal_class.file: engine/schema/src/main/java/com/cloud/upgrade/dao/DbUpgradeUtils.java
focal_class.identifier: DbUpgradeUtils
focal_class.class_method_signature: DbUpgradeUtils.dropKeysIfExist(Connection conn, String tableName, List<String> keys, boolean isForeignKey)
focal_class.full_signature: public static void dropKeysIfExist(Connection conn, String tableName, List<String> keys, boolean isForeignKey)
focal_class.identifier: dropKeysIfExist
focal_class.modifiers: public static
focal_class.parameters: (Connection conn, String tableName, List<String> keys, boolean isForeignKey)
focal_class.return: void
focal_class.signature: void dropKeysIfExist(Connection conn, String tableName, List<String> keys, boolean isForeignKey)
focal_class.class_method_signature: DbUpgradeUtils.dropPrimaryKeyIfExists(Connection conn, String tableName)
focal_class.full_signature: public static void dropPrimaryKeyIfExists(Connection conn, String tableName)
focal_class.identifier: dropPrimaryKeyIfExists
focal_class.modifiers: public static
focal_class.parameters: (Connection conn, String tableName)
focal_class.return: void
focal_class.signature: void dropPrimaryKeyIfExists(Connection conn, String tableName)
focal_class.class_method_signature: DbUpgradeUtils.dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)
focal_class.full_signature: public static void dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)
focal_class.identifier: dropTableColumnsIfExist
focal_class.modifiers: public static
focal_class.parameters: (Connection conn, String tableName, List<String> columns)
focal_class.return: void
focal_class.signature: void dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)
focal_method.body: public static void dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns) {
          for (String columnName : columns) {
              if (dao.columnExists(conn, tableName, columnName)) {
                  dao.dropColumn(conn, tableName, columnName);
              }
          }
      }
focal_method.class_method_signature: DbUpgradeUtils.dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)
focal_method.full_signature: public static void dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)
focal_method.identifier: dropTableColumnsIfExist
focal_method.invocations: columnExists dropColumn
focal_method.modifiers: public static
focal_method.parameters: (Connection conn, String tableName, List<String> columns)
focal_method.return: void
focal_method.signature: void dropTableColumnsIfExist(Connection conn, String tableName, List<String> columns)