@Test
public void testNameExists() {

  final JBBPFieldByte field1 = new JBBPFieldByte(new JBBPNamedFieldInfo("struct.field1", "field1", 1024), (byte) 23);
  final JBBPFieldInt field2 = new JBBPFieldInt(new JBBPNamedFieldInfo("struct.field2", "field2", 1960), 23432);
  final JBBPFieldByte field3 = new JBBPFieldByte(new JBBPNamedFieldInfo("struct.field3", "field3", 2048), (byte) 78);
  final JBBPFieldStruct struct = new JBBPFieldStruct(new JBBPNamedFieldInfo("test.struct", "struct", 999), new JBBPAbstractField[] {field1, field2, field3});
  assertFalse(struct.nameExists("struct.field1"));
  assertTrue(struct.nameExists("field1"));
  assertFalse(struct.nameExists("struct.field4"));
  assertTrue(struct.nameExists("field3"));
}