public void testBasicUsage() {
		// create a couple of events...
		EntityManager entityManager = entityManagerFactory.createEntityManager();
		entityManager.getTransaction().begin();
		//entityManager.persist(new Post("Our very first Post!", "Post content here", new Date()));
		//entityManager.persist(new Post("Our second Post!", "Post content here", new Date()));
		entityManager.getTransaction().commit();
		entityManager.close();

		// now lets pull events from the database and list them
		entityManager = entityManagerFactory.createEntityManager();
		entityManager.getTransaction().begin();
        List<Post> result = entityManager.createQuery("from Post", Post.class).getResultList();
		for (Post event : result ) {
			System.out.println("Event (" + event.getDate() + ") : " + event.getTitle());
		}
        entityManager.getTransaction().commit();
        entityManager.close();
	}