@Test public void convertFromInvalidConnectionString() throws Exception { expectedException.expect(ParameterException.class); expectedException.expectMessage("The connection string is invalid. Connection strings must start with 'mongodb: new MongoClientURIConverter().convertFrom("http: }
@Override public MongoClientURI convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a MongoDB connection string."); } try { return new MongoClientURI(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }
MongoClientURIConverter implements Converter<MongoClientURI> { @Override public MongoClientURI convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a MongoDB connection string."); } try { return new MongoClientURI(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } } }
MongoClientURIConverter implements Converter<MongoClientURI> { @Override public MongoClientURI convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a MongoDB connection string."); } try { return new MongoClientURI(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  }
MongoClientURIConverter implements Converter<MongoClientURI> { @Override public MongoClientURI convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a MongoDB connection string."); } try { return new MongoClientURI(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override MongoClientURI convertFrom(String value); @Override String convertTo(MongoClientURI value); }
MongoClientURIConverter implements Converter<MongoClientURI> { @Override public MongoClientURI convertFrom(String value) { if (value == null) { throw new ParameterException("Couldn't convert value \"null\" to a MongoDB connection string."); } try { return new MongoClientURI(value); } catch (Exception e) { throw new ParameterException(e.getMessage(), e); } }  @Override MongoClientURI convertFrom(String value); @Override String convertTo(MongoClientURI value);  }