ThingUID extends UID { public List<String> getBridgeIds() { List<String> allSegments = getAllSegments(); return allSegments.subList(2, allSegments.size() - 1); } ThingUID();  ThingUID(ThingTypeUID thingTypeUID, String id);  ThingUID(ThingTypeUID thingTypeUID, ThingUID bridgeUID, String id);  ThingUID(ThingTypeUID thingTypeUID, String id, String... bridgeIds);  ThingUID(String bindingId, String id);  ThingUID(String bindingId, ThingUID bridgeUID, String id);  ThingUID(String bindingId, String thingTypeId, String id);  ThingUID(String thingUID);  ThingUID(String... segments); List<String> getBridgeIds(); String getId();  }
@Test public void testGetBridgeIds() { ThingTypeUID thingType = new ThingTypeUID("fake", "type"); ThingUID subject = new ThingUID(thingType, new ThingUID("fake", "something", "bridge"), "thing"); assertEquals("fake:type:bridge:thing", subject.getAsString()); assertThat(subject.getBridgeIds(), hasSize(1)); assertEquals("bridge", subject.getBridgeIds().get(0)); }