unit test added for #compact