use of com.hazelcast.internal.util.UuidUtil.newUnsecureUUID in project hazelcast by hazelcast.
the class MemberImplTest method testConstructor_withAttributes.
@Test
public void testConstructor_withAttributes() throws Exception {
Map<String, String> attributes = new HashMap<>();
attributes.put("key1", "value");
attributes.put("key2", "12345");
UUID uuid = UuidUtil.newUnsecureUUID();
MemberImpl member = new MemberImpl.Builder(address).version(MemberVersion.of("3.8.0")).localMember(true).uuid(uuid).attributes(attributes).instance(hazelcastInstance).build();
assertBasicMemberImplFields(member);
assertTrue(member.localMember());
assertEquals(uuid, member.getUuid());
assertEquals("value", member.getAttribute("key1"));
assertEquals("12345", member.getAttribute("key2"));
assertFalse(member.isLiteMember());
}
use of com.hazelcast.internal.util.UuidUtil.newUnsecureUUID in project hazelcast by hazelcast.
the class MemberImplTest method testConstructor_withHazelcastInstance.
@Test
public void testConstructor_withHazelcastInstance() throws Exception {
UUID uuid = UuidUtil.newUnsecureUUID();
MemberImpl member = new MemberImpl.Builder(address).version(MemberVersion.of("3.8.0")).localMember(true).uuid(uuid).instance(hazelcastInstance).build();
assertBasicMemberImplFields(member);
assertTrue(member.localMember());
assertEquals(uuid, member.getUuid());
}
Aggregations