use of com.alibaba.nacos.config.server.model.capacity.Capacity in project nacos by alibaba.
the class GroupCapacityPersistServiceTest method testGetClusterCapacity.
@Test
public void testGetClusterCapacity() {
List<GroupCapacity> list = new ArrayList<>();
GroupCapacity groupCapacity = new GroupCapacity();
groupCapacity.setId(1L);
list.add(groupCapacity);
String groupId = GroupCapacityPersistService.CLUSTER;
when(jdbcTemplate.query(anyString(), eq(new Object[] { groupId }), any(RowMapper.class))).thenReturn(list);
Capacity ret = service.getClusterCapacity();
Assert.assertEquals(groupCapacity.getId(), ret.getId());
}
Aggregations