()
| 102 | } |
| 103 | |
| 104 | @Test |
| 105 | public void testTimeout() { |
| 106 | ProxyMe.Client<Map<Integer, Integer>> |
| 107 | client = |
| 108 | new ProxyMe.Client<>(Executors.newScheduledThreadPool(1), Map.class, (i) -> { }, 10, TimeUnit.MILLISECONDS); |
| 109 | |
| 110 | Map<Integer, Integer> mapProxy = client.clientProxy(Thread.currentThread().getContextClassLoader()); |
| 111 | |
| 112 | try { |
| 113 | mapProxy.get("foo"); |
| 114 | Assert.fail(); |
| 115 | } catch (Exception e) { |
| 116 | assertThat(e.getCause(), Matchers.instanceOf(TimeoutException.class)); |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | @Test |
| 121 | public void testException() { |
nothing calls this directly
no test coverage detected