@SuppressWarnings("unchecked")
st
public void handleInvalidSyntaxException() throws InvalidSyntaxException {

    when(context.getServiceReferences(any(Class.class), any())).thenThrow(InvalidSyntaxException.class);
    assertNull(model.getNamedService(HasName.class, NAME));
}