The court heard that all of them had been drinking at a house party the night before.
After the attack they returned to the house party.
It was then alleged that they took off their blood stained clothes, and another friend Artur Woszcxyna, then drove to St Bees and threw a bag with the clothes and shoes over a cliff.
Another man, Artur Skoczen is also accused of helping cover up the murder.
All the defendants deny the charges.
The trial is expected to take up to six weeks.
More top news
The SNP government is determined to press ahead with 'standardised testing' in schools across Scotland, despite teaching union opposition.
Many are hoping the good weather, the reopening of the A591 and uncertainty over some foreign travel could help boost visitor numbers.
The son of a Borders General surgeon was 'physically sick' as he watched his dad abuse his mother, after she said she was leaving him.