Matcher m = Pattern.compile("(" + genusNames + ")[^\\p{L}][^\uFF00]").matcher(inputText);
while(m.find()){
if(!StateMachine.checkFormatRoman(m.group(1).length(), m.start()))
createDecision(m.group(1), "<Roman>" + m.group(1) + "</Roman>", m.start());
}
In the above code checkFormatRoman method is from another class. What should i do to remove dependancy of this method, note the value supplied to this method is obtained dynamically.
I think you should mock your static method
StateMachine.checkFormatRoman. You can do so using powermock.You can return desired value you want.
Something like..