@Test
public void testRegister()
{

    List<ChannelType> types = channelService.getChannelTypes();
    
    // Check the mock channel type is registered through Spring.
    assertTrue(types.contains(mockChannelType));
    channelService.getChannelType(MockChannelType.ID);
    try
    {
        channelService.register(null);
        fail("Exception expected when calling register(null)");
    }
    catch(IllegalArgumentException e)
    {
        //NOOP
    }
    try
    {
        channelService.register(mockChannelType);
        fail("Exception expected when trying to register the same ChannelType twice");
    }
    catch(IllegalArgumentException e)
    {
        //NOOP
    }
}