Skip to content

Instantly share code, notes, and snippets.

@xeviknal
Created July 7, 2016 09:30
Show Gist options
  • Save xeviknal/efa87ada8ee49956ab107c58ebe98431 to your computer and use it in GitHub Desktop.
Save xeviknal/efa87ada8ee49956ab107c58ebe98431 to your computer and use it in GitHub Desktop.
How do we expect private methods using EasyMock?
private void stubEditCall(Booking booking, int updatedGuestCount, Date updatedBookingAt,
Long updatedTableAreaId, boolean success) throws Exception {
Method[] methods = MemberMatcher.methods(Booking.class, "editCheckingETAvailability");
expectPrivate(booking, methods[0], updatedGuestCount, updatedBookingAt,
updatedTableAreaId).andReturn(success);
replay(booking, Booking.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment