### Question:
LoadBalancer implements IFloodlightModule,
    ILoadBalancerService, IOFMessageListener { @Override public LBVip createVip(LBVip vip) { if (vip == null) vip = new LBVip(); vips.put(vip.id, vip); vipIpToId.put(vip.address, vip.id); vipIpToMac.put(vip.address, vip.proxyMac); return vip; }  @Override String getName(); @Override boolean isCallbackOrderingPrereq(OFType type, String name); @Override boolean isCallbackOrderingPostreq(OFType type, String name); @Override net.floodlightcontroller.core.IListener.Command receive(IOFSwitch sw, OFMessage msg, FloodlightContext cntx); void pushPacket(IPacket packet, 
                           IOFSwitch sw,
                           int bufferId,
                           short inPort,
                           short outPort, 
                           FloodlightContext cntx,
                           boolean flush); void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, long pinSwitch); @Override Collection<LBVip> listVips(); @Override Collection<LBVip> listVip(String vipId); @Override LBVip createVip(LBVip vip); @Override LBVip updateVip(LBVip vip); @Override int removeVip(String vipId); @Override Collection<LBPool> listPools(); @Override Collection<LBPool> listPool(String poolId); @Override LBPool createPool(LBPool pool); @Override LBPool updatePool(LBPool pool); @Override int removePool(String poolId); @Override Collection<LBMember> listMembers(); @Override Collection<LBMember> listMember(String memberId); @Override Collection<LBMember> listMembersByPool(String poolId); @Override LBMember createMember(LBMember member); @Override LBMember updateMember(LBMember member); @Override int removeMember(String memberId); @Override Collection<LBMonitor> listMonitors(); @Override Collection<LBMonitor> listMonitor(String monitorId); @Override LBMonitor createMonitor(LBMonitor monitor); @Override LBMonitor updateMonitor(LBMonitor monitor); @Override int removeMonitor(String monitorId); @Override Collection<Class<? extends IFloodlightService>> getModuleServices(); @Override Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls(); @Override Collection<Class<? extends IFloodlightService>> getModuleDependencies(); @Override void init(FloodlightModuleContext context); @Override void startUp(FloodlightModuleContext context); static void parseActionString(OFFlowMod flowMod, String actionstr, Logger log); public Comparator<SwitchPort> clusterIdComparator; }### Answer:
@Test public void testCreateVip() { String postData1, postData2; IOException error = null; postData1 = "{\"id\":\"1\",\"name\":\"vip1\",\"protocol\":\"icmp\",\"address\":\"10.0.0.100\",\"port\":\"8\"}"; postData2 = "{\"id\":\"2\",\"name\":\"vip2\",\"protocol\":\"tcp\",\"address\":\"10.0.0.200\",\"port\":\"100\"}"; try { vip1 = vipsResource.jsonToVip(postData1); } catch (IOException e) { error = e; } try { vip2 = vipsResource.jsonToVip(postData2); } catch (IOException e) { error = e; } assertFalse(vip1==null); assertFalse(vip2==null); assertTrue(error==null); lb.createVip(vip1); lb.createVip(vip2); assertTrue(lb.vips.containsKey(vip1.id)); assertTrue(lb.vips.containsKey(vip2.id)); }