### Question:
Byte { public String aHex() { String first = translate(this.bits.substring(0, 4)); String second = translate(this.bits.substring(4, 8)); return first + second; } Byte(String bits); String aHex(); @Override String toString();  }### Answer:
@Test public void conversionHexTodoCeros() throws FormatoException { Byte b = new Byte("00000000"); assertThat(b.aHex(),is("00")); }
@Test public void conversionHexTodoUnos() throws FormatoException { Byte b = new Byte("11111111"); assertThat(b.aHex(),is("FF")); }
@Test public void conversionHexA0() throws FormatoException { Byte b = new Byte("10100000"); assertThat(b.aHex(),is("A0")); }
@Test public void conversionHex4D() throws FormatoException { Byte b = new Byte("01001101"); assertThat(b.aHex(),is("4D")); }
@Test public void conversionHex9E() throws FormatoException { Byte b = new Byte("10011110"); assertThat(b.aHex(),is("9E")); }
@Test public void queNoPruebaNada() throws FormatoException { Byte b = new Byte("10011110"); assertFalse("No coincidencia de valores.", b.aHex().equals("FF")); }
@Test public void queNoPruebaNada2() throws FormatoException { Byte b = new Byte("10011110"); Byte b2 = new Byte("10011110"); assertEquals("No coincidencia de valores.", b.aHex(),b2.aHex()); }