assertNotNull("PortletContext should have been set", bean.getPortletContext());
assertEquals(portletContext, bean.getPortletContext());
}
public void testPortletContextAwareWithNonNullPortletContextAndNullPortletConfig() {
PortletContext portletContext = new MockPortletContext();
PortletContextAwareProcessor processor = new PortletContextAwareProcessor(portletContext, null);
PortletContextAwareBean bean = new PortletContextAwareBean();
assertNull(bean.getPortletContext());
processor.postProcessBeforeInitialization(bean, "testBean");
assertNotNull("PortletContext should have been set", bean.getPortletContext());