@Test public void invalidReferenceNotStartingWithImage() { DataURIResourceReferenceTypeParser parser = new DataURIResourceReferenceTypeParser(); ResourceReference resourceReference = parser.parse("text/html;base64,iVBORw0KGgoAAAANSUhEUgAAA..."); assertNull(resourceReference); }
@Override public ResourceReference parse(String reference) { ResourceReference resourceReference = null; if (reference.startsWith("image/")) { resourceReference = new ResourceReference(reference, getType()); } return resourceReference; }
DataURIResourceReferenceTypeParser implements ResourceReferenceTypeParser { @Override public ResourceReference parse(String reference) { ResourceReference resourceReference = null; if (reference.startsWith("image/")) { resourceReference = new ResourceReference(reference, getType()); } return resourceReference; } }
DataURIResourceReferenceTypeParser implements ResourceReferenceTypeParser { @Override public ResourceReference parse(String reference) { ResourceReference resourceReference = null; if (reference.startsWith("image/")) { resourceReference = new ResourceReference(reference, getType()); } return resourceReference; }  }
DataURIResourceReferenceTypeParser implements ResourceReferenceTypeParser { @Override public ResourceReference parse(String reference) { ResourceReference resourceReference = null; if (reference.startsWith("image/")) { resourceReference = new ResourceReference(reference, getType()); } return resourceReference; }  @Override ResourceType getType(); @Override ResourceReference parse(String reference); }
DataURIResourceReferenceTypeParser implements ResourceReferenceTypeParser { @Override public ResourceReference parse(String reference) { ResourceReference resourceReference = null; if (reference.startsWith("image/")) { resourceReference = new ResourceReference(reference, getType()); } return resourceReference; }  @Override ResourceType getType(); @Override ResourceReference parse(String reference);  }