class RegisterApplicationMasterResponseReflector {

	@VisibleForTesting
	List<Container> getContainersFromPreviousAttemptsUnsafe(final Object response) {
		if (getContainersFromPreviousAttemptsMethod.isPresent() && response != null) {
			try {
				@SuppressWarnings("unchecked")
				final List<Container> containers = (List<Container>) getContainersFromPreviousAttemptsMethod.get().invoke(response);
				if (containers != null && !containers.isEmpty()) {
					return containers;
				}
			} catch (Exception t) {
				logger.error("Error invoking 'getContainersFromPreviousAttempts()'", t);
			}
		}

		return Collections.emptyList();
	}

	  RegisterApplicationMasterResponseReflector(final Logger log);
	@VisibleForTesting  RegisterApplicationMasterResponseReflector(final Logger log, final Class<?> clazz);

}