We consider a simple multi-hop communication scenario composed of a source node, a relay node and a destination node where the source and the relay can harvest energy from the nature. Energy required for communication arrives (is harvested) at the transmitter and an unlimited battery stores it before being consumed for transmission. In addition, the source can assist the relay by transferring a portion of its energy to the relay through a separate energy transfer unit. We address this energy cooperation between the source and the relay in a deterministic setting. Assuming that the source and the relay nodes are informed of the energy arrivals in advance, we find jointly optimal offline energy management policies for the source and the relay that maximize the end-to-end throughput. We show that this problem is a convex problem. In order to gain insight about the structure of the solution, we consider specific scenarios. In particular, we show that if the relay energy profile is higher at the beginning and lower at the end with only one intersection, then matching the power sequences of the source and the relay slot-by-slot is optimal. We also consider the case when the energy of the source is available at the beginning and show that transferring energy in the first slot is optimal.