Let\'s imagine I have a following method in some service class:
public SomeEntity makeSthWithEntity(someArgs){ SomeEntity entity = new SomeEntity(); /**
It can be done easy with Java 8 lambdas:
when(mock.something(anyString())).thenAnswer(i -> i.getArguments()[0]);