@Test public void testSolicit() throws Exception { final Dhcp6Message request = new Dhcp6Message(); request.setMessageType(Dhcp6MessageType.DHCP_SOLICIT); request.setTransactionId(22); final Dhcp6Options options = new Dhcp6Options(); options.add(clientId); request.setOptions(options); leaseManagerDhcp6Service.getReplyFor(requestContext, request); Mockito.verify(leaseManager).lease(same(requestContext), same(request), any(Dhcp6Message.class)); Mockito.verify(leaseManager).requestInformation(same(requestContext), same(request), any(Dhcp6Message.class)); }
@Override protected Dhcp6Message requestInformation(final Dhcp6RequestContext requestContext, final Dhcp6Message incomingMsg) throws Dhcp6Exception { Dhcp6Message reply = createGenericReply(incomingMsg, Dhcp6MessageType.DHCP_REPLY); ClientIdOption clientIdOption = incomingMsg.getOptions().get(ClientIdOption.class); if (clientIdOption != null) reply.getOptions().add(clientIdOption); return leaseManager.requestInformation(requestContext, incomingMsg, reply); }
LeaseManagerDhcp6Service extends AbstractDhcp6Service { @Override protected Dhcp6Message requestInformation(final Dhcp6RequestContext requestContext, final Dhcp6Message incomingMsg) throws Dhcp6Exception { Dhcp6Message reply = createGenericReply(incomingMsg, Dhcp6MessageType.DHCP_REPLY); ClientIdOption clientIdOption = incomingMsg.getOptions().get(ClientIdOption.class); if (clientIdOption != null) reply.getOptions().add(clientIdOption); return leaseManager.requestInformation(requestContext, incomingMsg, reply); } }
LeaseManagerDhcp6Service extends AbstractDhcp6Service { @Override protected Dhcp6Message requestInformation(final Dhcp6RequestContext requestContext, final Dhcp6Message incomingMsg) throws Dhcp6Exception { Dhcp6Message reply = createGenericReply(incomingMsg, Dhcp6MessageType.DHCP_REPLY); ClientIdOption clientIdOption = incomingMsg.getOptions().get(ClientIdOption.class); if (clientIdOption != null) reply.getOptions().add(clientIdOption); return leaseManager.requestInformation(requestContext, incomingMsg, reply); } LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId);  LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId, @Nonnull final
        InetAddress serverUnicastAddress); }
LeaseManagerDhcp6Service extends AbstractDhcp6Service { @Override protected Dhcp6Message requestInformation(final Dhcp6RequestContext requestContext, final Dhcp6Message incomingMsg) throws Dhcp6Exception { Dhcp6Message reply = createGenericReply(incomingMsg, Dhcp6MessageType.DHCP_REPLY); ClientIdOption clientIdOption = incomingMsg.getOptions().get(ClientIdOption.class); if (clientIdOption != null) reply.getOptions().add(clientIdOption); return leaseManager.requestInformation(requestContext, incomingMsg, reply); } LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId);  LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId, @Nonnull final
        InetAddress serverUnicastAddress);  }
LeaseManagerDhcp6Service extends AbstractDhcp6Service { @Override protected Dhcp6Message requestInformation(final Dhcp6RequestContext requestContext, final Dhcp6Message incomingMsg) throws Dhcp6Exception { Dhcp6Message reply = createGenericReply(incomingMsg, Dhcp6MessageType.DHCP_REPLY); ClientIdOption clientIdOption = incomingMsg.getOptions().get(ClientIdOption.class); if (clientIdOption != null) reply.getOptions().add(clientIdOption); return leaseManager.requestInformation(requestContext, incomingMsg, reply); } LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId);  LeaseManagerDhcp6Service(@Nonnull final Dhcp6LeaseManager leaseManager, @Nonnull final DuidOption.Duid serverId, @Nonnull final
        InetAddress serverUnicastAddress);   }