Testing and sample codes.