More accurate test for write() method
Use proper naming convention for instance/class methods