Test N3 formula serialization.