PppoeClientManager { public void addClient(PppoeDeviceInfo deviceInfo) { PppoeClientInfo clientInfo = getClient(deviceInfo.deviceId()); if (clientInfo == null) { log.error("Failed to get client info from Device {}", deviceInfo.deviceId()); return; } if (!findServiceSpecificId(clientInfo)) { log.warn("Could not find SSID for Device {} VLAN {}:{}", deviceInfo.deviceId(), clientInfo.sVlan(), clientInfo.cVlan()); return; } String ssid = clientInfo.serviceSpecificId(); clientInfo.setDeviceId(deviceInfo.deviceId()); PppoeClientInfo configInfo = clients.get(ssid); if (configInfo == null) { clientInfo.setAdminState(DEFAULT_ADMIN_STATE); } else { clients.remove(ssid); clientInfo.setAdminState(configInfo.adminState()); clientInfo.setConfigured(true); } clients.put(ssid, clientInfo); log.info("addClient(): Device {} SSID {} VLAN {}:{} Admin {}", clientInfo.deviceId(), clientInfo.serviceSpecificId(), clientInfo.sVlan(), clientInfo.cVlan(), clientInfo.adminState()); updateClient(clientInfo); } PppoeClientManager(DeviceService deviceService, DriverService driverService,
                              MastershipService mastershipService, AccessDeviceService accessDeviceService); boolean configClient(String ssid, String paramName, String paramValue); Collection<PppoeClientInfo> getClients(String ssid); Collection<PppoeSessionInfo> getSessions(); void addClient(PppoeDeviceInfo deviceInfo); void removeClient(PppoeDeviceInfo deviceInfo);  }
@Test public void testaddClientDeviceTypeClient() throws Exception { PppoeDeviceInfo pppoeDeviceInfo = new PppoeClientInfo(PppoeAdminState.ENABLE); try { clientManager.addClient(pppoeDeviceInfo); } catch (Exception e) { fail(); } }