public class SchemaSamplerTest {
@Test
public void testFieldNames() throws IOException {
SchemaSampler s = new SchemaSampler("[{\"name\":\"id\", \"class\":\"id\"}, {\"name\":\"foo\", \"class\":\"address\"}, {\"name\":\"bar\", \"class\":\"date\", \"format\":\"yy-MM-dd\"}, {\"name\":\"baz\", \"class\":\"foreign-key\", \"size\":1000, \"skew\":1}]");
assertEquals("[id, foo, bar, baz]", Iterables.toString(s.getFieldNames()));
System.out.printf("%s\n", Iterables.toString(s.sample()));
System.out.printf("%s\n", Iterables.toString(s.sample()));
System.out.printf("%s\n", Iterables.toString(s.sample()));
System.out.printf("%s\n", Iterables.toString(s.sample()));
System.out.printf("%s\n", Iterables.toString(s.sample()));
}