private void containerReturnsPropertyWithFieldNullable(boolean nullable) {
   ColumnProperty property =
       new ColumnProperty("test", true, false, nullable, false, "1", String.class);
   when(containerMock.getItem(1)).thenReturn(itemMock);
   when(itemMock.getItemProperty("test")).thenReturn(property);
   when(containerFieldMock.isRequired()).thenReturn(!nullable);
 }
 private Resource getResource(final Object itemId) {
   final Container container = this.getContainerDataSource();
   final BeanItem<Resource> item = (BeanItem<Resource>) container.getItem(itemId);
   return (item != null) ? item.getBean() : null;
 }