graphic: add test code

Change-Id: Ib5dbffb7f78806f75ab61f97c4482076caeae030