EntityLoaderBase implements EntityLoader { public Object loadSingle(String name, File entitiesFile) { return load(entitiesFile).get(name); } @VisibleForTesting protected  EntityLoaderBase(final JsonTools jsonTools, final IdGenerator idGenerator); Object loadSingle(String name, File entitiesFile); Map<String, Object> load(File entitiesFile); @Override void load(final Bundle bundle, final File rootDir); @Override void load(Bundle bundle, String fullName, String value);  }
@Test void loadSingle() { AtomicBoolean putToBundle = new AtomicBoolean(false); EntityLoader loader = new TestEntityLoader(putToBundle); loader.load(null, "test", "{\"name\":\"custom\"}"); assertTrue(putToBundle.get()); putToBundle.set(false); loader.load(null, "test.json", "{\"name\":\"custom\"}"); assertTrue(putToBundle.get()); }