	@Test
	public void testSetEntityRefsFromEntities() {

		Entity e1 = mock(Entity.class);
		when(e1.getReference()).thenReturn("/ref/e1");
		Entity e2 = mock(Entity.class);
		when(e2.getReference()).thenReturn("/ref/e2");

		ArrayList<String> refernces = new ArrayList<String>();
		setEntityRefsFromEntities(refernces,
				Arrays.asList(new Entity[] { e1, e2 }));
		assertTrue(refernces.contains("/ref/e1"));
		assertTrue(refernces.contains("/ref/e2"));
	}