From f96272a06ba9d019bc601288aa22de13b16a98da Mon Sep 17 00:00:00 2001 From: Max Kalika Date: Sat, 2 Jul 2016 23:21:12 -0700 Subject: [PATCH] Issue #122: Test MBeans with unreadable attribute. --- .../com/github/mk23/jmxproxy/core/tests/AttributeTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/com/github/mk23/jmxproxy/core/tests/AttributeTest.java b/src/test/java/com/github/mk23/jmxproxy/core/tests/AttributeTest.java index c7889cb..bca9183 100644 --- a/src/test/java/com/github/mk23/jmxproxy/core/tests/AttributeTest.java +++ b/src/test/java/com/github/mk23/jmxproxy/core/tests/AttributeTest.java @@ -60,9 +60,12 @@ public interface AttributeTestJMXMBean { List> getListListStringValue(); String getSingleJsonStringValue(); String getMultiJsonStringValue(); + void setWriteOnlyBooleanValue(boolean value); } public class AttributeTestJMX implements AttributeTestJMXMBean { + private boolean value; + public Object getNullValue() { return null; } @@ -125,6 +128,10 @@ public String getSingleJsonStringValue() { public String getMultiJsonStringValue() { return "null true 1 1.23 \"val\" {\"key1\": [\"val1\", [1, 2]], \"key2\": \"val2\"} [1, 1.23]"; } + + public void setWriteOnlyBooleanValue(boolean value) { + this.value = value; + } } public AttributeTest() throws Exception {