@Test
    public void testRegisterDuplicateProcessor() {
        server.registerUserProcessor(new SimpleServerUserProcessor());
        try {
            server.registerUserProcessor(new SimpleServerUserProcessor());
            String errMsg = "Can not register duplicate processor, should throw exception here";
            logger.error(errMsg);
            Assert.fail(errMsg);
        } catch (Exception e) {
            Assert.assertEquals(RuntimeException.class, e.getClass());
        }
        client.registerUserProcessor(new SimpleServerUserProcessor());
        try {
            client.registerUserProcessor(new SimpleServerUserProcessor());
            String errMsg = "Can not register duplicate processor, should throw exception here";
            logger.error(errMsg);
            Assert.fail(errMsg);
        } catch (Exception e) {
            Assert.assertEquals(RuntimeException.class, e.getClass());
        }
    }
exception test

@author xiaomin.cxm
@version $Id: ExceptionTest.java, v 0.1 Apr 6, 2016 9:41:53 PM xiaomin.cxm Exp $
src/test/java/com/alipay/remoting/rpc/exception/ExceptionTest.java