@Override
    public void end(final Xid xid, final int flags) throws XAException {
        try {
            delegate.end(xid, flags);
        } catch (final XAException ex) {
            throw mapXAException(ex);
        }
    }
@Test
    void assertEnd() throws XAException {
        singleXAResource.end(xid, 1);
        verify(xaResource).end(xid, 1);
    }