@Test
public void testParsingEnglishSample() throws IOException {
ObjectStream<StringList> sampleStream = openData("census90.sample");
StringList personName = sampleStream.read();
// verify the first 5 taken from the Surname data
assertNotNull(personName);
assertEquals("Smith", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Johnson", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Williams", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Jones", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Brown", personName.getToken(0));
// verify the next 5 taken from the female names
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Mary", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Patricia", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Linda", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Barbara", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Elizabeth", personName.getToken(0));
// verify the last 5 taken from the male names
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("James", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("John", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Robert", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("Michael", personName.getToken(0));
personName = sampleStream.read();
assertNotNull(personName);
assertEquals("William", personName.getToken(0));
// verify the end of the file.
personName = sampleStream.read();
assertNull(personName);
}