@Test
public void testSchema() throws SQLException, IOException {
final PhoenixPigConfiguration configuration = mock(PhoenixPigConfiguration.class);
final List<ColumnInfo> columnInfos = ImmutableList.of(ID_COLUMN,NAME_COLUMN);
when(configuration.getSelectColumnMetadataList()).thenReturn(columnInfos);
final ResourceSchema actual = PhoenixPigSchemaUtil.getResourceSchema(configuration);
// expected schema.
final ResourceFieldSchema[] fields = new ResourceFieldSchema[2];
fields[0] = new ResourceFieldSchema().setName("ID")