/** * Test of onMessage method PUT on a ROSTER * * @throws java.io.IOException this is an error, not a failure, in the test * @throws jmri.JmriException this is an error, not a failure, in the test */ @Test public void testOnMessagePutRoster() throws IOException, JmriException { JsonNode data = this.connection.getObjectMapper().createObjectNode().put(JSON.METHOD, JSON.PUT); Locale locale = Locale.ENGLISH; JsonException exception = null; JsonRosterSocketService instance = new JsonRosterSocketService(this.connection); try { instance.onMessage(JsonRoster.ROSTER, data, locale); } catch (JsonException ex) { exception = ex; } Assert.assertNotNull(exception); Assert.assertEquals(HttpServletResponse.SC_NOT_IMPLEMENTED, exception.getCode()); }