Why not look at all positions:

    for ( int checkOffset = 0; checkOffset < 32; checkOffset++ ) {
        assertThat( BitmapFormat._32.peek( bitmap.bitmap(), checkOffset ), is( checkOffset == offsetId ) );
    }