PlcEntityInterceptor { static PlcReadResponse getPlcReadResponse(PlcReadRequest request) throws OPMException { return getFromFuture(request); } private  PlcEntityInterceptor(); @SuppressWarnings({"unused", "squid:S00107"}) @RuntimeType static Object interceptGetter(@This Object proxy, @Origin Method method, @SuperCall Callable<?> callable,
                                         @FieldValue(PlcEntityManager.PLC_ADDRESS_FIELD_NAME) String address,
                                         @FieldValue(PlcEntityManager.DRIVER_MANAGER_FIELD_NAME) PlcDriverManager driverManager,
                                         @FieldValue(PlcEntityManager.ALIAS_REGISTRY) AliasRegistry registry,
                                         @FieldValue(PlcEntityManager.LAST_FETCHED) Map<String, Instant> lastFetched,
                                         @FieldValue(PlcEntityManager.LAST_WRITTEN) Map<String, Instant> lastWritten); @SuppressWarnings({"unused", "squid:S00107"}) @RuntimeType static Object interceptSetter(@This Object proxy, @Origin Method method, @SuperCall Callable<?> callable,
                                         @FieldValue(PlcEntityManager.PLC_ADDRESS_FIELD_NAME) String address,
                                         @FieldValue(PlcEntityManager.DRIVER_MANAGER_FIELD_NAME) PlcDriverManager driverManager,
                                         @FieldValue(PlcEntityManager.ALIAS_REGISTRY) AliasRegistry registry,
                                         @FieldValue(PlcEntityManager.LAST_FETCHED) Map<String, Instant> lastFetched,
                                         @Argument(0) Object argument); static PlcWriteResponse getPlcWriteResponse(PlcWriteRequest request);  }
@Test public void getPlcReadResponse_timeoutOnGet_rethrows() { PlcReadRequest request = mock(PlcReadRequest.class); when(request.execute()).thenReturn(new CompletableFuture<>()); assertThatThrownBy(() -> PlcEntityInterceptor.getPlcReadResponse(request)) .isInstanceOf(OPMException.class); }