@Test
public void testGetSchemaColumns() throws SQLException
{

    // Create a mock result set.
    ResultSet resultSetMock = mock(ResultSet.class);
    // Setup the mock results.
    when(resultSetMock.next()).thenReturn(true).thenReturn(false);
    when(resultSetMock.getString("COLUMN_NAME")).thenReturn(COLUMN_NAME);
    when(resultSetMock.getString("TYPE_NAME")).thenReturn(NUMERIC_TYPE_NAME);
    when(resultSetMock.getString("COLUMN_SIZE")).thenReturn(COLUMN_SIZE);
    when(resultSetMock.getString("DECIMAL_DIGITS")).thenReturn(DECIMAL_DIGITS);
    when(resultSetMock.getInt("NULLABLE")).thenReturn(NOT_NULLABLE);
    when(resultSetMock.getString("COLUMN_DEF")).thenReturn(COLUMN_DEFAULT_VALUE);
    // Call the method under test.
    List<SchemaColumn> schemaColumns = relationalTableRegistrationHelper.getSchemaColumns(resultSetMock);
    // Verify the test results.
    assertThat("The list size is not correct.", schemaColumns.size(), is(equalTo(1)));
    assertThat("The column name is not correct.", schemaColumns.get(0).getName(), is(equalTo(COLUMN_NAME)));
    assertThat("The column type is not correct.", schemaColumns.get(0).getType(), is(equalTo(NUMERIC_TYPE_NAME)));
    assertThat("The column size is not correct.", schemaColumns.get(0).getSize(), is(equalTo(SCHEMA_COLUMNS_SIZE)));
    assertThat("The required column is not correct.", schemaColumns.get(0).isRequired(), is(equalTo(REQUIRED)));
    assertThat("The column default value is not correct.", schemaColumns.get(0).getDefaultValue(), is(equalTo(COLUMN_DEFAULT_VALUE)));
    // Validate the mock calls.
    verify(resultSetMock, times(2)).next();
    verify(resultSetMock).getString("COLUMN_NAME");
    verify(resultSetMock, times(2)).getString("TYPE_NAME");
    verify(resultSetMock).getString("COLUMN_SIZE");
    verify(resultSetMock, times(2)).getString("DECIMAL_DIGITS");
    verify(resultSetMock).getInt("NULLABLE");
    verify(resultSetMock).getString("COLUMN_DEF");
    verifyNoMoreInteractions(resultSetMock);
}