@DisplayName("from returns ApplicationErrorException")
@Test
void fromApplicationException() {

  ByteBuf byteBuf = createErrorFrame(1, APPLICATION_ERROR, "test-message");
  assertThat(Exceptions.from(1, byteBuf))
      .isInstanceOf(ApplicationErrorException.class)
      .hasMessage("test-message");
  assertThat(Exceptions.from(0, byteBuf))
      .isInstanceOf(IllegalArgumentException.class)
      .hasMessage(
          "Invalid Error frame in Stream ID 0: 0x%08X '%s'", APPLICATION_ERROR, "test-message");
}