@Test public void convertToWithNull() throws Exception { expectedException.expect(ParameterException.class); expectedException.expectMessage("Couldn't convert \"null\" to string."); new GraphiteProtocolConverter().convertTo(null); }
@Override public String convertTo(GraphiteProtocol value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to string."); } return value.name(); }
GraphiteProtocolConverter implements Converter<GraphiteProtocol> { @Override public String convertTo(GraphiteProtocol value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to string."); } return value.name(); } }
GraphiteProtocolConverter implements Converter<GraphiteProtocol> { @Override public String convertTo(GraphiteProtocol value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to string."); } return value.name(); }  }
GraphiteProtocolConverter implements Converter<GraphiteProtocol> { @Override public String convertTo(GraphiteProtocol value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to string."); } return value.name(); }  @Override GraphiteProtocol convertFrom(String value); @Override String convertTo(GraphiteProtocol value); }
GraphiteProtocolConverter implements Converter<GraphiteProtocol> { @Override public String convertTo(GraphiteProtocol value) { if (value == null) { throw new ParameterException("Couldn't convert \"null\" to string."); } return value.name(); }  @Override GraphiteProtocol convertFrom(String value); @Override String convertTo(GraphiteProtocol value);  }