@Test
public void TypeFilter_should_accept_only_designed_type(){

    int type = GarmadonSerialization.TypeMarker.STATE_EVENT;
    GarmadonMessageFilter.TypeFilter filter = GarmadonMessageFilters.hasType(type);
    IntStream.of(20).forEach(i -> {
        int n = random.nextInt();
        if(n != type) {
            assertThat(filter.accepts(n), is(false));
        }
    });
    assertThat(filter.accepts(type), is(true));
}