protected void assertPositionEquals(Block block, int position, Object expectedStackValue, Object expectedObjectValue)
{
int hash = 0;
if (type.isComparable()) {
hash = hashPosition(type, block, position);
}
assertPositionValue(block, position, expectedStackValue, hash, expectedObjectValue);
assertPositionValue(block.getSingleValueBlock(position), 0, expectedStackValue, hash, expectedObjectValue);
assertPositionValue(block.getRegion(position, 1), 0, expectedStackValue, hash, expectedObjectValue);
assertPositionValue(block.getRegion(0, position + 1), position, expectedStackValue, hash, expectedObjectValue);
assertPositionValue(block.getRegion(position, block.getPositionCount() - position), 0, expectedStackValue, hash, expectedObjectValue);
BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus(), 1);
type.appendTo(block, position, blockBuilder);
assertPositionValue(blockBuilder.build(), 0, expectedStackValue, hash, expectedObjectValue);
}