### Question:
StyleReference extends DataReference { public StyleReference(String reference) { super(checkReference(reference)); } StyleReference(String reference);  StyleReference(String providerId, String layerId); @Override void setReference(String reference);  }### Answer:
@Test public void testStyleReference () { Date currentDate = new Date(); long time = currentDate.getTime(); StyleReference styleReference = new StyleReference("${providerStyleType|myStyleProvider|myStyle}"); assertEquals("providerStyleType", styleReference.getDataType()); assertEquals("myStyleProvider", styleReference.getProviderId()); assertEquals(NamesExt.valueOf("myStyle"), styleReference.getLayerId()); assertNull(styleReference.getDataVersion()); assertNull(styleReference.getServiceSpec()); assertNull(styleReference.getServiceURL()); assertNull(styleReference.getServiceId()); styleReference =new StyleReference("myStyleProvider", "myStyle"); assertEquals("providerStyleType", styleReference.getDataType()); assertEquals("myStyleProvider", styleReference.getProviderId()); assertEquals(NamesExt.valueOf("myStyle"), styleReference.getLayerId()); assertNull(styleReference.getDataVersion()); assertNull(styleReference.getServiceSpec()); assertNull(styleReference.getServiceURL()); assertNull(styleReference.getServiceId()); }