### Question:
MultiQueueLlamaAM extends LlamaAMImpl implements LlamaAMListener,
    IntraLlamaAMsCallback { @Override public void start() throws LlamaException { queueAgnosticLlamaAM = new SingleQueueLlamaAM(getConf(), null, stp); queueAgnosticLlamaAM.start(); queueAgnosticLlamaAM.deleteAllYarnApplications(); for (String queue : getConf().getTrimmedStringCollection(CORE_QUEUES_KEY)) { try { getSingleQueueAMInfo(queue, true, true); } catch (LlamaException ex) { stop(); throw ex; } } running = true; expireThread.start(); } MultiQueueLlamaAM(Configuration conf); @Override synchronized void setMetricRegistry(MetricRegistry metricRegistry); @Override void onEvent(LlamaAMEvent event); @Override void start(); @Override void stop(); @Override boolean isRunning(); @Override List<NodeInfo> getNodes(); @SuppressWarnings("deprecation") @Override void reserve(UUID reservationId, Reservation reservation); @SuppressWarnings("deprecation") @Override PlacedReservation getReservation(UUID reservationId); @SuppressWarnings("deprecation") @Override PlacedReservation releaseReservation(UUID handle, UUID reservationId,
      boolean doNotCache); @Override List<PlacedReservation> releaseReservationsForHandle(UUID handle,
      boolean doNotCache); @Override @SuppressWarnings("unchecked") List<PlacedReservation> releaseReservationsForQueue(String queue,
      boolean doNotCache); @Override void emptyCacheForQueue(String queue); @Override void discardAM(String queue); @Override void discardReservation(UUID reservationId);  }### Answer:
@Test(expected = LlamaException.class) public void testStartOfDelegatedLlamaAmFail() throws Exception { Configuration conf = new Configuration(false); conf.setClass(LlamaAM.RM_CONNECTOR_CLASS_KEY, MyRMConnector.class, RMConnector.class); conf.setBoolean("fail.start", true); conf.set(LlamaAM.CORE_QUEUES_KEY, "q"); LlamaAM am = LlamaAM.create(conf); am.start(); }
@Test(expected = LlamaException.class) public void testRegisterOfDelegatedLlamaAmFail() throws Exception { Configuration conf = new Configuration(false); conf.setClass(LlamaAM.RM_CONNECTOR_CLASS_KEY, MyRMConnector.class, RMConnector.class); conf.setBoolean("fail.register", true); conf.set(LlamaAM.CORE_QUEUES_KEY, "q"); LlamaAM am = LlamaAM.create(conf); am.start(); }