@Test
  public void testFields() {

    try {
      postModel.getField("fake_field");
      fail("Non-existent field should have thrown exception on get");
    } catch (IllegalStateException e) {
    }

    try {
      postModel.setField("fake_field", null);
      fail("Non-existent field should have thrown exception on set");
    } catch (IllegalStateException e) {
    }

    assertFalse(postModel.hasField("fake_field"));
    assertTrue(postModel.hasField("title"));

    try {
      postModel.setField("title", "New Title");
      assertEquals(postModel.getField("title"), "New Title");
    } catch (IllegalStateException e) {
      e.printStackTrace();
      fail("Field not found when it should have been");
    }

    try {
      postModel.setField("title", 3);
      fail("Should have had class cast exception assigning int to string field");
    } catch (ClassCastException e) {
    }
  }