@Test
public void getAtomDoesNotExistTest() {

	PersistentChannel channel = mock(PersistentChannel.class);
	AtomicReference<Consumer<String>> listener = new AtomicReference<>();
	doAnswer(a -> {
		Consumer<String> l = a.getArgument(0);
		listener.set(l);
		return mock(Cancellable.class);
	}).when(channel).addListener(any());
	JsonParser parser = new JsonParser();
	when(channel.sendMessage(any())).then(invocation -> {
		String msg = (String) invocation.getArguments()[0];
		JsonObject jsonObject = parser.parse(msg).getAsJsonObject();
		String id = jsonObject.get("id").getAsString();
		JsonArray atoms = new JsonArray();
		JsonObject response = new JsonObject();
		response.addProperty("id", id);
		response.add("result", atoms);
		listener.get().accept(GsonJson.getInstance().stringFromGson(response));
		return true;
	});
	RadixJsonRpcClient jsonRpcClient = new RadixJsonRpcClient(channel);
	TestObserver<Atom> observer = new TestObserver<>();
	jsonRpcClient.getAtom(new EUID(1)).subscribe(observer);
	observer.assertValueCount(0);
	observer.assertComplete();
	observer.assertNoErrors();
}