private void checkNameMatch(String expectedName, String actualName) { if ((expectedName != null) && (actualName != null)) { if (!expectedName.equals(actualName)) { throw FarragoResource.instance() .MockForeignObjectNotFound .ex(wrapper.getRepos().getLocalizedObjectName(actualName)); } } }