@Test public void shouldSetStatusToBuildWhenStatusIsModified() { lb.setStatus(LoadBalancerStatus.ERROR); lbService.addDefaultValues(lb); Assert.assertEquals(LoadBalancerStatus.BUILD, lb.getStatus()); }
@Test public void shouldAddDefaultValuesWhenNoValuesAreSet() { lbService.addDefaultValues(lb); Assert.assertEquals(LoadBalancerAlgorithm.RANDOM, lb.getAlgorithm()); Assert.assertEquals(LoadBalancerProtocol.HTTP, lb.getProtocol()); Assert.assertFalse(lb.isConnectionLogging()); Assert.assertEquals(defaultProtocol.getPort(), lb.getPort()); Assert.assertEquals(SessionPersistence.NONE, lb.getSessionPersistence()); Assert.assertEquals(LoadBalancerStatus.BUILD, lb.getStatus()); Assert.assertEquals(false, lb.isHalfClosed()); }