@Test
  public void testEquals() {

    Application app = new Application("app", new ApplicationTemplate());
    Assert.assertFalse(app.equals(null));
    Assert.assertFalse(app.equals(new Application(app.getTemplate())));
    Assert.assertFalse(app.equals(new Object()));

    Assert.assertEquals(app, app);
    Assert.assertEquals(app, new Application("app", app.getTemplate()));
    Assert.assertEquals(app, new Application("app", new ApplicationTemplate("whatever")));
  }
  @Test
  public void testEqualsAndHashCode_3() {

    Application app1 = new Application(new TestApplicationTemplate());
    Application app2 = new Application("app", app1.getTemplate());

    HashSet<Application> set = new HashSet<Application>(2);
    set.add(app1);
    set.add(app2);
    Assert.assertEquals(2, set.size());
  }