Write demo and test