Leonardo Dicaprio testifies at trial