*/
public class TestShellRPCAvro {
@Test
public void testAvroStatusConversion() {
FlumeNodeStatusAvro start = new FlumeNodeStatusAvro();
start.host = "HOST";
long time = System.currentTimeMillis();
start.lastseen = time;
start.lastSeenDeltaMillis = time;
start.physicalNode = "PHYSICAL_NODE";
start.state = FlumeNodeState.ACTIVE;
NodeStatus middle = MasterAdminServerAvro.statusFromAvro(start);
assertEquals("HOST", middle.host);
assertEquals(start.lastseen, middle.lastseen);
assertEquals("PHYSICAL_NODE", middle.physicalNode);
assertEquals(NodeState.ACTIVE, middle.state);
FlumeNodeStatusAvro end = MasterAdminServerAvro.statusToAvro(middle);
assertEquals(end.host, start.host);
assertEquals(end.lastseen, start.lastseen);
assertEquals(end.physicalNode, start.physicalNode);
assertEquals(end.state, start.state);
}