public class DatabaseMock implements DatabaseManager {
private List<TableRecord> table = new ArrayList<TableRecord>() {{
add(new TableRecord(1, "name", "description"));
}};
@Override
public String getName(int id) {
for (TableRecord tableRecord : table) {
if (tableRecord.getId() == id) {
return tableRecord.getName();
}
}
return "Noname";
}
}