It seems that mockito does not work if a Enum is returned. As long a static method with a simple data type (e.g. boolean) is retured, it is working fine.
try (MockedStatic<Config> mock = mockStatic(Config.class)) {
mock.when(() -> Config.access(anyInt(), anyString())).thenReturn(Access.TEST);
...
}
The method always returns null. May I do something wrong…
1