Closed GoogleCodeExporter closed 9 years ago
It's not possible to solve. I've added some work-around to PowerMock trunk
which makes you do like this:
@Test
public void mockingUUIDWorks() throws Exception {
// given
final UUID mock = mock(UUID.class);
mockStatic(UUID.class);
given(UUID.randomUUID()).willReturn(mock);
// when
String actual = new SystemClassUser().generatePerishableToken();
// then
assertEquals("00000000000000000000000000000000", actual);
}
Original comment by johan.ha...@gmail.com
on 3 Nov 2011 at 8:48
Original issue reported on code.google.com by
marceloverdijk
on 2 Nov 2011 at 9:45