@@ -0,0 +1,749 @@
+package at.fhj.itm.pswe.unittest.rest;%0A%0Aimport junit.framework.Assert;%0A%0Aimport org.junit.Test;%0A%0Aimport at.fhj.itm.pswe.dao.WordDao;%0Aimport at.fhj.itm.pswe.dao.interfaces.IWord;%0Aimport at.fhj.itm.pswe.model.Word;%0Aimport at.fhj.itm.pswe.rest.WordEndpoint;%0Aimport static org.easymock.EasyMock.createMock;%0Aimport static org.easymock.EasyMock.expect;%0Aimport static org.easymock.EasyMock.replay;%0Aimport static org.easymock.EasyMock.verify;%0A%0Apublic class WordMockTest %7B%0A%0A%09@Test%0A%09public void testEditWord()%7B%0A%09%09IWord mock=createMock(IWord.class);%0A%09%09mock.changeWordActive(%22test%22,true);%0A%09%09replay(mock);%0A%09%09%0A%09%09Word word=new Word();%0A%09%09word.setText(%22test%22);%0A%09%09word.setActive(true);%0A%09%09mock.changeWordActive(word.getText(),word.getActive());%0A%09%09%0A%09%09verify(mock);%0A%09%7D%0A%7D%0A

Test editWord Method with Mock Object