### Question:
TabletLocationState { public TServerInstance getServer() { TServerInstance result = null; if (current != null) { result = current; } else if (future != null) { result = future; } else { result = last; } return result; } TabletLocationState(KeyExtent extent, TServerInstance future, TServerInstance current,
      TServerInstance last, SuspendingTServer suspend, Collection<Collection<String>> walogs,
      boolean chopped); TServerInstance futureOrCurrent(); @Override String toString(); TServerInstance getServer(); TabletState getState(Set<TServerInstance> liveServers); final KeyExtent extent; final TServerInstance future; final TServerInstance current; final TServerInstance last; final SuspendingTServer suspend; final Collection<Collection<String>> walogs; final boolean chopped; }### Answer:
@Test public void testGetServer_Current() throws Exception { tls = new TabletLocationState(keyExtent, null, current, last, null, walogs, true); assertSame(current, tls.getServer()); }
@Test public void testGetServer_Future() throws Exception { tls = new TabletLocationState(keyExtent, future, null, last, null, walogs, true); assertSame(future, tls.getServer()); }
@Test public void testGetServer_Last() throws Exception { tls = new TabletLocationState(keyExtent, null, null, last, null, walogs, true); assertSame(last, tls.getServer()); }
@Test public void testGetServer_None() throws Exception { tls = new TabletLocationState(keyExtent, null, null, null, null, walogs, true); assertNull(tls.getServer()); }