@Test
public void testOptionsUserTokenInvalidService() {

    
    // null service must return 400
    
    try {
        zms.optionsUserToken(mockDomRsrcCtx, "user1", null);
        fail();
    } catch (ResourceException ex) {
        assertEquals(400, ex.getCode());
    }
    // empty service must return 400
    
    try {
        zms.optionsUserToken(mockDomRsrcCtx, "user1", "");
        fail();
    } catch (ResourceException ex) {
        assertEquals(400, ex.getCode());
    }
    
    // unknown registered service must return 400
    try {
        zms.optionsUserToken(mockDomRsrcCtx, "user1", "unknown_service_name");
        fail();
    } catch (ResourceException ex) {
        assertEquals(400, ex.getCode());
    }
    // in a list all services must be valid - any invalid must return 400
    
    try {
        zms.optionsUserToken(mockDomRsrcCtx, "user1", "coretech.storage,unknown_service_name");
        fail();
    } catch (ResourceException ex) {
        assertEquals(400, ex.getCode());
    }
}