NameConverter
is an Interface
. It has a static final field called 'smart' which is an instance of an internal class declared like so:
static class Standard extends NameUtil implements NameConverter
In our subject under test, it's referred to like so:
fieldName = NameConverter.smart.toVariableName( "an appropriate string goes here" );
Any ideas how I can mock this call? I already have:
@RunWith(PowerMockRunner.class)
@PrepareForTest({...,NameConverter.class, Standard.class,SubjectUnderTest.class,...})
Update: This has enabled me to suppress initialization of 'smart'. Now if I can find a way to set it... https://github.com/powermock/powermock/wiki/Suppress-Unwanted-Behavior