package com.hida.service;

import com.hida.model.BadParameterException;
import com.hida.model.DefaultSetting;
import com.hida.model.Pid;
import org.mockito.Mock;
import org.mockito.InjectMocks;
import org.mockito.MockitoAnnotations;
import org.testng.Assert;
import static org.testng.Assert.*;

import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 *
 * @author lruffin
 */
public class MinterServiceImplTest {

    @Mock
    MinterService MinterServiceDao;

    @InjectMocks
    MinterServiceImpl MinterServiceImpl;
    
    @BeforeClass
    public void setUpClass() throws Exception {
        MockitoAnnotations.initMocks(this);
    }

    @Test
    public void testMint() throws BadParameterException {
        Assert.fail("unimplemented");
    }

    @Test
    public void testGetCurrentSetting() {
        Assert.fail("unimplemented");
    }

    @Test
    public void updateCurrentSetting() {
        Assert.fail("unimplemented");
    }

}

@@ -20,16 +20,55 @@
 rvice;%0A%0A
+import com.hida.dao.DefaultSettingDao;%0A
 import c
@@ -169,16 +169,49 @@
 el.Pid;%0A
+import com.hida.model.TokenType;%0A
 import o
@@ -259,16 +259,56 @@
 tMocks;%0A
+import static org.mockito.Mockito.when;%0A
 import o
@@ -566,35 +566,40 @@
     
-MinterService MinterService
+DefaultSettingDao DefaultSetting
 Dao;
@@ -658,20 +658,16 @@
 ceImpl;%0A
-    
 %0A    @Be
@@ -880,32 +880,71 @@
 ented%22);%0A    %7D%0A%0A
+    /**%0A     * missing javadoc%0A     */%0A
     @Test%0A    pu
@@ -970,32 +970,40 @@
 rrentSetting() %7B
+        
 %0A        Assert.
@@ -999,37 +999,668 @@
     
-Assert.fail(%22unimplemented%22);
+DefaultSetting defaultSetting = new DefaultSetting(%22prepend%22, // prepend%0A                %22prefix%22, // prefix%0A                TokenType.DIGIT, // tokentype%0A                %22dddd%22, // charmap%0A                3, // rootlength%0A                true, // isSansVowels%0A                true, // isAuto%0A                true);  // isRandom%0A        %0A        when(DefaultSettingDao.getDefaultSetting()).thenReturn(defaultSetting);%0A        System.out.println(%22minterserviceimpl = %22 + MinterServiceImpl.getCurrentSetting());%0A        System.out.println(%22default = %22 + defaultSetting);%0A        Assert.assertEquals(MinterServiceImpl.getCurrentSetting(), defaultSetting);        
 %0A   

Update test method testGetCurrentSetting