EdmString extends SingletonPrimitiveType { @Override public String fromUriLiteral(final String literal) throws EdmPrimitiveTypeException { return literal == null ? null : super.fromUriLiteral(literal).replace("''", "'"); }  static EdmString getInstance(); @Override Class<?> getDefaultType(); @Override String toUriLiteral(final String literal); @Override String fromUriLiteral(final String literal);  }
@Test public void fromUriLiteral() throws Exception { assertEquals("String''Value", instance.fromUriLiteral("'String''''Value'")); expectErrorInFromUriLiteral(instance, ""); expectErrorInFromUriLiteral(instance, "'"); expectErrorInFromUriLiteral(instance, "'\""); }