@@ -0,0 +1,2705 @@
+package sg.ncl.testbed_interface.repositories.jpa.entities;%0A%0Aimport org.apache.commons.lang3.RandomStringUtils;%0Aimport org.junit.Test;%0A%0Aimport java.time.ZonedDateTime;%0Aimport java.util.Random;%0A%0Aimport static org.hamcrest.Matchers.*;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * @author Christopher Zhong%0A */%0Apublic class LoginActivityEntityTest %7B%0A%0A    @Test%0A    public void testGetId() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A%0A        assertThat(loginActivityEntity.getId(), is(nullValue()));%0A    %7D%0A%0A    @Test%0A    public void testSetId() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A        final Long id = new Random().nextLong();%0A        loginActivityEntity.setId(id);%0A%0A        assertThat(loginActivityEntity.getId(), is(equalTo(id)));%0A    %7D%0A%0A    @Test%0A    public void testGetIpAddress() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A%0A        assertThat(loginActivityEntity.getIpAddress(), is(nullValue()));%0A    %7D%0A%0A    @Test%0A    public void testSetIpAddress() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A        final String ipAddress = RandomStringUtils.randomAlphanumeric(20);%0A        loginActivityEntity.setIpAddress(ipAddress);%0A%0A        assertThat(loginActivityEntity.getIpAddress(), is(equalTo(ipAddress)));%0A    %7D%0A%0A    @Test%0A    public void testGetDate() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A%0A        assertThat(loginActivityEntity.getDate(), is(nullValue()));%0A    %7D%0A%0A    @Test%0A    public void testSetDate() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A        final ZonedDateTime now = ZonedDateTime.now();%0A        loginActivityEntity.setDate(now);%0A%0A        assertThat(loginActivityEntity.getDate(), is(equalTo(now)));%0A    %7D%0A%0A    @Test%0A    public void testToString() throws Exception %7B%0A        final LoginActivityEntity loginActivityEntity = new LoginActivityEntity();%0A        final Long id = new Random().nextLong();%0A        loginActivityEntity.setId(id);%0A        final String ipAddress = RandomStringUtils.randomAlphanumeric(20);%0A        loginActivityEntity.setIpAddress(ipAddress);%0A        final ZonedDateTime now = ZonedDateTime.now();%0A        loginActivityEntity.setDate(now);%0A%0A        final String toString = loginActivityEntity.toString();%0A%0A        assertThat(toString, containsString(id.toString()));%0A        assertThat(toString, containsString(ipAddress));%0A        assertThat(toString, containsString(now.toString()));%0A    %7D%0A%0A%7D

Add unit test for LoginActivityEntity (DEV-15)