Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MyServiceImplTest {
- @Mock
- private MyRepository myRepository;
- @Autowired
- @InjectMocks
- private MyServiceImpl myService;
- @Before
- public void initMocks() {
- MockitoAnnotations.initMocks(this);
- }
- @Test(expected = ServiceException.class)
- public void testSomething() throws ServiceException {
- // My Test Code
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement