@Test
public void serializeBooleanResource() throws Exception {

    LWM2MResource resource = new LWM2MResource(LWM2MID.$0, 1);
    resource.setType(LWM2MResourceType.BOOLEAN);
    String json = serializer.serialize(resource);
    System.out.println(json);
    assertThat (json, equalTo("{\"e\":[{\"n\":\"0\",\"bv\":true}]}") );
    
    resource = new LWM2MResource(LWM2MID.$0, 0);
    resource.setType(LWM2MResourceType.BOOLEAN);
    json = serializer.serialize(resource);
    assertThat (json, equalTo("{\"e\":[{\"n\":\"0\",\"bv\":false}]}") );
}