diff --git a/java/client/test/org/openqa/selenium/remote/JsonToBeanConverterTest.java b/java/client/test/org/openqa/selenium/remote/JsonToBeanConverterTest.java index 55822e1db06d2..6c0b96d0a0bc5 100644 --- a/java/client/test/org/openqa/selenium/remote/JsonToBeanConverterTest.java +++ b/java/client/test/org/openqa/selenium/remote/JsonToBeanConverterTest.java @@ -366,6 +366,19 @@ public void testShouldCallFromJsonMethodIfPresent() { assertEquals("converted", res.convertedValue); } + // Test for issue 8187 + @Test + public void testDecodingResponseWithNumbersInValueObject() { + Response response = new JsonToBeanConverter() + .convert(Response.class, "{\"status\":0,\"value\":{\"width\":96,\"height\":46.19140625}}"); + + @SuppressWarnings("unchecked") + Map value = (Map) response.getValue(); + assertEquals(96, value.get("width").intValue()); + assertEquals(46, value.get("height").intValue()); + assertEquals(46.19140625, value.get("height").doubleValue(), 0.00001); + } + public static class SimpleBean { private String value;