@Test
public void errorByteBuf() {

    ByteBuf buffer = Unpooled.buffer();
    // note bytes in reverse order
    buffer.writeByte((byte)0x04);
    buffer.writeByte((byte)0x01);
    buffer.writeByte((byte)0x00);
    buffer.writeByte((byte)0x00);
    AmsError error = AmsError.of(buffer);
    assertThat(error.getAsLong(), is(260L));
}