CompoundLabel { public boolean hasSubType() { return !(subType == null || subType.isEmpty()); } CompoundLabel(String type);  CompoundLabel(String type, String subType);  CompoundLabel(String type, String subType, String proto); final static boolean isCompound(String label); final static boolean isValidCompound(String label); final static String[] labelComponents(String label); CompoundLabel buildByLabel(String label); String getType(); String getSubType(); String getProto(); boolean hasSubType(); boolean hasProtocol(); String prefixString(); String prefixString(String protocol); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test public void testHasSubtype() { type = new CompoundLabel("coap"); Assert.assertFalse(type.hasSubType()); type = new CompoundLabel("coap", "subcoap"); Assert.assertTrue(type.hasSubType()); }