use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method invokeUnexposedMethodWithException.
@Test
void invokeUnexposedMethodWithException() throws Exception {
assumeTrue(runTests);
IJmxTestBean bean = getProxy();
assertThatExceptionOfType(InvalidInvocationException.class).isThrownBy(() -> bean.dontExposeMe());
}
use of org.springframework.jmx.IJmxTestBean in project spring-framework by spring-projects.
the class MBeanClientInterceptorTests method setReadOnlyAttribute.
@Test
void setReadOnlyAttribute() throws Exception {
assumeTrue(runTests);
IJmxTestBean proxy = getProxy();
assertThatExceptionOfType(InvalidInvocationException.class).isThrownBy(() -> proxy.setAge(900));
}
Aggregations