public static int align(final int value, final int alignment)
    {
        return (value + (alignment - 1)) & -alignment;
    }
@Test
    void shouldAlignValueToNextMultipleOfAlignmentLong()
    {
        final long alignment = CACHE_LINE_LENGTH;

        assertThat(align(0L, alignment), is(0L));
        assertThat(align(1L, alignment), is(alignment));
        assertThat(align(alignment, alignment), is(alignment));
        assertThat(align(alignment + 1, alignment), is(alignment * 2));

        final long remainder = Long.MAX_VALUE % alignment;
        final long maxMultiple = Long.MAX_VALUE - remainder;

        assertThat(align(maxMultiple, alignment), is(maxMultiple));
        assertThat(align(Long.MAX_VALUE, alignment), is(Long.MIN_VALUE));
    }