@Test
public void testRegisterServiceClass() {

    dsm.startup();
    SampleAnnotationBean sab = dsm.registerServiceClass("newAnnote", SampleAnnotationBean.class);
    assertNotNull(sab);
    SampleAnnotationBean sampleAnnotationBean = dsm.getServiceByName("newAnnote", SampleAnnotationBean.class);
    assertNotNull(sampleAnnotationBean);
    assertEquals(sampleAnnotationBean, sab);
    sampleAnnotationBean = null;
    sab = null;
    try {
        dsm.registerService("fakey", (Class<?>)null);
        fail("should have thrown exception");
    } catch (IllegalArgumentException e) {
        assertNotNull(e.getMessage());
    }
}