MqttPublishTarget implements PublishTarget { public static MqttPublishTarget of(final String topic) { return new MqttPublishTarget(topic); } private  MqttPublishTarget(final String topic); static MqttPublishTarget of(final String topic); String getTopic(); @Override boolean equals(final Object o); @Override int hashCode(); @Override String toString();  }
@Test(expected = NullPointerException.class) public void testNull() { MqttPublishTarget.of(null); }
@Test(expected = IllegalArgumentException.class) public void testEmpty() { MqttPublishTarget.of(""); }