### Question:
DesKeyGenHandler extends GenericHeapObject implements Handler { @Override public Promise<Response, NeverThrowsException> handle(final Context context, final Request request) { Response response = new Response(); response.setStatus(Status.OK); response.setEntity(getSharedKey()); return Promises.newResultPromise(response); }  @Override Promise<Response, NeverThrowsException> handle(final Context context, final Request request);  }### Answer:
@Test @SuppressWarnings("unchecked") public void getGeneratedKey() throws Exception { final DesKeyGenHandler handler = new DesKeyGenHandler(); Response response = handler.handle(null, null).get(); assertThat(response.getStatus()).isEqualTo(Status.OK); assertThat((Map<String, Object>) response.getEntity().getJson()).containsKey("key"); response.close(); }