    @Test
    public void testGetContainerProperty() {

        Person p = new Person();
        p.setFirstName("Joe");
        expect(entityProviderMock.getEntity(container, "myId")).andStubReturn(p);
        expect(entityProviderMock.getEntity(container, "nonExistent")).andStubReturn(null);
        replay(entityProviderMock);

        container.setEntityProvider(entityProviderMock);

        assertEquals("Joe", container.getContainerProperty("myId", "firstName")
                .getValue());
        assertNull(container
                .getContainerProperty("myId", "nonExistentProperty"));
        assertNull(container.getContainerProperty("nonExistent", "firstName"));

        verify(entityProviderMock);
    }