use of org.apache.rocketmq.iot.connection.client.ClientManager in project rocketmq-externals by apache.
the class MqttPingreqMessageHandlerTest method setup.
@Before
public void setup() {
clientManager = Mockito.mock(ClientManager.class);
ctx = Mockito.mock(ChannelHandlerContext.class);
client = Mockito.spy(new MqttClient());
client.setConnected(true);
handler = new MqttPingreqMessageHandler();
Mockito.when(client.getCtx()).thenReturn(ctx);
}
use of org.apache.rocketmq.iot.connection.client.ClientManager in project rocketmq-externals by apache.
the class AbstractMqttMessageHandlerTest method setup.
@Before
public void setup() {
subscriptionStore = Mockito.mock(SubscriptionStore.class);
clientManager = Mockito.mock(ClientManager.class);
client = Mockito.spy(new MqttClient());
initMessageHandler();
mockHandler = new MockHandler(messageHandler);
embeddedChannel = new EmbeddedChannel(mockHandler);
initMessage();
mock();
Mockito.when(client.getCtx()).thenReturn(embeddedChannel.pipeline().context(mockHandler));
}
Aggregations