Court testimony outlines events leading to slaying