@Test public void testCreateDeviceKeyUsingCommunityName() { DeviceKeyId deviceKeyId = DeviceKeyId.deviceKeyId(deviceKeyIdValue); DeviceKey deviceKey = DeviceKey.createDeviceKeyUsingCommunityName(deviceKeyId, deviceKeyLabel, deviceKeySnmpName); assertNotNull("The deviceKey should not be null.", deviceKey); assertEquals("The deviceKeyId should match as expected", deviceKeyId, deviceKey.deviceKeyId()); assertEquals("The label should match as expected", deviceKeyLabel, deviceKey.label()); assertEquals("The type should match as expected", DeviceKey.Type.COMMUNITY_NAME, deviceKey.type()); CommunityName communityName = deviceKey.asCommunityName(); assertNotNull("The communityName should not be null.", communityName); assertEquals("The name should match as expected", deviceKeySnmpName, communityName.name()); }
public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name) { DefaultAnnotations annotations = builder().set(AnnotationKeys.NAME, name).build(); return new DeviceKey(id, label, Type.COMMUNITY_NAME, annotations); }
DeviceKey extends AbstractAnnotated { public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name) { DefaultAnnotations annotations = builder().set(AnnotationKeys.NAME, name).build(); return new DeviceKey(id, label, Type.COMMUNITY_NAME, annotations); } }
DeviceKey extends AbstractAnnotated { public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name) { DefaultAnnotations annotations = builder().set(AnnotationKeys.NAME, name).build(); return new DeviceKey(id, label, Type.COMMUNITY_NAME, annotations); } DeviceKey(); private  DeviceKey(DeviceKeyId id, String label, Type type, Annotations... annotations); }
DeviceKey extends AbstractAnnotated { public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name) { DefaultAnnotations annotations = builder().set(AnnotationKeys.NAME, name).build(); return new DeviceKey(id, label, Type.COMMUNITY_NAME, annotations); } DeviceKey(); private  DeviceKey(DeviceKeyId id, String label, Type type, Annotations... annotations); DeviceKeyId deviceKeyId(); String label(); Type type(); static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name); CommunityName asCommunityName(); static DeviceKey createDeviceKeyUsingUsernamePassword(DeviceKeyId id, String label,
                                                                 String username, String password); UsernamePassword asUsernamePassword(); }
DeviceKey extends AbstractAnnotated { public static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name) { DefaultAnnotations annotations = builder().set(AnnotationKeys.NAME, name).build(); return new DeviceKey(id, label, Type.COMMUNITY_NAME, annotations); } DeviceKey(); private  DeviceKey(DeviceKeyId id, String label, Type type, Annotations... annotations); DeviceKeyId deviceKeyId(); String label(); Type type(); static DeviceKey createDeviceKeyUsingCommunityName(DeviceKeyId id, String label, String name); CommunityName asCommunityName(); static DeviceKey createDeviceKeyUsingUsernamePassword(DeviceKeyId id, String label,
                                                                 String username, String password); UsernamePassword asUsernamePassword();  }