}
@Test
public void testImmutablePojoWithNonGenericCollections() {
ImmutableWithNonGenericCollectionsPojo pojo = factory
.manufacturePojo(ImmutableWithNonGenericCollectionsPojo.class);
Assert.assertNotNull("The pojo cannot be null!", pojo);
@SuppressWarnings("unchecked")
Collection<Object> nonGenerifiedCollection = pojo
.getNonGenerifiedCollection();
Assert.assertNotNull("The non-generified collection cannot be null!",
nonGenerifiedCollection);
Assert.assertFalse("The non-generified collection cannot be empty!",
nonGenerifiedCollection.isEmpty());
Assert.assertTrue(
"The number of elements in the collection: "
+ nonGenerifiedCollection.size()
+ " does not match the expected value: "
+ ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
nonGenerifiedCollection.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);
@SuppressWarnings("unchecked")
Set<Object> nonGenerifiedSet = pojo.getNonGenerifiedSet();
Assert.assertNotNull("The non-generified Set cannot be null!",
nonGenerifiedSet);
Assert.assertFalse("The non-generified Set cannot be empty!",
nonGenerifiedSet.isEmpty());
Assert.assertTrue(
"The number of elements in the Set: " + nonGenerifiedSet.size()
+ " does not match the expected value: "
+ ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS,
nonGenerifiedSet.size() == ImmutableWithNonGenericCollectionsPojo.NBR_ELEMENTS);
@SuppressWarnings("unchecked")
Map<Object, Object> nonGenerifiedMap = pojo.getNonGenerifiedMap();
Assert.assertNotNull("The non-generified map cannot be null!",
nonGenerifiedMap);
Assert.assertFalse("The non generified map cannot be empty!",
nonGenerifiedMap.isEmpty());
Assert.assertTrue(