public MappingEntry build() {
        Mapping.Builder builder;

        builder = DefaultMapping.builder()
                .withId(buildKey().hashCode())
                .forDevice(deviceId)
                .withKey(buildKey())
                .withValue(buildValue());

        // TODO: we assume that the mapping entry will be always
        // stored in routers without failure for now, which means
        // the mapping entry state will always be ADDED rather than
        // PENDING_ADD
        // we will revisit this part when LISP driver is finished
        return new DefaultMappingEntry(builder.build(), MappingEntryState.ADDED);
    }
@Test
    public void testMapReplyConversion() {

        ReplyBuilder replyBuilder = new DefaultReplyBuilder();

        List<LispMapRecord> records = ImmutableList.of(getMapRecord(IP4, UNKNOWN));

        LispMapReply mapReply = replyBuilder
                                    .withIsEtr(true)
                                    .withIsProbe(false)
                                    .withIsSecurity(true)
                                    .withNonce(UNIQUE_LONG)
                                    .withMapRecords(records)
                                    .build();

        List<LispMapRecord> replyRecords = mapReply.getMapRecords();

        assertThat(replyRecords.size(), is(1));

        testMapRecordConversion(replyRecords.get(0));
    }