Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
879 B
2
Indexable
Never
<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-api-mockito2</artifactId>
			<version>2.0.9</version> <!-- Use the latest version -->
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.powermock</groupId>
			<artifactId>powermock-module-junit4</artifactId>
			<version>2.0.9</version> <!-- Use the same version as above -->
			<scope>test</scope>
		</dependency>


@RunWith(PowerMockRunner.class)

final RecordingDateRange recordingDateRange = recordingDateRangeFactory.getRecordingDateRange(pageType);
static nikal liye from declaration and fxn

mockStatic(RecordingDateRangeFactory.class);


whenNew(RecordingDateRangeForAuditPage.class).withNoArguments().thenReturn(recordingDateRangeForAuditPage);

import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.powermock.api.mockito.PowerMockito.whenNew;