RxMqttClient { public Observable<Status> status() { return statusSubject; } @VisibleForTesting  RxMqttClient(MqttAsyncClient client, MqttConnectOptions connectOptions, Gson gson);  RxMqttClient(String brokerUrl, String clientId, MqttClientPersistence persistence, MqttConnectOptions connectOptions, Gson gson); void init(MqttAsyncClient client, MqttConnectOptions connectOptions, Gson gson); Observable<RxMqttClient> con(); Observable<RxMqttClient> connect(); Observable<RxMqttClient> disconnect(); Observable<PublishResponse> publish(final String topic, Object body); Observable<PublishResponse> publish(final String topic, final String message); Observable<PublishResponse> publish(final String topic, final String message, final QoS qos); Observable<PublishResponse> publish(final String topic, final String message, final QoS qos, final boolean retained); Observable<Message> onTopic(final String topic); Observable<Message> onTopic(final String topic, final QoS qos); synchronized Observable<Message> subscribing(final Pattern pattern); void disconnectForcibly(); Observable<IMqttToken> checkPing(final Object userContext); Observable<Status> status();  }
@Test public void testStatusConnected() { rxclient.status().subscribe(so); so.assertStatus() .hasState(CONNECTED); so.assertNoMoreEvents(); }