public String getText(final Entry entry) {
		if (entry.getAttribute(TEXT) != null)
			return (String) entry.getAttribute(TEXT);
		else {
			final String textKey = (String) entry.getAttribute(TEXT_KEY);
			if (textKey != null)
				return resourceAccessor.getRawText(textKey);
			else {
				final AFreeplaneAction action = getAction(entry);
				if (action != null)
					return action.getRawText();
				String name = entry.getName();
				if (name.isEmpty())
					return "";
				else {
					final String rawText = resourceAccessor.getRawText(name);
					if (rawText != null)
						return rawText;
					else
						return "";
				}
			}
		}
	}
@Test
	public void getsTextFromEntryAttributeTextKey() throws Exception {
		entry.setAttribute("textKey", "entry text key");
		when(resourceAccessor.getRawText("entry text key")).thenReturn("entry text");
		final String entryText = entryAccessor.getText(entry);
		assertThat(entryText, equalTo("entry text"));
	}