@Test
public void handleSetActivate() throws BindException, XMLSemanticError {

    IQStanza request = (IQStanza) IQStanza.getWrapper(StanzaBuilder
            .createIQStanza(FROM, TO, IQStanzaType.SET, "id1")
            .startInnerElement("query", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS).addAttribute("sid", "sid1")
            .startInnerElement("activate", NamespaceURIs.XEP0065_SOCKS5_BYTESTREAMS)
            .addText(TARGET.getFullQualifiedName()).build());

    String hash = DigestUtils.shaHex("sid1" + FROM.getFullQualifiedName() + TARGET.getFullQualifiedName());
    when(connectionsRegistry.activate(hash)).thenReturn(true);

    List<Stanza> responses = handler.handleSet(request, serverRuntimeContext, sessionContext, null);
    Stanza response = responses.get(0);

    Stanza expected = StanzaBuilder.createIQStanza(TO, FROM, IQStanzaType.RESULT, "id1").build();

    StanzaAssert.assertEquals(expected, response);

    verify(connectionsRegistry).activate(hash);
}