@Test
 public void testGettersTemplateModulePage() {
   FreeMarkerTemplateObject object =
       new FreeMarkerTemplateObject("testmodule", TemplateType.TEMPLATE_MODULE, 3L);
   assertTrue(object.getExternalKey().equals("testmodule"));
   assertTrue(object.getType() == TemplateType.TEMPLATE_MODULE);
   assertTrue(object.getLastModified() == 3L);
 }
 @Test
 public void testGettersTemplatePage() {
   FreeMarkerTemplateObject object =
       new FreeMarkerTemplateObject("testpage", TemplateType.TEMPLATE_PAGE, 2L);
   assertTrue(object.getExternalKey().equals("testpage"));
   assertTrue(object.getType() == TemplateType.TEMPLATE_PAGE);
   assertTrue(object.getLastModified() == 2L);
 }
 @Test
 public void testHash_nullname() {
   FreeMarkerTemplateObject object1 =
       new FreeMarkerTemplateObject(null, TemplateType.TEMPLATE_PAGE, 2L);
   FreeMarkerTemplateObject object2 =
       new FreeMarkerTemplateObject(null, TemplateType.TEMPLATE_PAGE, 2L);
   assertTrue(object1.hashCode() == object2.hashCode());
 }
  @Test
  public void testEquals() {
    FreeMarkerTemplateObject object1 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object2 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object3 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_MODULE, 10L);
    FreeMarkerTemplateObject object4 =
        new FreeMarkerTemplateObject("testX", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object5 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 2L);

    assertTrue(object1.equals(object2));
    assertFalse(object1.equals(object3));
    assertFalse(object1.equals(object4));
    assertFalse(object1.equals(object5));
  }
 @Test
 public void testSetters() {
   FreeMarkerTemplateObject object =
       new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 1L);
   object.setExternalKey("testset");
   object.setType(TemplateType.TEMPLATE_MODULE);
   object.setLastModified(5L);
   assertTrue(object.getExternalKey().equals("testset"));
   assertTrue(object.getType() == TemplateType.TEMPLATE_MODULE);
   assertTrue(object.getLastModified() == 5L);
 }
  @Test
  public void testHash() {
    FreeMarkerTemplateObject object1 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object2 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object3 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_MODULE, 10L);
    FreeMarkerTemplateObject object4 =
        new FreeMarkerTemplateObject("testX", TemplateType.TEMPLATE_PAGE, 10L);
    FreeMarkerTemplateObject object5 =
        new FreeMarkerTemplateObject("test", TemplateType.TEMPLATE_PAGE, 2L);

    assertTrue(object1.hashCode() == object2.hashCode());
    assertFalse(object1.hashCode() == object3.hashCode());
    assertFalse(object1.hashCode() == object4.hashCode());
    assertFalse(object1.hashCode() == object5.hashCode());
  }
 @Test
 public void testHash_equalsWrongType() {
   FreeMarkerTemplateObject object1 =
       new FreeMarkerTemplateObject("abc", TemplateType.TEMPLATE_PAGE, 2L);
   assertTrue(object1.equals("abc") == false);
 }