// JavaDoc inherited
public void testGetContainer() {
AbstractMenuEntry testClass = (AbstractMenuEntry) createTestInstance();
// Test null values
MenuEntry parentObject = null;
try {
testClass.setContainer(parentObject);
fail("The set should throw an exception as no menu parent");
} catch (IllegalStateException ise) {
// Test passed as the exception was thrown as expected
}
// Test non-null values;
parentObject = MenuModelHelper.createMenu(false, null);
testClass.setContainer(parentObject);
MenuEntry testObject = testClass.getContainer();
assertNotNull("The test object should not be null", testObject);
assertEquals("The parent and test objects should be the same",
parentObject, testObject);
}