I have a Person class with get set for FirstName, LastName
A TestClass to execute TestCase1
Can we just only mock a specific method (getLastName) and leave every
You can use spy to mock individual (including private) methods:
Person classUnderTest = PowerMockito.spy(new Person()); // use PowerMockito to set up your expectation PowerMockito.doReturn("Fixed value").when(classUnderTest, "getLastName");