Added junit for issue#308