### Question:
ServiceModel implements Comparable<ServiceModel> { @XmlElement public Type getType() { return serviceMetadata == null ? Type.UNKNOWN : Type.valueOf(serviceMetadata.getType()); }  void setRequest(HttpServletRequest request); void setTopologyName(String topologyName); void setGatewayPath(String gatewayPath); void setService(Service service); void setServiceMetadata(Metadata serviceMetadata); void setServiceUrl(String serviceUrl); @XmlElement String getServiceName(); @XmlElement String getVersion(); @XmlElement(name = "shortDesc") String getShortDescription(); @XmlElement String getDescription(); @XmlElement Type getType(); @XmlElement String getContext(); @XmlElement String getServiceUrl(); @XmlElement(name = "sample") @XmlElementWrapper(name = "samples") List<Sample> getSamples(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override int compareTo(ServiceModel other);  }### Answer:
@Test public void shouldReturnUnknownTypeIfMetadataIsNotSet() throws Exception { final ServiceModel serviceModel = new ServiceModel(); assertEquals(ServiceModel.Type.UNKNOWN, serviceModel.getType()); }