@Test
public void equals() {

    AmsError a = AmsError.of((byte) 0x1, (byte) 0x2, (byte) 0x3, (byte) 0x4);
    AmsError b = AmsError.of((byte) 0x1, (byte) 0x2, (byte) 0x3, (byte) 0x4);
    AmsError c = AmsError.of((byte) 0x1, (byte) 0x2, (byte) 0x3, (byte) 0xFF);
    byte array[] = {(byte) 0x1, (byte) 0x2, (byte) 0x3, (byte) 0x4};
    assertThat(a.equals(a), is(true));
    assertThat(a.equals(b), is(true));
    assertThat(a.equals(c), is(false));
    assertThat(a.equals(1), is(false));
    assertThat(a.equals((byte) 1), is(false));
    assertThat(a.equals(array), is(false));
}