List<ApiRole> roleList = new ArrayList<>();
ApiRole role = new ApiRole();
role.setName("NAMENODE");
role.setRoleState(ApiRoleState.STARTED);
role.setType(role.getName());
ApiHostRef hostRef = new ApiHostRef("host1");
role.setHostRef(hostRef);
roleList.add(role);
RolesResourceV6 rolesResourceV6 = new FakeRolesResource(roleList);
Mockito.when(servicesResourceV6.getRolesResource(hdfs.getName())).thenReturn(rolesResourceV6);
Mockito.when(resourceV6.getServicesResource(blueprint.getName())).thenReturn(servicesResourceV6);