@Test
public void getTyped_notOkResponse_throws() {

    DefaultPlcReadResponse response = new DefaultPlcReadResponse(null,
        Collections.singletonMap("field", new ResponseItem<>(PlcResponseCode.NOT_FOUND, null)));
    assertThatThrownBy(() -> PlcEntityInterceptor.getTyped(Long.class, response, "field"))
        .isInstanceOf(PlcRuntimeException.class)
        .hasMessage("Unable to read specified field 'field', response code was 'NOT_FOUND'");
}