* Test the get enabled types.
*/
public void testGetEnabledTypes()
{
Vector v;
NotificationFilterSupport nfs = new NotificationFilterSupport();
// By default should contain nothing
assertEquals(0, nfs.getEnabledTypes().size());
// Add two
nfs.enableType("type1");
nfs.enableType("type2");
v = nfs.getEnabledTypes();
assertEquals(2, v.size());
assertEquals(true, v.contains("type1"));
assertEquals(true, v.contains("type2"));
// Remove one
nfs.disableType("type1");
v = nfs.getEnabledTypes();
assertEquals(1, v.size());
assertEquals(false, v.contains("type1"));
assertEquals(true, v.contains("type2"));
// Remove all
nfs.enableType("type2");
nfs.disableAllTypes();
v = nfs.getEnabledTypes();
assertEquals(0, v.size());
// Test duplication
nfs.enableType("type1");
nfs.enableType("type1");
v = nfs.getEnabledTypes();
assertEquals(1, v.size());
// Test duplication removal
nfs.disableType("type1");
v = nfs.getEnabledTypes();
assertEquals(0, v.size());
}