public List<Entity> insert(String kind, Map<Long, FullEntity<?>> entities) {
    List<Entity> created = new ArrayList<>();

    try {
      for (Map.Entry<Long, FullEntity<?>> entry : entities.entrySet()) {
        Key entityKey =
            datastore.newKeyFactory().setKind(kind).setNamespace(namespace).newKey(entry.getKey());
        Entity entity = Entity.newBuilder(entityKey, entry.getValue()).build();
        created.add(datastore.put(entity));
        keys.add(entityKey);
      }
    } catch (Exception e) {
      throw new DatastoreResourceManagerException("Error inserting Datastore entity", e);
    }

    return created;
  }
@Test
  public void testInsert() {
    // Prepare test data
    Map<Long, FullEntity<?>> entities = new HashMap<>();
    Entity entity = Entity.newBuilder(datastoreMock.newKeyFactory().newKey(1L)).build();
    entities.put(1L, entity);

    // Mock the Datastore put method
    when(datastoreMock.put(any(FullEntity.class))).thenReturn(entity);

    // Execute the method under test
    List<Entity> result = resourceManager.insert("test_kind", entities);

    // Verify the result
    assertThat(result).hasSize(1);
    assertThat(result).contains(entity);
  }